Global rules and variable changes
When there is a transition to a state, a 'variable' changes expression in a global rule can be initially true or false.
In a global rule, the 'variable' changes expression is initially true when all of the following are true:
In a previous active state, the
'variable' changes expression became true but there was a transition to another state before the associated rule was triggered.
Since the
'variable' changes expression became true, it has not triggered execution of an action.
The scenario has not passed through a state for which this global rule was deactivated.
Remember that when a true 'variable' changes expression triggers a rule, the Event Modeler resets the value of the 'variable' changes expression to false.
In a global rule, the 'variable' changes expression is initially false in each of the following situations:
The active state is the first state during scenario execution for which the global rule is activated.
The global rule was not activated in a previous state and since that state was active the variable of interest has not changed.
The global rule was triggered in a previous state and since that state was active the variable of interest has not changed.
For example, suppose states 1, 2, and 3 each define global rule X, which specifies price changes as its condition. There is a transition to state 1. Initially, the price changes expression is false, but while state 1 is active the price variable changes and the price changes expression becomes true. However, there is a transition to state 2 before execution triggers global rule X. Global rule X is activated for state 2 but there is a transition to state 3 before execution triggers global rule X in state 2. In state 3, the price changes expression is still true. Execution triggers global rule X, performs the associated action, and resets the price changes expression to false. If global rule X has not been activated for state 2, or if global rule X has been triggered in state 2, then the price changes expression would have been false when state 3 become active.