Skip to main content
12-Amethyst
March 22, 2016
Question

Publish rules based on EPM Document Name

  • March 22, 2016
  • 11 replies
  • 5618 views

Hi,

Looking for ideas to publish objects different from regular publishing output with specific file names.

Say if object name with MANF Ex: 12190242-MANF-00A.drw, this need to publish additional or different output from the regular publishing.

Let me know.

Thanks

Murthi

11 replies

2-Explorer
March 22, 2016

You can add a regular expression in your publishing rule,similar to the highlighted one. You can ignore the rest of the rules, we have that to publish DRW as a pdf and store it as a WTDocument in published content directory

<rules xmlns="http://www.ptc.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ptc.com/PublishRulesSchema.xsd">

<authoring-application name="PROE">

<additional-files name="DrawingPDF">

<file display-label="PDF" type="pdf" default="true" output-prefix="pdf"/>

</additional-files>

<param-set name="Share with WTDocumentReleased Drawing">

<post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>

<post-publish name="published-content-link">create</post-publish>

<post-publish name="name">{EPM_NAME}</post-publish>

<post-publish name="lifecycle-state">RELEASED</post-publish>

<post-publish name="lifecycle-template">Basic</post-publish>

<post-publish name="type">com.companyname.publishedContent</post-publish>

<post-publish name="folder">/Published Contents</post-publish>

<post-publish name="additional-file-primary">.*\.pdf</post-publish>

</param-set>

<condition name="IS_Released_Drawing">

<attribute name="epmdoc_name" regex=".*\.drw" />

<attribute name="epmdoc_lifeCycleState" value="Released"/>

</condition>

<if condition="IS_Released_Drawing">

<publish evaluate-rules-on-republish="true"  additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="create-representation"/>

<publish evaluate-rules-on-republish="true"  additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="schedule"/>

<publish evaluate-rules-on-republish="true"  additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="checkin"/>

<publish evaluate-rules-on-republish="true"  additional-files="DrawingPDF" param-set="Share with WTDocumentReleased Drawing" on="unknown-source"/>

</if>

<publish evaluate-rules-on-republish="true" on="checkin"/>

<publish evaluate-rules-on-republish="true" on="create-representation"/>

<publish evaluate-rules-on-republish="true" on="schedule"/>

<publish evaluate-rules-on-republish="true" on="unknown-source"/>

</authoring-application>

</rules>

Thank you,

Binesh Kumar

Medtronic - MITG

taruchamy12-AmethystAuthor
12-Amethyst
March 23, 2016

Thanks Binesh Kumar

Will try this...

taruchamy12-AmethystAuthor
12-Amethyst
April 5, 2016

Thanks Tom and Binesh.

\bISPL\b failed to search for the intended object though. But And condition works fine.

I did achieved this with

<attribute name="epmdoc_number" regex= ".*(?i:ispl).*\.DRW" /> 

Where I could create additional file type, but still searching for the rule to alternate file type [By Default I have defined DXF for all the drawings] - I need to replace with TIF for drawings containing ISPL.

Thanks

1-Visitor
October 14, 2016

Dear all,

Any ideas how to get this working on 10.1?

Thanks in advance.

Regards,

Gautham