session28-ActivityDiagrams - Rose

Download Report

Transcript session28-ActivityDiagrams - Rose

Left - The system has to DO things.
How do you show, at a high level,
What it does?
CSSE 374:
UML Activity Diagrams
Steve Chenoweth
Office: Moench Room F220
Phone: (812) 877-8974
Email: [email protected]
Chandan Rupakheti
Office: Moench Room F203
Phone: (812) 877-8390
Email: [email protected]
These slides and others derived from Shawn Bohner, Curt Clifton,
Alex Lo, and others involved in delivering 374.
Learning Outcomes: Patterns, Tradeoffs
Identify criteria for the design of a
software system and select patterns,
create frameworks, and partition software
to satisfy the inherent trade-offs.

Examine the use of UML Activity
Diagrams


This will not be a part of any HW or
documentation for Milestone 5.
Likely a question on final exam
Q3
UML Activity Diagrams

Essentially Modern
Version of Flowcharts
and/or Data Flow
Diagrams
 Easy

to understand
Used to model:
 Business
processes
 Workflows
 Data Flows
 Complex algorithms/UCs
Symbols
Activity Diagram UML
Syntax
Partitions. Show different
parties involved in the process
start
Fulfillment
Customer
Service
Finance
Action. It does something.
There is an automatic
transition on its completion.
Object Node. An object
produced or used by actions.
This allows us to model data
flows or object flows.
Receive Video
Order
A transition supports
modeling of control flow.
Fork. One incoming
transition, and multiple
outgoing parallel transitions
and/or object flows.
Fill Order
Send Invoice
Invoice
Order
Receive Payment
Deliver
Order
Join. Multiple incoming transitions and/or
object flows; one outgoing transition.
The outgoing continuation does not happen
until all the inputs arrive from all flows.
end of activity
Close Order
Old Data Flow Diagrams…
DFD for Automated Course Registration System
process
accept/deny reply
Applicant
application
2
Check Applicant
Qualification
1
Check Course
Availability
application
application
course data
student data
data flow
external actor
Courses
data store, such as a
DB, DB table, or file
Applications
Students
Now done as Activity Diagrams
Hierarchy Representation:
Rake Symbol
Fill Order
the “rake” symbol (which
represents a hierarchy)
indicates this activity is
expanded in a sub-activity
diagram
Deliver
Order
Expanded Delivery Order
Activity Diagram
Deliver Order
Decision: Any
branch happens.
Mutual exclusion
Merge: Any input leads
to continuation. This is
in contrast to a join, in
which case all the
inputs have to arrive
before it continues.
[ else ]
Deliver Regular
[ rush ]
Deliver Rush
Post Office Showdown
Think that he might
be watching too
many martial arts
films?
Signal Notation
A time signal
Receive Video
Order
Fill Order
30 days since sent last invoice,
and no payment received
Send Invoice
Resend Invoice
Deliver
Order
Receive Payment
Cancel
request
Close Order
Cancel Order
Accept a signal
NextGen POS: Reducing Complexity
Customer
Cashier
NextGen POS
Authorization
Service
Shop and Fill
Cart
Cart
Enter Cart Items
Calculate Taxes
and Discounts
[ cash
payment ]
[ else ]
Submit
Authorization
Request
Receipt
Authorize
Payment
Create Receipt
Hand Over Items
NextGen Process Sale UC benefits from activity diagram due to its complexity
Activity Diagram Guidelines

Use when need to depict
processes with complex
flow
 Conditional

Use rake notation for subactivity diagrams
 Keeps

or iterative
parent diagram simple
Maintain a consistent level
of abstraction within a
diagram
Exercise on Activity Diagrams





We’ll do in class –
Break up into your teams
Sketch an activity diagram for
creating an account, with username
& password, on a website.
Be sure to include swim lanes for
the User, the System, and an
external CAPTCHA Service.
Your diagram should include:

a check that the password is valid,
 a check that the username has not already been used
 a check that user entered CAPTCHA text correctly

Decide what order these checks should be done in, and do those in
parallel that make sense!
Go for it…