Intégration avec d'autres applications > Utilisation de Creo Parametric avec Windchill > Utilisation des règles d'initialisation d'un objet pour la dénomination et la numérotation > Configuration d'une valeur identique modifiable pour le nom et le numéro
  
Configuration d'une valeur identique modifiable pour le nom et le numéro
Dans cet exemple, le numéro et le nom reçoivent la même valeur prégénérée, qui s'affiche dans les champs correspondants. Ils sont visibles et modifiables par l'utilisateur.
Exemple :
- <AttributeValues objType="wt.epm.EPMDocument">
- <!-- Define a variable to hold the generated number
-->
- <VarDef id="GeneratedNumber"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.Number
Generator">
<Arg>{GEN:wt.enterprise.SequenceGenerator:EPM_seq:10:0}</Arg>
</VarDef>
- <!-- 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 number to a generated number
-->
- <AttrValue id="number">
<VarRef id="GeneratedNumber" />
</AttrValue>
- <AttrValue id="name">
<VarRef id="GeneratedNumber" />
</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">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue" />
</AttrConstraint>
- <AttrConstraint id="name"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value
algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue" />
</AttrConstraint>
- <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" />
</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>