How to Draw Activity Diagram?
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.
- Select Diagram > New from the application toolbar.
- In the New Diagram window, select Activity Diagram.
- Click Next.
- Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
- 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
- Move your mouse pointer over the source shape.
- Press on the Resource Catalog button and drag it out.
Using Resource Catalog - Release the mouse button at the place where you want the action to be created.
- Select Control Flow -> Action from Resource Catalog.
To create a action - 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
- 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 - In the Edit Scenarios window, click Add... button at the bottom left corner.
- 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. - Name the scenario. Add description if necessary.
Name and describe scenario - 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 - 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.
Related Resources
The following resources may help you to learn more about the topic discussed in this page.
- What is Activity Diagram? - An introductory guide to Activity Diagram
- New to Visual Paradigm? We have a lot of UML tutorials written to help you get started with Visual Paradigm
- Visual Paradigm on YouTube
- Visual Paradigm Know-How - Tips and tricks, Q&A, solutions to users' problems
- Contact us if you need any help or have any suggestion
Chapter 6. Activity diagram | Table of Contents | 2. Splitting Control Flow in Activity Diagram |