You define an enumeration property in an extension model
file, and specify the enumeration values in an extension data file.
About this task
Attention: Do not use a reserved SQL keyword
as the name of a property.
Procedure
To create an enumeration property:
- Create or open an extension model file.
- In the Rule Model Extension Editor, right-click the extension
model entry and then click .
The tree
displays a new Enum item.
- Select the Enum item and, in the Properties
view, set the Name property to the name of
the new enumeration.
- Right-click the rule model element to which you want to
attach the enumeration property and then click .
The tree displays a new Property item.
- Select the Property item and, in the Properties
view, set these properties:
- Save the extension model file and then create or open an
extension data file.
- In the Rule Model Extension Editor, right-click the extension
data entry and then click .
The
tree displays a new Enum Data item.
- Select the Enum Data item and, in the Properties
view, set these properties:
- Save the extension data file.
Results
You have now created an enumeration property and attached
it to a rule model element.
In XML, you
create an enumeration property as follows:
In the extension model file:
<class extends="ActionRule" name="MyRule">
<property name="state" type="State"/>
</class>
<enum name="States"/>
In the extension data file:
<enum-data name="State">
<item>New York</item>
<item>New Hampshire</item>
<item>Rhode Island</item>
</enum-data>