If you want a runtime object to change its State on a Transition, you need to define a Trigger on the Transition by assigning an Event Type to a Transition. A runtime object will change its State when it receives a Trigger on the Transition. A Trigger can be a Signal Event, a Time Event, or a Change Event.
The StopWatch's State Machine diagram with defined Triggers on the Transitions.
Tip
Optionally, you can also use a Send Signal Action of an Activity as a Signal Event of Transition. As shown in the following figure, the stopped State can wait for the off Send Signal Action of the do Activity to proceed to the final State.
The off Send Signal Action of the do Activity as a Signal Event of Transition.
Note
According to UML Version 2.5.1, the initial Transition must not have Triggers or Guards. However, Simulation provides the validation rule to prevent the model error by displaying a warning in the Validation Results panel. You can select the Check Model Before Execution option in the Simulation Project options through validation and verification or manually select Pre-execution constraints from the Validation Suite drop-down list in the Validation dialog.
Related page