Work with state shapes in UML statechart and activity diagrams

Add an internal action or activity to a state in a statechart or activity diagram

  1. In a statechart diagram or activity diagram, double-click the State shape you want to add the internal action or activity to.

  2. In the UML State Properties dialog box, click Internal Transitions.

  3. Type a name for the transition.

  4. Click Properties. Choose the event you want. To create a new event, click Events, click New, choose the kind of event you want, and then click OK.

  5. Type a name for the event and type or choose the other property values you want. Click a tab to add constraints, tagged values, or parameters, depending on the type of event you're creating. Click OK until you return to the Transition tab (UML Transition Properties dialog box).

  6. Select Guard to add a guard condition, and then in the text box, type the guard condition you want.

  7. Under Language, choose the language you want.

  8. Click the Actions tab, and then click New to create an action expression. Choose the kind of action you want. Click OK, and then click Properties.

  9. Type a name for the action and type or choose the other property values you want. Click a tab to add details, arguments, constraints, or tagged values. Click OK until you return to the Internal Transitions tab, and then click OK again.

By default, internal actions are hidden on a State shape. To show the internal actions, right-click the shape, and then click Shape Display Options. Under Suppress, clear the Transition check box.

Add entry and exit actions to a state in a statechart or activity diagram

  1. On a statechart diagram or activity diagram, double-click the State shape you want to add an entry or exit action to.

  2. In the UML State Properties dialog box, click Entry or Exit, and then click New.

  3. Choose the action type you want, and then click OK. Type a name for the action.

  4. Click Properties to add details, arguments, constraints or tagged values. Click OK until you close the UML State Properties dialog box.

By default, entry and exit actions are hidden on a State shape. To show the actions, right-click the shape, click Shape Display Options, and then clear Transition.

Defer events on an action state in an activity diagram

  1. In the tree view or in an activity diagram, double-click the icon or shape representing an action state.

  2. Click Deferred Events.

The events available in the package to which the action state belongs are listed. Select the events you want to be deferred by the state.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×