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.
You can click either Horizontal Swimlane or Vertical Swimlane on the diagram toolbar.
Click on the diagram to create the swimlane.
Double-click the partition name to rename it.
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.
A partition is inserted.
Creating initial node
Click Initial Node on the diagram toolbar.
Click inside the partition to create the initial node there.
- Move your mouse pointer over the source shape.
- Press on the Resource Catalog button and drag it out.
- Release the mouse button at the place where you want the action to be created.
- Select Control Flow -> Action from Resource Catalog.
- 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.
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.
- In the Edit Scenarios window, click Add… button at the bottom left corner.
- Select a path for generating scenario. Click OK to confirm.
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.
- 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.
- Click on the arrow beside the Generate button and select the type of diagram of the 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.