Guards
A guard is a condition that the machine checks when it goes through an event. If the condition is true, the machine follows the transition to the next state. If the condition is false, the machine follows the rest of the conditions to the next state. Any transition can be a guarded transition.
Add a guard to an event
First, select the event where you want to add a guard. Then…
Using the + Transition button
- Use the + Transition button to replace your event with a guarded transition.
- Name your guard by replacing the New guard text inside the event.
Using the quick actions menu
- Right-click the event to bring up the quick actions menu.
- Choose Add guard from the options in the quick actions menu to replace your event with a guarded transition.
- Name your guard by replacing the New guard text inside the event.
Using the Transition details panel
- Open the Transition details panel from the right tool menu.
- Use the Guard text input to name your guard and replace your event with a guarded transition.
Use the + Transition button to create more guards on the same transition.