1. Home
  2. Docs
  3. Chapter 5. UML & Requirement Diagram
  4. 6. Activity Diagram
  5. How to draw a Activity Diagram in UML

How to draw a Activity Diagram in UML

Download PDF

Activity diagram is a kind of UML diagram that shows flow of control from activity to activity. It shows concurrency, branch, control flow and object flow. Furthermore, swimlane is used for partitioning actions based on the participants involved.

Creating activity diagram

Perform the steps below to create a UML activity diagram in Visual Paradigm.

  1. Select Diagram > New from the application toolbar.
  2. In the New Diagram window, select Activity Diagram.
  3. Click Next.
  4. Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
  5. Click OK.

Creating swimlane

You can click either Horizontal Swimlane or Vertical Swimlane on the diagram toolbar.

Create swimlane
Click on the diagram to create the swimlane.

Swimlane created
Double-click the partition name to rename it.

Rename partition

Inserting partition to swimlane

To insert partition to swimlane, right-click on a partition and select either Insert Partition Before or Insert Partition After from the pop-up menu.

Insert partition to swimlane
A partition is inserted.

Partition inserted

Creating initial node

Click Initial Node on the diagram toolbar.

Create initial node
Click inside the partition to create the initial node there.

Initial node created

Creating action

  1. Move your mouse pointer over the source shape.
  2. Press on the Resource Catalog button and drag it out.
    Using Resource Catalog
  3. Release the mouse button at the place where you want the action to be created.
  4. Select Control Flow -> Action from Resource Catalog.
    To create a action
  5. A new action will be created and is connected to the source shape with a control flow. Enter its name and press Enter to confirm editing.
    Action created

Working with scenario

A scenario is a diagram formed by the internal interaction of a sequence of action, modeled by their sub-diagrams. With scenario, you can produce a diagram which presents an overview of an execution path in activity diagram, so as to know how user and system communicate with each other in order to complete the flow.

Producing scenario from activity diagram

  1. Right click on the activity diagram that contains the flows that you want to produce a scenario and select Scenarios > Edit Scenarios… from the popup menu.
    Edit scenarios
  2. In the Edit Scenarios window, click Add… button at the bottom left corner.
  3. Select a path for generating scenario. Click OK to confirm.
    Select a path for generating scenario
    Note: A path is a continuous flow of actions in the diagram, with an initial node placed at the beginning of the actions. Multiple paths are obtained by determining the existence of decision nodes within the flow.
  4. Name the scenario. Add description if necessary.
    Name and describe scenario
  5. The actions being involved in the flow are listed in the Path table. For actions that have sub-diagram(s), pick up the sub-diagram in Diagram column or just create a new one. You may, however, leave it unspecified which cause that action to be ignored when producing scenario.
    Select diagram for action
  6. Click on the arrow beside the Generate button and select the type of diagram of the scenario.
    Generate scenario with specific diagram type

Updating scenario

Whenever the sub-diagram(s) of action(s) are updated, you can update the scenario to make it represents the latest information of interaction. To update scenario, right click on the activity diagram that have scenario produced before, select Scenarios, then the name of scenario from the popup menu.