範例程式碼
檔案 ChangeMgmtInitRules.xml 中的已更新物件初始化規則 (OIR):
變更通知或任務範本
一般變更通知或任務
生命週期範本
基本
變更通知生命週期
數目
10 位數的數目
5 位數的數目
<!-- set the lifecycle -->
<AttrValue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">
<!-- if (template.templated) -->
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<!-- test this value -->
<Attr id="template.templated"/>
<!-- if true -->
<Arg>Basic</Arg>
<!-- if false -->
<Arg>Change Notice Life Cycle</Arg>
</Value>
</AttrValue>
<!-- set the number to a generated number -->
<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<!-- if (template.templated) -->
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<!-- test this value -->
<Attr id="template.templated"/>
<!-- if true -->
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTCHANGEORDERID_seq:10:0} </Arg>
<!-- if false -->
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTCHANGEORDERID_seq:5:0} </Arg>
</Value>
</AttrValue>
Windchill 程式碼中的使用範例
<Windchill>/loadFiles/pdmlink/ChangeMgmtInitRules.xml
這是否有幫助?