Adding entry, do, and exit activities to states
In UML modeling, you can add an entry, do, or exit activity
to a state to describe an activity that is performed only upon entry
into a state, exit out of a state or that is ongoing in a particular
state.
Before you can add activities to composite and
orthogonal states, you must have a state machine diagram open in
the Modeling perspective.
To add entry, do, and exit activities to states:
- Right-click a state; then click Add
UML and complete one of the following steps:
- To add an entry action to a state, click Entry.
- To add a do action to a state, click Do.
- To add an exit action to a state, click Exit.
- Type a name and press Enter.
- To associate an action or activity diagram with a do,
entry or exit activity, in the Activities compartment,
right-click an activity and complete one of the following steps:
- To create a new action, click , type
a name and press Enter.
- To create a new activity diagram, click .
- To associate an existing diagram, in the Model
Explorer view, drag an activity onto an activity in the
diagram editor.
- To associate an operation with a do, entry or exit activity,
in the Properties view, click the General tab,
click Set, in the Select Element window,
in the list, click an operation, and click OK.