Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is a UML activity diagram?
3.
Activity Diagram Notations and Symbols
3.1.
Initial State
3.2.
Decision Box
3.3.
Action Box
3.4.
Control Flow
3.5.
Fork
3.6.
Join
3.7.
Merge Event
3.8.
Swimlanes
3.9.
Final State
4.
FAQs
5.
Key Takeaways
Last Updated: Mar 27, 2024

Activity diagram

Author HET FADIA
0 upvote

Introduction

In this article, we will explore the components of the UML activity diagram. We will also see the notations used to represent the components of the activity diagram. 

Before we see the components, it is important to understand about UML activity diagram.

What is a UML activity diagram?

UML stands for Unified Modelling Language. UML is used to visualize the blueprint of the system. UML activity diagram is used to provide the flowchart of the system. Using an activity diagram, one can understand the workflow in a system in detail.

The activity diagram shows us the control flow from the start to the end state.

The below diagram shows an activity diagram.

Activity diagram

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

  1. 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.
     
  2. 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.
     
  3. What are the components of an activity diagram?
    Some of the components of an activity diagram are Swimlanes, Joins, Forks, Pins etc. 
     
  4. 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.
     
  5. What is a concurrent process?
    It is a process in which two or more processes execute instructions simultaneously for achieving better performance.
     
  6. 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!!!

Live masterclass