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 de valeurs non modifiables et générées automatiquement pour le numéro
  
Configuration de valeurs non modifiables et générées automatiquement pour le numéro
Dans cet exemple, seul le numéro est généré automatiquement à l'aide de la règle d'initialisation d'un objet indiquée et la nouvelle valeur n'apparaît pas dans la fenêtre Nouveau nom qui au lieu de cela, affiche la chaîne "(Generated)". Ce champ n'est pas modifiable. Ce scénario correspond au comportement par défaut à la livraison.
Exemple :
- <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 number to a generated number
-->
- <AttrValue id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.Number
Generator">
<Arg>{GEN:wt.enterprise.SequenceGenerator:EPM_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</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.GetServerAssignedConstraint" />
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint" />
</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" />
<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>