Activity diagrams will be used in software development. Business analyst will use the tool by drawing a flow chart to explain how the system should function to achieve business goals. It is popular than other UML diagram types.
In this activity diagram blog, we will cover the below topics in order to understand better.
- What is an Activity diagram?
- How to Draw an Activity Diagram?
- Activity Diagram Symbols
- Activity Diagram Examples
What is an Activity diagram?
A UML activity diagram helps to visualize a specific use case in more detailed level. Activity diagram may be a flow chart and it is to represent flow from one activity to another. Activity can also be described as an operation of system. Activity diagrams are not only used for visualizing but will also use to construct the executable system by using forward and reverse engineering techniques.
How to Draw an Activity Diagram?
Activity diagrams are used as a flowchart and can be used for business requirements, analyze use cases and to create a high-level view of a system’s functionalities. For each use case we have to draw an activity diagram from the beginning by following below steps;
Step 1: Identify various activities, actions of a business process or system.
Step 2: If we figure out who are the actors, then it’s easy to discern each action which they are responsible for.
Step 3: Figure out in which order the actions they have to be processed. Mark down the conditions which carry out certain processes, actions those occur at the same time and also we need to find out whether we should add any branches in the diagram.
Step 4: Add swim lanes
Once, you found out who is liable for each action then we’d like to assign them a swim lane and group each action they’re liable for under them.
Activity Diagrams with Swim lanes
In activity diagrams swim lanes are used for group actions which are carried out by different actors in a single thread. Below are the few tips you can follow while using swim lanes.
- Add swim lanes to linear processes. It makes it easy to read.
- Do not add more than 5 swim lanes.
- We need to arrange swim lanes in a logical manner.
Activity Diagram Symbols
|Start/ Initial Node||Initial state of an activity|
|Activity / Action State||An activity represents execution of action, process or object.|
|Action||It is used to represent the executable sub-areas of an activity|
|Control Flow / Edge||Used to represent the transition from one action to the other.|
|Object Flow / Control Edge||Used to represent the path of objects moving through the activity|
|Activity Final Node||It is used to mark the end of all control flows within the activity.|
|Flow Final Node||To mark the end of a single control flow.|
|Decision Node||If we have to make a decision before the flow of control then we use decision node.|
|Merge Node||Used to represent the merging of flows. It might have several inputs.|
|Fork||Used to represent a flow into two or more parallel flows|
|Merge||It is used to merge two inputs into one output.|
|Signal Sending||Signal can be used for sending a signal to an accepting activity|
|Signal Receipt||IT represents that the signal is received|
|Note/ Comment||This can be used to add relevant comments to elements.|