Create a UML activity diagram

Activity diagram detailing the internal action states an object undergoes in its lifetime

Callout 1 The initial state is the state of an object before any events in the diagram have acted upon it.

Callout 2 An action state is a type of state that represents a completed activity.

Callout 3 A transition from an action state occurs when the action state's internal action is complete.

Callout 4 To indicate concurrent activities that must be completed before the next activity can occur, use a join transition.

Callout 5 Double-click transitions from action states to label them with guard conditions and action expressions.

Callout 6 To indicate activities that can occur in parallel, use a fork transition.

callout 7 The final state represents the completion of activity in the situation the diagram represents.

  1. Open the UML model diagram that contains the UML element for which you want to create an activity diagram.

  2. In the tree view, right-click the icon for the package, subsystem, class, operation, or use case in which you want to create an activity diagram. Point to New, and then click Activity Diagram.

    A blank page appears, and the UML Activity stencil becomes the top-most stencil. The workspace displays 'Activity' as a watermark. An icon representing the diagram is added to the tree view.

    Note: If the tree view is not visible, on the UML menu, point to View, and then click Model Explorer.

  3. If you want to indicate responsibility in the activity diagram, drag a Swimlane shape onto the page for each class, person, or organizational unit you want to represent.

    Create swimlanes in an activity diagram

    1. In an activity diagram, drag a Swimlane shape onto the drawing page.

    2. Double-click the shape to add a name and other property values.

    3. Repeat steps 1 and 2 until you've added all the partitions or organizational units you need.

    4. Drag the side selection handles on the Swimlane shapes to make the lanes the size you want.

    5. Drag State, Action State, Object In State and Signal Receipt or Signal Send shapes into the areas defined by the swimlanes and connect them using Control Flow and Object Flow shapes.

  4. Drag an Action State or State shape onto the drawing page for each action or activity state you want to represent. Use the Initial State and Final State shapes to represent initial and final pseudo states. Work with state shapes in UML statechart and activity diagrams

  5. Connect Control Flow shapes to State shapes to indicate the change from one state to another.

    Indicate the flow of control in an activity diagram

    1. In an activity diagram, drag a Control Flow shape onto the drawing page.

    2. Glue the Control Flow shape endpoint (without the arrowhead) to a connection point Connection point image - blue X on the source Action State or State shape.

    3. Glue the Control Flow shape endpoint (with an arrowhead) to a connection point on the destination Action State or State shape.

    4. Double-click the Control Flow shape to add a transition string, including an event, guard condition, action expression, and more.

  6. Use the complex transition shapes, Transition (Fork) or Transition (Join), to represent the forking of one action state into multiple parallel states, or the synchronization of multiple action states into one state. Work with transition shapes in UML statechart and activity diagrams

  7. If you want to replace transition strings with signal icons, use the Signal Send and Signal Receipt shapes to represent the signals.

  8. Double-click any shape to open its UML Properties dialog box where you can add a name, transition string, guard condition, deferred events, and other properties.

  9. Save the diagram.

Connect with an expert
Contact us
Expand your skills
Explore training

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×