Rule model API

Rule Designer and Decision Center both use the Eclipse Modeling Framework (EMF) to define the rule model. All rule artifacts are instances of the IlrElement interface.

To customize Rule Designer or Decision Center, you manipulate artifacts handled by these two environments. You can carry out the customization once for both environments using a common interface to access and query artifact properties.

All rule artifacts are instances of the IlrElement interface.

The IlrElement interface provides methods that you can use to manipulate the artifacts. The method eClass returns the EMF class of which the artifact is an instance.

In EMF, properties are represented by the EStructuralFeature interface. You use the methods getPropertyValue(String) and getPropertyValue(EStructuralFeature) to retrieve the property values of an artifact based on the name of the property, or on the property object itself.

The method getPropertyValue returns a collection when the property cardinality is greater than 1. The method getPropertyValue boxes the return value when the property type is a primitive type.

The method isInstanceOf(String className) specifies if an artifact is an instance of an EClass whose fully qualified name is className.

You can access the API specific to Rule Designer or Decision Center by casting IlrElement to a specific type. Your code then becomes platform-specific.