Spezielle Verwaltung > Unterstützung von Visualisierung und Publizierung > WVS Publish Rules > Examples of Publish Rules XML Files
  
Examples of Publish Rules XML Files
This section contains complete Publish Rules XML file examples. A sample Publish Rules XML file, PublishRules.xml, can be found in the <Windchill>/codebase/com/ptc/wvs/server/xml directory.
Simple Arbortext Publishing
This example publishes all Arbortext authored EPMDocuments when they are checked in, when a user creates a representation via the Create Representation Wizard, or when the EPMDocument is included in scheduled publishing. A PDF file is created by the Worker and stored as part of the Representation. The DefaultPostPublishDelegate is invoked when the Worker completes the creation or iteration of a WTDocument whose content is the PDF created by the Worker.
* 
The use of Substitution Keys to define the Name of the WTDocument that is created/iterated.
Several <publish> elements make use of the same <param-set>.
<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="ARBORTEXT">
<param-set name="Share with WTDocument">
<post-publish name="delegate">com.ptc.wvs.server.publish.
DefaultPostPublishDelegate</post-publish>
<post-publish name="name">{OUTPUT_TYPE} {AUTHORING_APP}
{EPM_NUMBER}</post-publish>
<post-publish name="published-content-link">create</
post-publish>
</param-set>
<publish on="checkin" output="PDF" param-set="Share with
WTDocument"/>
<publish on="create-representation" output="PDF" param-set=
"Share with WTDocument"/>
<publish on="schedule" output="PDF" param-set="Share with
WTDocument"/>
</authoring-application>
</rules>
Creating Arbortext Documents from CAD Documents
This example publishes Creo Parametric and SolidWorks authored EPMDocuments. If the EPMDocument has a global attribute named PUBLISH TO ARBORTEXT, or if a user manually invokes Post Publishing on an existing Representation, the EPMPostPublishDelegate is invoked to create/iterate an Arbortext authored Dynamic Document.
* 
Multiple Authoring Applications are making use of a single <param-set>.
All Creo Parametric and SOLIDWORKS authored EPMDocuments is published, but the EPMPostPublishDelegate is only invoked for those that have the specified global attribute (its value is not considered).
The EPMPostPublishDelegate can be invoked by the user for any Representation previously published by these Authoring Applications.
<rules xmlns="http://www.ptc.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd">
<param-set name="Share with Arbortext">
<post-publish
name="delegate">com.ptc.wvs.server.publish.EPMPostPublishDelegate</
post-publish>
<post-publish name=”type”>DynamicDocument</post-publish>
<post-publish name="cad-authoring-application">ARBORTEXT</
post-publish>
<post-publish name="cad-type">PUB_CADVIEWABLE</post-publish>
<post-publish name="name">GDD from {AUTHORING_APP} {EPM_NUMBER}</
post-publish>
<post-publish name="published-content-link">create</post-publish>
</param-set>

<authoring-application name="PROE">
<epm-iba iba="PUBLISH TO ARBORTEXT">
<publish on="checkin" param-set="Share with Arbortext"/>
<publish on="create-representation" param-set="Share with
Arbortext"/>
<publish on="schedule" param-set="Share with Arbortext"/>
</epm-iba>

<publish on="checkin"/>
<publish on="create-representation"/>
<publish on="schedule"/>
<publish on="manual-post" param-set="Share with Arbortext"/>
</authoring-application>

<authoring-application name="SOLIDWORKS">
<epm-iba iba="PUBLISH TO ARBORTEXT">
<publish on="checkin" param-set="Share with Arbortext"/>
<publish on="create-representation" param-set="Share with
Arbortext"/>
<publish on="schedule" param-set="Share with Arbortext"/>
</epm-iba>

<publish on="checkin"/>
<publish on="create-representation"/>
<publish on="schedule"/>
<publish on="manual-post" param-set="Share with Arbortext"/>
</authoring-application>
</rules>