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:
  1. 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.
  2. Type a name and press Enter.
  3. 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 Add UML > Action, type a name and press Enter.
    • To create a new activity diagram, click Add Diagram > Activity Diagram.
    • To associate an existing diagram, in the Model Explorer view, drag an activity onto an activity in the diagram editor.
  4. 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.

Parent topic: Modeling object behavior by using state machine diagrams

Related concepts
States, regions, and transitions

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.