Activity Diagram
Activity Diagram
• Activity diagrams are typically used for business (transaction) process modeling
and modeling the logic captured by a single use-case or usage scenario.
• Activity diagram is used to represent flow within a particular use case. UML
activity diagrams are the object oriented equivalent of flow chart and data flow
diagrams in function-oriented design approach.
• Is particularly useful when you know that an operation has to achieve a number
of different things, and you want to model what the essential dependencies
between them are, before you decide in what order to do them.
• Records the dependencies between activities, such as which things can happen in
parallel and what must be finished before something else can start.
3
Why we use Activity Diagram
4
Activity Diagram Notations
1. Activity:-
• The control flow of activity is represented by control nodes and object nodes
that illustrates the objects used within an activity. The activities are initiated
at the initial node and are terminated at the final node.
5
Activity Diagram Notations
2. Flow:-
6
Activity Diagram Notations
3.Swimlane:-
The swimlane is used to cluster all the related activities in one column or one row. It
can be either vertical or horizontal. It used to add modularity to the activity diagram.
It is not necessary to incorporate swimlane in the activity diagram. But it is used to
add more transparency to the activity diagram.
7
Activity Diagram Notations
A block bar with several flows entering in it and one leaving from it. This
denotes the end of parallel activities.
8
Activity Diagram Notations
A black bar (horizontal/vertical ) with one flow going into it and several
leaving it. This denotes the beginning of parallel activities.
9
Activity Diagram Notations
5. Decision Box:-
Decision
Box
It makes sure that the control flow or object flow will follow
only one path.
10
Activity Diagram Notations
Final State:
It is the stage where all the control flows and object flows end.
11
How to draw Activity Diagram
12
Example of Activity Diagram
• Here the input parameter is the Requested order, and once the order is
accepted, all of the required information is then filled, payment is also
accepted, and then the order is shipped. It permits order shipment before
an invoice is sent or payment is completed.
13
Example of Activity Diagram
Activity Diagram:-
14
Example of Activity Diagram
15
Uses of Activity Diagram
16
Drawbacks of Activity Diagram
• Activity diagrams tell you what is happening, but not who does what.
• In domain modelling, this diagram type does not convey which people or
departments are responsible for each activity.
• In programming, it does not convey which class is responsible for each activity
17
References
Books:
A Practitioner's Approach, By Roger S. Pressman.System Analysis and Design,By Elias M.
Awad.
• Web Source:
www.javatpoint.com
www.tutorialspoint.com
www.slideshare.com
geeksforgeeks.org
18
Thank You