Activity Diagrams
Activity Diagrams
Design
Engr. Abdul-Rahman Mahmood
MS, PMP, MCP, QMR(ISO9001:2000)
[email protected]
alphapeeler.sf.net/pubkeys/pkey.htm
pk.linkedin.com/in/armahmood
www.twitter.com/alphapeeler
www.facebook.com/alphapeeler
abdulmahmood-sss
alphasecure
[email protected]
[email protected]
http://alphapeeler.sourceforge.net
http://alphapeeler.tumblr.com
[email protected]
[email protected]
mahmood_cubix
48660186
[email protected]
http://alphapeeler.sf.net/me
http://alphapeeler.sf.net/acms/
Objectives
Discuss and understand activity diagrams
Understand the elements of activity diagrams
Activity
Transition
Synch. Bar
Decision Diamond
Start & Stop Markers
What is an activity diagram?
Example: Student Enrollment in IIT (SEIIT)
Activity diagram for a use case in SEIIT
Basic components in an activity diagram and their notations
Managing the large activity diagram: Swim Lane
Notation
2. Transition
Activity1()c
1. Activities
Activity2()
Notation - 2
[x>0]
[x>0]
Activity1()c
[x=0]
[x=0]
[x<0]
[x<0]
3. Decision Diamond
Notation - 3
Notation - 3
Start Marker
Stop Marker
Notation - 4
Developers
Swimlane
Testers
Swimlane
Markers
Swimlane
Application/Department/Group/Role Boundaries
Librarian
[borrower]
Find book on shelf
[returning]
[returner]
Wait in queue
[borrowing]
Record return
Record borrowing
Prepare for next
member
Purpose
Model business workflows
Model operations
decomposed
Work of the action state is not interrupted
diagrams
They may be interrupted
Transitions (1)
someplace
initial state -- a solid ball
stop state -- a solid ball inside a circle
Transitions (2)
Branching (1)
Branching (2)
Fork
control
conceptually, the activities of each of outgoing
Join
Fork
Case Study
System
IIT
Enrollment
Student
<<include>>
Course registration
Registrar
SEIIT System
Here different activities are:
Received enrollment form filled by the student
Registrar checks the form
Input data to the system
System authenticate the environment
Pay fees by the student
Registrar checks the amount to be remitted and prepare a bill
System acknowledge fee receipts and print receipt
Hostel allotment
Allot hostel
Receive hostel charge
Allot room
Medical check up
Create hostel record
Conduct medical bill
Enter record
Issue library card
Issue identity card
Payment fees
Issue identity
card
Hostel
allotment
Medical check
Issue library
card
Hostel
allotment
Medical check
Issue library
card
Received form
Payment fees
Issue identity
card
Hostel
allotment
Medical check
Issue library
card
and produces a single outflow. The outflow from a join cannot execute
until all inflows have been received
A merge passes any control flows straight through it. If two or more
Received form
Payment fees
Issue identity
card
Hostel
allotment
Medical check
Issue library
card
Payment fees
Hostel
allotment
Medical check
2
Issue identity
card
Issue library
card
Check
form
[Incorrect]
Regret message
[Correct]
Display student
screen
Input student
information
[No]
Verify the
applications
[Yes]
Create record
Search for Student
selection list
[Match]
[No Match]
Regret
registration
Display
enrollment form
Calculate
registration fees
Dispaly fees
payable screen
Process
payment
Pay fee
Print receipt
Student
Registrar
[Incorrect]
Check
form
Verify the
applications
[Yes]
[No]
Regret message
[Correct]
Display student
screen
System
Create record
Input student
information
[Match]
[No Match]
Regret
registration
Swimlanes
A swimlane specifies a locus of activities
To partition the activity states on an activity
Swimlanes
Each swimlane has a name unique within its
diagram
Each swimlane may represent some real-world
entity
Each swimlane may be implemented by one or
more classes
Every activity belongs to exactly one swimlane,
Data Store
A data store is shown as an object with the datastore
keyword
Expansion Region
An expansion region is a structured activity region that executes multiple
times. Input and output expansion nodes are drawn as a group of three
boxes representing a multiple selection of items. The keyword iterative,
parallel or stream is shown in the top left corner of the region
Exception Handling
Exception Handlers can be modeled on activity diagrams as in
interrupted. In the very simple example below, the Process Order action will
execute until completion, when it will pass control to the Close Order
action, unless a Cancel Request interrupt is received which will pass control
to the Cancel Order action