Activity Diagram Notations and Symbols
Initial State
The state where the activities or processes start is known as Initial State. Usually, there is only one initial state. All the activities start from the initial state.
It is represented by a black filled circle.
Notation of Initial State
Decision Box
It is used to decide the flow of the activity based on the condition.
A diamond state box represents it. The Yes and No indicate the user's direction based on whether the condition is satisfied or not. The outgoing nodes from the decision box are greater than or equal to 2. However, the user can only choose one node from the decision box based on the condition.
Notation of Decision box
Action Box
The box where actions are performed is known as the action box. A rectangular box with oval sides is used to represent the Action box.
Action box representation
Control Flow
The control flow shows the flow from one diagram to another. The control flow is also known as Action flow.
It is represented by an arrow.
Fork
A control node that splits the node into multiple concurrent activities is a fork.
Representation of fork
Join
Join is used to converge multiple concurrent activities. It can join two or more concurrent activities into a single activity.
The below figure shows the join of two concurrent processes.
Figure showing a join of two concurrent processes.
Merge Event
Merge event is used to converge multiple sequential activities.
Figure shows merge event.
Swimlanes
It is used to group similar activities into one column. Swimlanes provide clarity to the UML diagram. A swimlane diagram can be vertical or horizontal.
Figure shows Swimlane diagram
Final State
The state where the activity ends is known as the final state. The final state is also known as the end state. It is represented by a filled circle within a circle notation.
A process can have a multiple Final States. Thus a process can end at more than one state.
Notation of Final state
Also read about V Model in Software Engineering
FAQs
-
What is an activity diagram?
The activity diagram is a flowchart that shows us the control flow from the start state to the end state.
-
Why do we use an activity diagram?
An activity diagram is used to understand the working of the process in detail. Using an activity diagram, we can explain the workflow of the process to someone in an understandable way.
-
What are the components of an activity diagram?
Some of the components of an activity diagram are Swimlanes, Joins, Forks, Pins etc.
-
How many initial and final states are there in an activity diagram?
There is only one initial state in an activity diagram unless it is a nested diagram. But there can be single or multiple final states in an activity diagram.
-
What is a concurrent process?
It is a process in which two or more processes execute instructions simultaneously for achieving better performance.
-
What is the difference between merge event and join?
Join is used to converge multiple concurrent processes, while the merge event is used to converge multiple sequential processes.
Key Takeaways
In this article, we have extensively discussed the UML activity diagram. We also discussed components and the notation of the UML activity diagram in detail.
We hope that this blog has helped you enhance your knowledge regarding activity diagrams and if you would like to learn more, check out our articles on:
Check out Coding Ninjas Studio to learn more about cyber security, computer networks, OOPs, DBMS, competitive programming, DSA, attempt mock tests, interview preparation, and much more.
Do upvote our blog to help other ninjas grow.
Happy Learning!!!