Transition guards denote the conditions under which the flow passes from one path to another. Two transitions come from the GetToday
function task. To make the ruleflow valid, those two transitions must have guards, that is, Boolean conditions that will tell the engine what node must be triggered after invoking GetToday
.
-
Double-click the transition linking
GetToday
to GreetingDiscount
. A dialog box appears in which you can edit the guard.
-
Select the
if
radio button and type the line shown in Figure 9.15 in the text field:
Note |
This text field must contain an IRL Boolean expression. |
-
Figure 9.15 Transition Guard Editor Example
-
Close the dialog box by clicking OK.
- In the ruleflow, the transition label now displays the value of the guard. You can change this to a more readable name by editing the
label
property of the transition in the Property Sheet. -
Click the transition and type "Is it Sunday?" in the
label
field of the Property Sheet.
- The transition label now says "Is it Sunday?".
-
Double-click the transition linking
GetToday
to the end node.
-
When the dialog box appears, select the
else
radio button. This sets the transition as the default path.
-
Close the dialog box by clicking OK.
The creation of the ruleflow is now complete. Your diagram should appear similar to that in Figure 9.7.
See Also
Ruleflow Editor | Repository Element Property Reference | Working With the Property Sheet
|