1. Activity Diagram
What is Activity diagram?
Activity diagram is another important diagram in UML to describe dynamic aspects of the system.
Activity diagram is a flow chart to represent the flow from one activity to another activity and describes
operation of the system.
Activity diagram is not only shows the visualizing the dynamic nature of system and construct the execution of
the system.
After identifying the activities we need to understand how they are associated with constraints and conditions.
The missing part of the activity diagram is Messaging. Activity diagram is not shows the message flow from one
activity to another activity.
Before drawing the activity diagram we should know the elements used in activity diagram.
We should identify the following elements:
Activities
Association
Conditions
Constraints
Activity diagram shows like a flow chart but it is not. It shows different flow like parallel, branched, concurrent and
single.
So the purposes 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.
Where to use Activity diagram?
An application can have multiple systems. Activity diagram captures these systems and describes flow from one
activity to another activity.
This specific usage not in another diagram.
2. Activity Diagram
Below diagram we use the elements of activity diagram.
Start /Initial
Phase
Decision box
Activity/Action
State
Flow
Note/comments
Stop
Below the example is Activity diagram:
Insert Card Enter PIN
Confiscate PIN
[Invalid PIN]
[Valid PIN]
Display Menu
3. Activity Diagram
Below the example Reservation of Ticket Activity diagram by using swimlane:
Passenger System Database Pay gateway
User Login
Check seats availability
Seats not available
[No]
[Yes
]
Provide register form
Submit registration form
Verify registration details
[No]
[Yes
]
Invalid details
Payment process start
Select payment mode
Select credit or debit card
Verify account number
Ticket Cnfirmed
[Yes
]
[No/Invalid parameters]
Select Bank
Enter card number
Authentication
[Update
]
Update passenger details
Update reservation
[Yes
]
Debit amount
[No
]
Invalid Number