Chapter 28 UML Activity Diagrams

Download Report

Transcript Chapter 28 UML Activity Diagrams

Chapter 28
UML Activity Diagrams
Activity Diagrams
• Graphical notation for
– control flow
– data flow
– business processes
• For our purposes
– Flow chart for complicated use cases, if
needed
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
More UML Activity Diagram Notation
Student
Registration
System
Complete
Application
Application
Check Course
Availability
«datastore»
Courses
«datastore»
Applications
Accept/Deny
Reply
Check Applicant
Qualification
«datastore»
Students
Hierarchy in Activity Diagrams
Fill Order
the “rake” symbol (which
represents a hierarchy)
indicates this activity is
expanded in a sub-activity
diagram
Deliver
Order
• Activity diagrams needed for complicated use cases
– Otherwise use-case text is enough
• All activities and actions in a diagram should be at the
same level of abstraction
– Use hierarchy to separate
Conditional Branching
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
Signals in Activity Diagrams
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 Activity Diagram
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
Create Receipt
Hand Over Items
Authorize
Payment