Setting Editable Non-auto-generated Values
This example is similar to the scenario for turning off all auto-numbering, except that empty constraints are specified explicitly for number and name. This is recommended if OIRs are defined for these attributes.
Example:
- <AttributeValues objType="wt.epm.EPMDocument">
- <!-- set the folder
-->
- <AttrValue id="folder.id"
algorithm="com.ptc.core.foundation.folder.server.impl.FolderPathAttributeAlgor
ithm">
<Arg>/Default</Arg>
</AttrValue>
- <!-- set the lifecycle
-->
- <AttrValue id="lifeCycle.id"
algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttr
ibuteAlgorithm">
- <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"?>
Basic
<?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 version info to a generated version info
-->
- <AttrValue id="MBA|versionInfo"
algorithm="com.ptc.core.foundation.vc.server.impl.VersionInfoGenerator">
<Arg>wt.series.HarvardSeries</Arg>
</AttrValue>
- <!-- specify AttrConstraint tag
-->
- <AttrConstraint id="lifeCycle.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint" />
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint" />
</AttrConstraint>
- <AttrConstraint id="lifeCycle"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint" />
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint" />
</AttrConstraint>
- <AttrConstraint id="folder.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue" />
</AttrConstraint>
<AttrConstraint id="number"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints" />
<AttrConstraint id="name"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints" />
- <AttrConstraint id="teamTemplate.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint" />
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint" />
</AttrConstraint>
- <AttrConstraint id="teamTemplate"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint" />
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint" />
</AttrConstraint>
- <AttrConstraint id="organization.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
- <Value
algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue">
<Value
algorithm="com.ptc.windchill.enterprise.org.server.impl.OwningOrgDefaultAlgo
rithm" />
</Value>
</AttrConstraint>
</AttributeValues>
Was this helpful?