You can associate an activity (created on some UML 2.0 Activity Diagram) with a state (on entering the state, while doing the state activity, and on exiting the state), or with a transition between states.
To associate a transition with an activity:
- Select a transition or a state on a UML 2.0 State Machine diagram.
- Under the General node of the Object Inspector, click the Effect (for a transition) or Do activity, Entry or Exit (for a state) field.
- Click the chooser button to open the Choose Activity dialog box.
- In the model treeview, locate the desired activity.
- Click OK.
Tip: Once a guard condition or effect are specified in the Object Inspector, you can further edit them in the diagram by double-clicking the expression to activate the in-place editor.