Setting Up the Object Initialization Rules
Set up the Object Initialization Rules so that the Object is associated with the newly created Lifecycle, and takes the StateBased versioning scheme where the seeds are defined.
The example below shows a modified initialization rule for a WTPart.
<AttributeValues objType="wt.part.WTPart">
<!-- set the folder -->
<AttrValue id="folder.id"
algorithm="com.ptc.core.foundation.folder.server.impl.
FolderPathAttributeAlgorithm">
<Arg>/Default</Arg>
</AttrValue>

<!-- set the lifecycle -->
<AttrValue id="lifeCycle.id"
algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplate
Attribute
Algorithm">

<Arg>
<!-- Translation of the word "Basic" must be the same as
the translation done in commonLifeCycles.xml -->
<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match= "commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Prototype_Reject<?loc-end?>
</Arg>
</AttrValue>

<!-- set the team template -->
<AttrValue id="teamTemplate.id"
algorithm="com.ptc.core.foundation.team.server.impl.TeamTemplateAttributeAl
gorithm"
>
<Arg>Default</Arg>
</AttrValue>

<!-- set the number to a generated number -->
<AttrValue id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.Number
Genera
tor">
<!-- add a V prefix for variant parts -->
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<Value algorithm="wt.rule.algorithm.EqualsTest">
<Attr id="genericType"/>
<Arg>variant</Arg>
</Value>
<Arg>V</Arg>
<Arg></Arg>
</Value>

<!-- the sequence -->
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>
</AttrValue>

<!-- set the version info to a generated version info -->
<AttrValue id="MBA|versionInfo"
algorithm="com.ptc.core.foundation.vc.server.impl.VersionInfoGenerator">
<Arg>wt.series.HarvardSeries.MyStateBased</Arg>
</AttrValue>
</AttributeValues>
* 
If this rule is defined at Site or Organization level, object initialization rules defined at context level may need to be disabled.
Was this helpful?