The „rule" entries serve for the realization of a situation-referred behavior. Often, business rules are also designated as situation action rules. For a formal description, we were inspired by the Event-Condition-Action (ECA)-rules, originating from the database theory.
A rule consists of three components:
Component | Description |
Event | Specifies when the rule is released. |
Condition | Defines which conditions must be fulfilled. |
Action | Describes the reaction. |
Therefore, situations are described by events and conditions. Action components of the rules specify the reactions to be executed, if the events occurred and all conditions were met.
During the release of such an event message all „condition"-entries of this rule are examined. The return value of a condition is a Boolean one (true or false). If all the conditions are met, all the actions are released, sequentially.
<component xpath="/purchaseOrder/deliveryOption"> <behaviour> <rule> <event type="changeAndInitialization"/> <condition useInverse="true"> <formulaExpression>nodeValue(".") == "A"</formulaExpression> </condition> <action> <mainAction target="../email"> <uiAction methodName="setVisible"> <param name="param (0)" type="boolean" value="false"/> </uiAction> </mainAction> </action> </rule> </behaviour> </component>
During a change of value of the „deliveryOption"-node the field „email" is displayed, if the node value corresponds to the letter A (mainAction). If this is not the case, it is not shown but faded out (inverseAction).