Specialized Administration > Tailoring Business Objects > Object Initialization Rules Administration > Working with Object Initialization Rules > Specifying Rules > Optional AttrValue, AttrConstraint, and VarDef Attributes > Specifying Both final and ignore XML Attributes
  
Specifying Both final and ignore XML Attributes
You can specify both the final and ignore attributes in the same rule or same set of rules. For example, assume the following rule is set in the site context:
<AttributeValues objType="wt.doc.WTDocument">
<AttrValue id="number" final="true" ignore="true"/>
</AttributeValues>
This example rule establishes that no default number value is set when documents are created in all associated contexts. This rule is used in all contexts because the rule is set in the site context and has the final="true" set. If other rules for document folder values are created in child contexts, they are not used in the composite rule (even if the final="true" attribute is included). The parent rule containing final="true" is always used.
If two rules in different contexts are created for the same object type and attribute value, where one rule has final="true" specified and the other rule has ignore="true" specified, the rule in which final="true" is specified takes precedence. 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" final="true">
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTDOCUMENTID_seq:10:0}</Arg>
</AttrValue>
</AttributeValues>
Notice that the AttrValue element for folder object in this rule includes the optional final attribute.
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>
The merging of these two rules to form the composite rule results in the number value being set for documents created in the product context as defined in the site context. This is because the rule set in the site context includes final="true" and this rule sets a generated number as the number argument.