Apama Documentation : Developing Apama Applications : Developing Apama Applications in Event Modeler : Overview of Using Event Modeler : How rules define scenario behavior : About rule evaluation
About rule evaluation
When scenario execution enters a state, the rules of that state are examined in the order they are defined. If there are global rules as well as local rules, Event Modeler evaluates the first global rule first.
The first rule's condition is checked to verify whether it is true or false.
If the condition is false, then execution moves on to the next rule, and the procedure is repeated in the same way for that rule. If there are global rules, the next rule is the next global rule. If there are no more global rules, the next rule is the first local rule. If Event Modeler processes all rules assigned to a state, the order is top to bottom in the combined Global and Local Rules panel.
If, on the other hand, the rule's condition is true, then its action part is processed. The action statements are executed, and then the state transition statement is examined. If it is continue, then execution moves on to the next rule. If, on the other hand it is move to state [some state] then the scenario will proceed directly to that state and ignore all other rules. Their conditions will not be reviewed and their action parts never processed. In the new state, the same procedure highlighted here is followed.
Note that as stated previously continue, and move to state [this same state] are different. The former causes execution to proceed to the next rule, while the latter causes the state's execution to restart from the first rule as if we had entered this state from a completely different state.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback