Activity Diagram
Compiled by - Nazmus Sakib Akash
What is Activity Diagram
- Activity diagram is another important diagram in UML to describe the dynamic
aspects of the system.
- Activity diagram is basically a flowchart to represent the flow from one activity to
another activity. The activity can be described as an operation of the system.
- The control flow is drawn from one operation to another. This flow can be
sequential, branched, or concurrent. Activity diagrams deal with all type of
flow control by using different elements such as fork, join, etc.
Purpose of Activity Diagram
- The basic purposes of activity diagrams is to capture the dynamic behavior of
the system.
- Activity diagram is used to show message flow from one activity to another.
The purpose of an activity diagram can be described as −
● Draw the activity flow of a system.
● Describe the sequence from one activity to another.
● Describe the parallel, branched and concurrent flow of the system.
What is an Activity?
- Activity is a particular operation of the system.
- Activity diagrams are not only used for visualizing the dynamic nature of a
system, but they are also used to construct the executable system by using
forward and reverse engineering techniques.
- The only missing thing in the activity diagram is the message part.
How to draw Activity Diagram?
- Activity diagrams are not exactly flowcharts as they have some additional
capabilities. These additional capabilities include branching, parallel flow,
swimlane, etc.
- Before drawing an activity diagram, we should identify the following elements:
● Activities
● Association
● Conditions
● Constraints
Once the above-mentioned parameters are identified, we need to make a mental layout of the
entire flow. This mental layout is then transformed into an activity diagram.
Sample: Order Management System
Following diagram is drawn with the four main activities −
● Send order by the customer
● Receipt of the order
● Confirm the order
● Dispatch the order
- After receiving the order request, condition checks are performed to check if it
is normal or special order. After the type of order is identified, dispatch activity
is performed and that is marked as the termination of the process.
Order Management System (2)
Where to use Activity Diagram
- It is clear that an activity diagram is drawn from a very high level.
This high-level view is mainly for business users or any other person who is
not a technical person.
Activity diagram can be used for −
● Modeling workflow by using activities.
● Modeling business requirements.
● High level understanding of the system's functionalities.
● Investigating business requirements at a later stage
Swimlanes