Professional Documents
Culture Documents
Activity Diagrams
Activity Diagrams
[false) ---==---
Tutor Learner
organiz,ational units or
systems
Draw UM,L
Diagrams
ANA YZE ACTIVITIES I A USE CASE
,_ UseCase: Add new device Start
Sctnano:
Strudured Spetification
The user selects
Add Device from
case can be
the menu
W• ✓• X �
Step Action
____
activity diagram
allowing them to
d -e vice add a device
j
4
5
The user selects the type of the device
case scenario
The system displays
a warning to the
user
S ECIFY AN A GORITHM --
-devices: Device[0 .. 1
1-------
-deviceName: String
checkOev iceName
typ.es of a
, ction like:
• WriteVa iableAction Write Variable
deviceName • (true)
dev iceName+"-2"
• CallActio1n
• CreateObjectA,ction
■ Workflow
■ Activity
■ nitial and Final Nodes
■ Actions and Activities
■ Control Flows Query device and sensor status
�a I se] ---==------
ACTIVITY
• Round-cornered rectangle with name at the top
■ Often implied or missed out in diagrams
Open
[fa�]
■ At points in the workf ow of an activity diagram, the
workflow can branch based on conditions
■ In UML, the flow branches at a decision node and
merges at a merge no,de
■ Both are shown as diamonds
■ The decision usually has the con,dition in or near it
■ The flows out of the decision are marked with guards
PARAL EL FLOWS ACTIV TY
DIAGRAMS
■ P'arallel workflows
■ Forks and Joins
■ Not using fork and join nodes
■ Token passing Add a device
Display result
Display device Enter device Create new
of tes t
entry screen details and device �
submit
Test physica I
device
PARALLEL WORK LOWS
■ In business processes, activity can take place in parallel
■ In computerized systems, activities run concurrently, on
separate servers, processes or threads
■ These are shown in an activity diagram as parallel flows
■ The workflow forks at a fork node and rejoins at a join
node
■ Both are shown as bars in the diagram
FORKS A D JOI s
Redisplay
device detai Is
Test physica I
device
TOKEN PASSI G
• Activity diagrams use the colncept of token passing from
1
Petri nets
Add a device
Red -splay
device de1ails
Device E xiss? Display result
Display device En1er device Crea1e new
entry screen device of 1est 1--�� •
de1ails and
submit Add Device
Test physical Succeeded
device
Next Action?
Prompt to correct Enter response
device data
[false)
Red -splay
evice de1ails
Device E xiss? Display result
Display device En1er device Crea1e new
entry screen device of 1est 1--�� •
de1ails and
submit Add Device
Test physical Succeeded
devi,oe
Next Action?
Prompt t o correct Enter response
device da ta
[false)
Next action?
Display list of Select device Control device Prompt for next
� devices in k--....::::;:i.a.............�� action
room