Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Note: The UML statechart diagram is not available in Visio 2013 and newer versions. For information on UML diagrams in Visio 2013 and newer versions, see UML diagrams in Visio.

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.

Work with pseudostates

a pseudostate is used to combine and direct transitions.

Pseudostates include:

  • Initial state

  • Final state

  • Decision

  • Deep History

  • Shallow History

  • Transition (Join)

  • Transition (Fork)

  1. Add the shape to the diagram.

  2. Right-click the shape and select Properties.

  3. Set the properties in the dialog box:

    Property

    Description

    Name

    Type the name of the pseudostate.

    Stereotype

    Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

    Kind

    The UML Model Diagram template automatically adds the kind of pseudostate that corresponds to the element whose shape or icon you selected.

    Documentation

    Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.

See Also

Create a UML statechart diagram

Create a UML activity diagram

Points to a bookmark on a normal paragraph

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×