Ignore XML Attribute
The ignore attribute identifies whether to ignore one of the following:
Setting the specified object attribute value when an object is created (when the attribute is used in the AttrValue tag)
Using the constraints specified (when the attribute is used in the AttrConstraint tag)
Using the variable definition (when the attribute is used in the VarDef tag)
You can specify ignore="true" or ignore="false". The default value is false.
Specifying ignore="false" has no effect on the attribute value assigned when an object of the type specified in the rule is created and no effect on the constraints.
Specifying ignore="true" in the AttrValue tag indicates that when an object of the type specified in the rule is created, no value is assigned to the attribute. It behaves as if no AttrValue element is defined for the attribute.
Specifying ignore="true" in the AttrValue tag is useful when a rule in a parent context has specified an attribute value for a specific object type (for example, a document folder path) and you do not want any folder attribute value set when a document is created in the child context. For example, assume that the following rule is set in the site context:
<AttributeValues objType="wt.doc.WTDocument">
<AttrValue id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTDOCUMENTID_seq:10:0}</Arg>
</AttrValue>
</AttributeValues>
Notice that the AttrValue element for number in this rule does not include the optional final or ignore attributes.
Also assume that the following rule is set in a product context (which is a child of the site context):
<AttributeValues objType="wt.doc.WTDocument">
<AttrValue id="number" ignore="true"/>
</AttributeValues>
In this example rule, the AttrValue element for the number includes the optional ignore attribute. Therefore, since the resulting composite rule in the product context uses the child rule, the composite rule used when creating documents in the product context prevents a number value from being set.
Specifying ignore="true" in the AttrConstraint tag indicates that when an object of the type specified in the rule is created, an attribute is not constrained according to the composite rule that is in effect. It behaves as if no AttrConstraint element is defined for the attribute. This means that there are no constraints in effect. When there are no constraints, the field for the attribute is a text field.
Specifying ignore="true" in the VarDef tag indicates that when an object of the type specified in the rule is created, ignore the variable definition in this VarDef tag in the composite rule that is in effect. It behaves as if no VarDef element is defined for the variable. This means that the variable must be defined in another VarDef tag that is in the set of rules used to create the composite rule.
Isto foi útil?