Upload
jaejen
View
218
Download
0
Embed Size (px)
Citation preview
8/9/2019 SE Activity Diagrams
1/31
Software System Engineering
Activity Diagrams
8/9/2019 SE Activity Diagrams
2/31
Lesson Objectives
Objectives
3
Discuss and understand activity diagrams
Understand the elements of activity diagrams Activity Transition Synch. Bar Decision Diamond Start & Stop Markers
8/9/2019 SE Activity Diagrams
3/31
Activity Diagram
Describes how activities are coordinated.
Is particularly useful when you know that anoperation has to achieve a number of di erentthings, and you want to model what the essentialdependencies between them are, before youdecide in what order to do them.
Records the dependencies between activities,such as which things can happen in parallel and
what must be nished before something else canstart.
Represents the work!ow of the process. 4
8/9/2019 SE Activity Diagrams
4/31
Notation
5
Activity1()c Activity2()
1. Activities
2. Transition
8/9/2019 SE Activity Diagrams
5/31
Notation - 2
6
Activity1()c
[x>0]
[x=0]
[x0]
[x=0]
[x
8/9/2019 SE Activity Diagrams
6/31
Notation - 3
7
4.1 Synch. Bar !oin" 4.# S$%itting Bar &or'"
(A)D*(+,*
(-+,*
8/9/2019 SE Activity Diagrams
7/31
Notation - 3
8. Start / Sto$ ar'ers
Start ar'er Sto$ ar'er
8/9/2019 SE Activity Diagrams
8/31
Notation - 4
9A$$%ication De$artment 2ro $ ,o%e Bo ndaries
Deve o!ers Testers "ar#ers
$%i& ane $%i& ane$%i& ane
8/9/2019 SE Activity Diagrams
9/31
1'
xam$%e5 B siness 6eve% Activity Diagramo7 the 6i8rary
&e&ber Librarian
borro%er
ret*rner
+in, boo# on s-e
/ait in 0*e*e
re!are or ne t&e&ber
ecor, borro%in
ecor, ret*rn *t boo# bac# o s-e
ret*rnin
borro%in
8/9/2019 SE Activity Diagrams
10/31
"ctivity Diagrams #$%
To model the dynamic aspects of asystem
It is essentially a owchart Showing ow of control from activity to
activity
!rpose "odel #!siness wor$ ows
"odel operations 11
8/9/2019 SE Activity Diagrams
11/31
8/9/2019 SE Activity Diagrams
12/31
8/9/2019 SE Activity Diagrams
13/31
'ransitions #$%
'hen the action or activity of a statecompletes( ow of control passes
immediately to the ne)t action oractivity state
A ow of control has to start and endsomeplace initial state -- a solid #all stop state -- a solid #all inside a circle
14
8/9/2019 SE Activity Diagrams
14/31
'ransitions #&%
15
8/9/2019 SE Activity Diagrams
15/31
"ctivity Diagram( E)ample #$%
16
8/9/2019 SE Activity Diagrams
16/31
*ranching #$%
A #ranch speci*es alternate paths
ta$en #ased on some +oolean
e)pression
A #ranch may have one incoming
transition and two or moreo!tgoing ones
17
8/9/2019 SE Activity Diagrams
17/31
*ranching #&%
18
8/9/2019 SE Activity Diagrams
18/31
"ctivity Diagram( E)ample #&%
19
8/9/2019 SE Activity Diagrams
19/31
+orking and oining
,se a synchroni ation #ar to
specify the for$ing and &oining of
parallel ows of control
A synchroni ation #ar is rendered
as a thic$ hori ontal or verticalline
2'
8/9/2019 SE Activity Diagrams
20/31
+ork
A for$ may have one incomingtransitions and two or more o!tgoing
transitions each transition represents an independent
ow of control
concept!ally( the activities of each of
o!tgoing transitions are conc!rrent either tr!ly conc!rrent .m!ltiple nodes/
or se0!ential yet interleaved .one node/ 21
8/9/2019 SE Activity Diagrams
21/31
oin
A &oin may have two or more incomingtransitions and one o!tgoing transition a#ove the &oin( the activities associated with
each of these paths contin!es in parallel
at the &oin( the conc!rrent ows synchroni e each waits !ntil all incoming ows have
reached the &oin( at which point one ow ofcontrol contin!es on #elow the &oin
22
8/9/2019 SE Activity Diagrams
22/31
+ork
23
8/9/2019 SE Activity Diagrams
23/31
"ctivity Diagram( E)ample #-%
24
8/9/2019 SE Activity Diagrams
24/31
"ctivity Diagram( E)ample# %
25
8/9/2019 SE Activity Diagrams
25/31
"ctivity Diagram( E)ample#/%
26
8/9/2019 SE Activity Diagrams
26/31
"ctivity Diagram( E)ample #0%
27
8/9/2019 SE Activity Diagrams
27/31
8/9/2019 SE Activity Diagrams
28/31
Swimlanes #$%
A swimlane speci*es a loc!s ofactivities
To partition the activity states on anactivity diagram into gro!ps each gro!p representing the #!siness
organi ation responsi#le for those activities
each gro!p is called a swimlane 1ach swimlane is divided from its
neigh#or #y a vertical solid line 29
8/9/2019 SE Activity Diagrams
29/31
Swimlanes #&%
1ach swimlane has a name !ni0!e withinits diagram
1ach swimlane may represent some real-world entity
1ach swimlane may #e implemented #yone or more classes
1very activity #elongs to e)actly oneswimlane( #!t transitions may cross lanes
3'
8/9/2019 SE Activity Diagrams
30/31
"ctivity Diagram( E)ample #2%
31
8/9/2019 SE Activity Diagrams
31/31