Activity diagrams can be used in all stages of software development and for various purposes. And because they are a lot similar to flowcharts, they are generally more popular than other UML diagram types.
In this activity diagram tutorial, we hope to cover everything you need to know about activity diagrams to learn and master it. Scroll down to find;
- What is an Activity diagram?
- Activity Diagram Symbols
- How to Draw an Activity Diagram
- Activity Diagram Examples
A UML activity diagram helps to visualize a certain use case at a more detailed level. It is a behavioral diagram that illustrates the flow of activities through a system.
UML activity diagrams can also be used to depict a flow of events in a business process. They can be used to examine business processes in order to identify its flow and requirements.
UML has specified a set of symbols and rules for drawing activity diagrams. Following are the commonly used activity diagram symbols with explanations.
|Start/ Initial Node||Used to represent the starting point or the initial state of an activity|
|Activity / Action State||Used to represent the activities of the process|
|Action||Used to represent the executable sub-areas of an activity|
|Control Flow / Edge||Used to represent the flow of control from one action to the other|
|Object Flow / Control Edge||Used to represent the path of objects moving through the activity|
|Activity Final Node||Used to mark the end of all control flows within the activity|
|Flow Final Node||Used to mark the end of a single control flow|
|Decision Node||Used to represent a conditional branch point with one input and multiple outputs|
|Merge Node||Used to represent the merging of flows. It has several inputs, but one output.|
|Fork||Used to represent a flow that may branch into two or more parallel flows|
|Merge||Used to represent a flow that may branch into two or more parallel flows|
|Signal Sending||Used to represent the action of sending a signal to an accepting activity|
|Signal Receipt||Used to represent that the signal is received|
|Note/ Comment||Used to add relevant comments to elements|
Activity Diagrams with Swimlanes
In activity diagrams swimlanes – also known as partitions – are used to represent or group actions carried out by different actors in a single thread. Here are a few tips you can follow when using swimlanes.
- Add swimlanes to linear processes. It makes it easy to read.
- Don’t add more than 5 swimlanes.
- Arrange swimlanes in a logical manner.
Activity diagrams can be used to model business requirements, create a high-level view of a system’s functionalities, analyze use cases and for various other purposes. In each of these cases, here’s how to draw an activity diagram from the beginning.
Step 1: Figure out the action steps from the use case
Here you need to identify the various activities and actions your business process or system is made up of.
Step 2: Identify the actors who are involved
If you already have figured out who the actors are, then it’s easier to discern each action they are responsible for.
Step 3: Find a flow among the activities
Figure out in which order the actions are processed. Mark down the conditions that have to be met in order to carry out certain processes, which actions occur at the same time and whether you need to add any branches in the diagram. And do you have to complete some actions before you can proceed to others?
Step 4: Add swimlanes
You have already figured out who is responsible for each action. Now it’s time to assign them a swimlane and group each action they are responsible for under them.
Following are activity diagram templates that are instantly editable. Click on the image to open them in the editor so you can make the changes online.
Activity Diagram for Login
Activity Diagram for Document Management System
Activity Diagram for Online Shopping System
Activity Diagram for ATM
Activity Diagram for College Management System
Share the Activity Diagram Tutorial
We’ve covered everything you need to know about activity diagrams in this activity diagram tutorial. Have you got more to add?
If you haven’t seen yet, we recently published an Easy Guide to UML Class Diagrams. What other UML diagram types do you want us to cover? Do let us know in the comment section below. And don’t forget to share the activity diagram tutorial with your friends.