Document Attributes Example using the EnumTypeConstant
The following example shows the out-of-the-box XML that sets the docType and department attributes for a document. These attributes are not displayed in the user interface but must be supplied with values. PTC provides object initialization rules that supply values for these attributes. To display these attributes, customization of the user interface is required.
The wt.rule.algorithm.EnumTypeConstant algorithm requires the following arguments:
The class name of the class that defines the enumerated list of constants
The default constant
This example is formatted to fit the page. Always enter each tag on one line:
<AttributeValues objType="wt.doc.WTDocument">
<!-- set the doc type - enumerated type, this field is no longer displayed
in the UI so just default it -->
<AttrValue id="docType" algorithm="wt.rule.algorithm.EnumTypeConstant">
<Arg>wt.doc.DocumentType</Arg>
<Arg>$$Document</Arg>
</AttrValue>

<!-- set the department type - enumerated type, this field is no longer displayed
in the UI so just default it -->
<AttrValue id="department" algorithm="wt.rule.algorithm.EnumTypeConstant">
<Arg>wt.doc.DepartmentList</Arg>
<Arg>ENG</Arg>
</AttrValue>
</AttributeValues>
War dies hilfreich?