Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

■ Provi,de a picture of high-le

· vel or end-to-end business


processes
■ Model business workflows with swimlanes
■ Ana yze the activities that take place as part of the
execution of a use, case
■ Document an algorithm, possib y th,e method
body of an operation
■ Model business processes at a high l·evel, showing the
steps from end-to-end
■ Provid·e a context for use c.ases that implement some of
those steps
System working
correctly?
-- (true}--
Set up dev Ices Set up sensors Configure Enable live
� � schedules system

[false) ---==---
Tutor Learner

■ Shows the participants in the


activity and the specific Explain Purpose
ofDiagram

activities or actions they are


responsible for
Explain Notation
ofDlagra.m

■ Participants can be people, Show Example


Dlagram(s)

organiz,ational units or
systems
Draw UM,L
Diagrams
ANA YZE ACTIVITIES I A USE CASE
,_ UseCase: Add new device Start
Sctnano:

■ The steps in a use Basic Path

Strudured Spetification
The user selects
Add Device from

case can be
the menu

W• ✓• X �
Step Action
____

visua ized as an I_2� · ·-· - 1 __


2
j
,_T_h_e -us-er-s-ele_ ct s
_ d
_ _d_D_ -e vi-. -, e-fr -om_t_he_ m_e_nu_

The system pre5ents the 5creen 11llowil"lg them to add a


The system
presents the screen

activity diagram
allowing them to
d -e vice add a device

� 3 The user enters the name ofthe device

■ Some tools ge - n-erate j

j
4

5
The user selects the type of the device

The user browses to the location of the device driver


lhe user enters the
name of the dev Ice

the activity diagram Context References


r=En=t=ry=Po=in=ts=============== Exception1
Constraints
[Device name already exists!

directly from the use Step


O
Path Name
!Josic Path
3a De-vice name already exists

case scenario
The system displays
a warning to the
user
S ECIFY AN A GORITHM --
-devices: Device[0 .. 1
1-------
-deviceName: String
checkOev iceName

■ An activity diagram can show


WriteVariable
WritaVariable
d • dev ices.length0 ----.. i •0

an algorithm eith,er using a deviceName �=


deviceli(i).getName()

general flowchart style of


(false)

notation or using specific


WribtVariable
WritaVariable
i++
dev icesp).setName
(deviceName+"-1")

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

Display all Remove Remove faul1¥


�· devices and � faulfy devices� sensors �
sensors
WORKFLOW
• Activity diagrams are used to model wo kflows as a
series of connected actions,, some of which are
themselves activities
■ They show control nodes, executable nod , es and object
nodes Sy&em wo r!Q ng
correctly?
-- [true)--
Configure Enable live
schedules system

�a I se] ---==------
ACTIVITY
• Round-cornered rectangle with name at the top
■ Often implied or missed out in diagrams

Query device and sensor status


• Initial - solid black circle
■ Final - circle with smaller black circle inside

Query device and sensor status


■ In round-cornered rectangles
■ Named to describe the action or activity
■ Actions are the fundamental units of behaviour
■ Actions are executable nodes
■ Technically, activities are only shown in activity diagrams
as part of the workflow if they are structured activities,
which are a kind of action
• Use (structured) act·vities for large scale behaviours
■ Business process activities or activities in a use case

Query device and sensor status

Display all Remove Remove faulty


devices and faulty devices sensors
sensors
• Use actions for lowest level behaviou s
• Specif.cation of 01 perations

Open

Set state= Set enabled =


Open true
FLOWS
• Arrows connecting actio,ns
■ Open arrow-heads

Query device and sensor status

Display all Remove · Remove faulty


devices and 1----� faulty devices -----� sensors
sensors
DEC SIONS I ACTIV 1 TY DIAGRAMS
■ Decisions and merges
■ Conditions and guards
■ Not using decision nodes
Query device and sensor status

Faullty devices exist? Faulty sensors exist?


Display al I devices Remove· faulty R; ,emove fa ulty
and sensors devices sensors

[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

■ Flow final node Redisplay


device detai Is

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

Create new Display result


device of test

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)

[a ct ion= Correct Device Data)


TOKEN PASSI G
• Activity diagrams use the colncept of token passing from
1
Petri nets
Add a device

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)

[a ct ion= Correct Device Data)


FLOW INA NODE
■ Sometim· es in para lel flows, a f ow com. es to a . n end
without termin.ating the whole activity
■ Flow final node Send control
message to
Shown as an X in a circle device

Next action?
Display list of Select device Control device Prompt for next
� devices in k--....::::;:i.a.............�� action
room

[action = Another Device]

You might also like