You can reference triggers on transitions or in states.
To reference a trigger on the transition
1. Click the transition to highlight it in purple; then right-click and select Properties.
2. Under Available Triggers, select the trigger and click Add.
The trigger is added to Selected Trigger and Edit Behavior.
3. Click OK, or press ENTER.
To reference a trigger in a state, composite state, or submachine
1. Right-click the Header portion of the state.
2. Click the Activity Manager tab.
3. Under Actions, select On trigger/event.
4. Under Available Triggers, select the trigger and click Add Action.
In Selected Actions, the On trigger/event action is displayed.
5. In Edit Behavior, edit the trigger code.
6. Click OK, or press ENTER.