Creating a Struct property

You use a Struct property to group primitive type properties.

About this task

You then create an extension model file and attach it to a rule model element.

Attention:

Do not use a reserved SQL keyword as the name of a property.

Procedure

To create a Struct property:

  1. Create or open an extension model file.
  2. In the Rule Model Extension Editor, right-click the extension model entry and then click New Child  > Struct.

    The tree displays a new Struct item.

  3. Select the Struct item and, in the Properties view, set the Name property to the name of the new Struct property.
  4. To add properties to the Struct property, right-click the Struct property, click New Child  > Property, and then edit the properties as required.
  5. Right-click the rule model element to which you want to attach the Struct property and then click New Child  > Property.

    The tree displays a new Property item.

  6. Select the Property item and, in the Properties view, set the following properties:
    • Set the Name property to the name of the item as you want it to display in the Properties view.

    • Set the Type property to the name of the Struct property.

  7. Save the extension model file.

Results

You have now created a Struct property and attached it to a rule model element.

In XML, you create a Struct property as follows:

<struct>
   <property name="status" type="Status"/>
   <property name="author" type="String"/>
</struct>
Note:

The Struct property type is not supported for event assets.