发布规则 XML 文件示例
本节包含完整的发布规则 XML 文件示例。可在 <Windchill>/codebase/com/ptc/wvs/server/xml 目录中找到一个发布规则 XML 文件示例,PublishRules.xml。
简单的 Arbortext 发布
本例将在检入 Arbortext 创作的 EPMDocument、用户通过“创建表示向导”创建表示或安排的发布包括该 EPMDocument 时,发布所有的 Arbortext 创作的 EPMDocment。工作器将创建一个 PDF 文件并将其存储为表示的一部分。当工作器完成创建或迭代 WTDocument (其内容为工作器创建的 PDF) 时,将调用 DefaultPostPublishDelegate。
|
• 使用“替代关键字”定义要创建/迭代的 WTDocument 的名称。
• 多个 <publish> 元素都利用相同的 <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>
从 CAD 文档创建 Arbortext 文档
本例将发布 Creo Parametric 和 SolidWorks 创作的 EPMDocument。如果 EPMDocument 具有名为 PUBLISH TO ARBORTEXT 的全局属性,或用户在现有表示上手动调用了“后发布”时,则将调用 EPMPostPublishDelegate 来创建/迭代 Arbortext 创作的动态文档。
|
• 多个创作应用程序利用一个 <param-set>。
• 将发布所有 Creo Parametric 和 SOLIDWORKS 创作的 EPMDocument,但仅会为具有指定全局属性 (不考虑其值) 的 EPMDocument 调用 EPMPostPublishDelegate。
• 用户可为这些创作应用程序先前发布的任何表示调用 EPMPostPublishDelegate。
|
<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>