Descriptive slides for the Activity Diagrams in UML
Size: 1.92 MB
Language: en
Added: Apr 26, 2015
Slides: 30 pages
Slide Content
Duration : 3 Hrs
1
RamakantSoni
Assistant Professor
Dept. of Computer Science
B K Birla Institute of Engineering & Technology, Pilani, India
Ramakant Soni @ BKBIET Pilani
So the purposes can be described as to:
•Draw the activity flow of a system.
•Describe the sequence from one activity to another.
Ramakant Soni @ BKBIET Pilani 4
•Describe the parallel, branched and concurrent flow
of the system.
How to draw Activity Diagram
Beforedrawinganactivitydiagramwemusthavea
clearunderstandingabouttheelementsusedinactivity
diagram.
First we should identify the following elements :
1.Activities
2.Association
Ramakant Soni @ BKBIET Pilani 5
2.Association
3.Conditions
4.Constraints
Oncetheabovementionedparametersareidentifiedweneedto
makeamentallayoutoftheentireflow.Thismentallayoutisthen
transformedintoanactivitydiagram.
Example of an order management system
The diagram is drawn with the four main activities :
•Send order by the customer
•Receipt of the order
•Confirm order
•Dispatch order
Afterreceivingtheorderrequestconditionchecksare
Ramakant Soni @ BKBIET Pilani 6
Afterreceivingtheorderrequestconditionchecksare
performedtocheckifitisnormalorspecialorder.
Afterthetypeoforderisidentifieddispatchactivityis
performedandthatismarkedastheterminationofthe
process.
Activity Diagram for order management system
Ramakant Soni @ BKBIET Pilani 7
Initial node
The filled circle is the starting point of the diagram
Activity Diagram components
Final node
The filled circle with a boarder is the ending point. An
activity diagram can have zero or more activity final
state.
8Ramakant Soni @ BKBIET Pilani
Activity
The rounded rectangle represents activities that occur. An
activity is not necessarily a program, it may be a manual thing
also.
Ramakant Soni @ BKBIET Pilani 9
Flow/ edge
The arrows in the diagram. No label is necessary.
Fork
A black bar ( horizontal/vertical ) with one flow going into it
and several leaving it. This denotes the beginning of parallel
activities.
Join
A block bar with several flows entering it and one leaving it.
this denotes the end of parallel activities
10Ramakant Soni @ BKBIET Pilani
Merge
A diamond with several flows entering and one leaving. The
implication is that all incoming flow to reach this point until
processing continues
Sub-activity indicator
The rake in the bottom corner of an activity, indicates that
the activity is described by a more finely detailed activity
diagram.
11Ramakant Soni @ BKBIET Pilani
Difference between Join and Merge
›Ajoinisdifferentfromamergeinthatthejoinsynchronizes
twoinflowsandproducesasingleoutflow.Theoutflowfrom
ajoincannotexecuteuntilallinflowshavebeenreceived.
›Amergepassesanycontrolflowsstraightthroughit.Iftwo
ormoreinflowsarereceivedbyamergesymbol,theactionormoreinflowsarereceivedbyamergesymbol,theaction
pointedtobyitsoutflowisexecutedtwoormoretimes.
12Ramakant Soni @ BKBIET Pilani
Decision
›A diamond with one flow entering and several leaving.
The flow leaving includes conditions as yes/ no state.
Flow final
›The circle with X through it. This indicates that Process
stop at this point.
13Ramakant Soni @ BKBIET Pilani
Send Signal Action
SendSignalActionisanactionthatcreatesa
signalinstancefromitsinputs,andtransmitsitto
thetargetobject,whereitmaycausethefiringof
astatemachinetransitionortheexecutionofan
activity.
15Ramakant Soni @ BKBIET Pilani
Swim lane
A partition in activity diagram by means of dashed line,
called swim lane. This swim lane may be horizontal or
vertical.
Vertical Swimlane Horizontal Swimlane
16Ramakant Soni @ BKBIET Pilani
Activity Diagram notation
text Start at the top black circle
If condition 1 is TRUE, go
right; if condition 2 is TRUE,
go down
At first bar (a synchronization
bar), break apart to follow two
Ramakant Soni @ BKBIET Pilani 17
bar), break apart to follow two
parallel paths
At second bar, come together
to proceed only when both
parallel activities are done