You are on page 1of 28

OBJECT ORIENTED ANALYSIS

(Unified Modeling Language)


UML
Activity Diagram

Rana Talaat Muhammad


Expected Outcomes
• To know how activity diagram represent system logic

System Analysis & Design - Rana Talaat Muhammad 2


UML-Activity Diagram
UML models basically three types of diagrams, namely, interaction
diagrams, structure diagrams, and behaviour diagrams.

What must
happen in a
What is system
contained
Activity inuseacase and state machine diagrams, are considered behaviour diagrams
diagrams, along with

system
because they describe what must happen in the system being modelled. It shows the behaviour of a system.

System Analysis & Design - Rana Talaat Muhammad 3


Activity Diagram
• An activity diagram focuses on condition of flow and the sequence in
which it happens. We describe or depict what causes a particular event
using an activity diagram.

System Analysis & Design - Rana Talaat Muhammad 4


Activity Diagram
• 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

System Analysis & Design - Rana Talaat Muhammad 5


Activity Diagram
• Activity diagram is another important diagram in UML to describe the
dynamic aspects of the system.

• Activity diagram show the conditional logic for the sequence of system
activities in order to complete a business process.

• Also show the logic of a use case.

• Model work flow and business processes.

System Analysis & Design - Rana Talaat Muhammad 6


Purpose of Activity Diagrams
The basic purposes of activity diagrams is similar to other four
diagrams. It captures the dynamic behaviour of the system. Other four
diagrams are used to show the message flow from one object to
another but activity diagram is used to show message flow from one
activity to another.

System Analysis & Design - Rana Talaat Muhammad 7


Purpose of Activity Diagrams
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.

System Analysis & Design - Rana Talaat Muhammad 8


Purpose of Activity Diagrams
It does not show any message flow from one activity to another.
Activity diagram is sometimes considered as the flowchart. Although
the diagrams look like a flowchart, they are not. It shows different
flows such as parallel, branched, concurrent, and single.

System Analysis & Design - Rana Talaat Muhammad 9


Purpose of Activity Diagrams
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.

System Analysis & Design - Rana Talaat Muhammad 10


Difference between a Use case diagram
& an Activity diagram

Activity Diagram Use Case Diagram


• is used to model the workflow depicting • is to just depict the functionality i.e. what
conditions, constraints, sequential and the system does and not how it is done.
concurrent activities.
• shows ‘How’
• shows ‘What’

• can be used to illustrate a business process • have a low level of abstraction. They are
(high level implementation) to a stand alone
used to show a high level of implementation
algorithm (ground level implementation) only.

System Analysis & Design - Rana Talaat Muhammad 11


Activity diagram symbols i ty
a c t iv
e v e r y s w it h
be g in
a gr am
di this
Start symbol \ Initial State
Represents the beginning of a process or workflow in
an activity diagram. It can be used by itself or with a
note symbol that explains the starting point.

System Analysis & Design - Rana Talaat Muhammad 12


Activity diagram symbols
n o n-
the a c t io n
pt ib le
te rr u t s
in ob j e c
o f
Activity Action State
Indicates the activities that make up a modelled
process. These symbols, which include short
descriptions within the shape, are the main building
blocks of an activity diagram.

System Analysis & Design - Rana Talaat Muhammad 13


Activity diagram symbols tr a t e th e
illus o n e
s f ro m
sit i o n t o
tra n s t a te
c t io n
a t h e r
ano
Action flow
Shows the directional flow, or control flow, of the
activity. An incoming arrow starts a step of an
activity; once the step is completed, the flow
continues with the outgoing arrow.

System Analysis & Design - Rana Talaat Muhammad 14


Activity diagram symbols
Activity
the creation &
Object flow
modification of
objects by activity
Class\Object Class\Object

An object flow arrow from an action to an object


An object flow arrow from an object to means that the action creates or influences the object.
an action indicates that the action state
uses the object.

System Analysis & Design - Rana Talaat Muhammad 15


Activity diagram symbols d e c is io n
i re s a o n
re qu o v i n g
r t o m i v i t y
pri o t a c t
e nex
to t h
Decision symbol
Represents a decision and always has at least two
paths branching out with condition text to allow users
to view options. This symbol represents the
branching or merging of various flows with the
symbol acting as a frame or container.

System Analysis & Design - Rana Talaat Muhammad 16


Activity diagram symbols o g e th e r
i n gs t h a t
b r ow s t
ip l e fl e n t
mu l t c u rr
t c o n
re n o
a
Merge
Merge node is a control node that brings together
multiple incoming alternate flows to accept single
outgoing flow.

System Analysis & Design - Rana Talaat Muhammad 17


Decision symbol

Yes
:Action
Guard symbols

No

e f o re
:Action
tr u e b
t b e n e x t
mus g to the
o v i n y
m iv it
System Analysis & Design - Rana Talaat Muhammad
act 18
splits a single
Activity diagram symbols Activity incoming flow into
multiple concurrent
Fork Node flow
Symbolized with multiple arrowed lines from a join.

Activity Activity

Join Node/ Synchronization bar


Represented with a thick vertical or horizontal line.

Activity
l ti pl e
s m u
join n t fl o w
c urre l e
on n g
c a si System Analysis & Design - Rana Talaat Muhammad 19
Activity diagram symbols r a
o w f o
t h e fl
st o ps ti m e
o d o f
p e ri

Time Event
This refers to an event that stops the flow for a time;
an hourglass depicts it.

System Analysis & Design - Rana Talaat Muhammad 20


Time event

Perform a backup

Every Monday

System Analysis & Design - Rana Talaat Muhammad 21


fi n a l
a fl o w
i n g c t
Activity diagram symbols reac h
s n o e ff e
d e h a a l l e l
no e r p a r
g
o t h b e i n
on t a r e
s t h a t h i n
flo w e d w i
o c e s s t h e
p r i ty a t
Flow final symbol
enda c t i v i m e
Represents h
t thee
t in t
of a specific process flow. This
symbol shouldn’t represent o n
theiend
p you would use the end
of all flows in an
thatm
activity; in a
s e
instance,
symbol. The flow final symbol should be placed at
the end of a process in a single activity flow.

System Analysis & Design - Rana Talaat Muhammad 22


Activity diagram symbols i ty
a c t iv
e v e r y w ith
e n ds
gr a m
dia this
End symbol
Marks the end state of an activity and represents the
completion of all flows of a process.

System Analysis & Design - Rana Talaat Muhammad 23


g ro u p
la n e s
w i m i ti e s
S a c t iv
l a te d m n .
re e c o l u
o n
into
swimlane
Swimlanes

usually parallel lines, either horizontal or vertical,


notation
and a name labelling the partition in a box at one end.

Activity partitions Customer and Activity partitions Customer and


System Analysis & Design
Order_Dept as horizontal swimlanes Rana Talaat Muhammad
Order_Dept as vertical swimlanes 24
Activity Diagram - Examples

System Analysis & Design - Rana Talaat Muhammad 25


Sign Up Free
www.smartdraw.com/

Activity
Activity

tmh.rana@gmail.com Diagram

System Analysis & Design - Rana Talaat Muhammad 26


System Analysis & Design - Rana Talaat Muhammad 27
System Analysis & Design - Rana Talaat Muhammad 28

You might also like