Specifying variable changes in conditions
When you define a rule’s condition, you can choose 'variable'changes from the condition popup menu. For example:
1. Add a new rule.
2. In the new rule, right-click 'condition', which displays this popup menu: 3. Select 'variable' changes. This replaces 'condition' with 'variable' changes.
4. Right-click 'variable', which displays a menu of the variables you can specify. As you can see, this menu lists the scenario variables, and it then lists the blocks that the scenario uses. If you select a block, you can then select the variables in that block. The variable in the 'variable' changes expression can be one of the following:
Scenario variable
Block output feed
Field in a block output feed
Block parameter
When you select 'variable' changes, it can be the entire condition, or it can be an expression in a condition. Following are a few examples of specifying 'variable' changes in a condition:
When quantity changes When quantity changes or price changes When quantity is greater than 20 and price changes A changes expression can become true as follows:
When the variable in the
changes expression is a block feed, any update that causes the block to send that output feed changes the condition to true. It does not matter whether or not the values of any fields in the output feed actually change.
When the variable in the
changes expression is a scenario variable, a block field, or a block parameter, a change in the value of that variable causes the
'variable' changes expression to be true. For example, if you assign the value
5 to the
quantity scenario variable and the
quantity scenario variable already has the value
5, then there is no change and the
'variable' changes expression remains false.
Suppose that a 'variable' changes expression in a condition becomes true and the entire condition becomes true. When this happens, Event Modeler does two things:
Executes the rule’s action.
Resets the value of the
'variable' changes expression to false. This ensures that two rules that specify the same variable in a
changes expression can each trigger their action as a result of the same change.
Beyond this, the behavior of a 'variable' changes expression varies according to whether the condition appears in a global rule or a local rule.