Extended properties

You can add extended properties to all elements of the rule model and use different types to define them. Extended properties have properties themselves.

When you add a property to a rule model class, you can define its type as:

  • Primitive: Boolean, Date, Float, Integer, Long, Character, Double, Short, String

  • Struct: A classifier that groups properties of primitive type, enumerations, and hierarchies. Struct properties are used to organize properties in logical groups.

  • Enumeration: A list of predefined String values. You must define the values in an extension data file.

  • Hierarchy: A set of predefined String values organized in a hierarchy. You must define the values and the hierarchical structure in an extension data file.

Properties associated with a primitive type or an enumeration can have a default value.

Not all properties can be extracted into a ruleset. The properties that can be extracted must have a single value, and their associated type must be a primitive type, an enumeration, or a hierarchy.

You can globalize an enumeration value by adding the percentage sign (%) as the first character of the value.

The Business console provides editors to support extended custom properties except for enumerations of complex types, multivalued enumeration, or complex types.

Attention:
  • Do not use a reserved SQL keyword as the name of a property.
  • The name of a multivalued property must be plural. For example, for a rule that is a multivalued property of state, the property must states.

Properties of an extended property

Extended properties defined in the rule model have properties themselves. These properties are the following:

Table 1. Properties of extended properties
Property Type Description
advanced boolean Indicates that the property is advanced. It is therefore visible only in the advanced view of the Properties view.
changeable boolean Indicates that the property can be edited in the Properties view. You cannot set the changeable property to not changeable if a project has been saved with a previous version of the extended model.
extractable boolean Indicates that the property must be put in the ruleset when it is extracted.
hidden boolean Indicates that the property is hidden from the Properties view.
many boolean Indicates that the property can have multiple values.
nullable boolean Indicates that the property can be set to null.
ordered boolean Indicates that the property can have ordered values. This property is valid only for properties that have multiple values.
required boolean Indicates that the property must be set.
restricted boolean Indicates that the values of an enumeration property are restricted to a specific set. If you set the restricted property to false you cannot set the property of an enumeration to a value that does not belong to that enumeration. For single-valued enumeration properties, you cannot set another value, even if the restricted property is false.
size int Indicates the maximum size of the String serialization of the property. This property can be useful for an RDBMS.
unique boolean Indicates that the same value cannot be used twice in the list of values associated with the property. This property is valid only for properties that have multiple values.