uml activity diagrams
DESCRIPTION
A course on UML 2.0 Activity DiagramTRANSCRIPT
![Page 1: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/1.jpg)
1Spring 2005Specification and Analysis of Information Systems
Eran Toch
Analysis and Specification of Information Systems
Spring 2007
Session 9: Activity Diagrams
![Page 2: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/2.jpg)
2
Outline
• Introduction
• Basics– Activities, Tokens, objects, signals
• Structures– Decomposition
![Page 3: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/3.jpg)
3
Modeling Process
Intro | Basics | Structures
PhaseActionsOutcome
InitiationRaising a business needBusiness documents
RequirementsInterviewing stakeholders, exploring the system environment
Organized documentation
SpecificationAnalyze the engineering aspect of the system, building system concepts
Formal specification
DesignDefine architecture, components, data types, algorithms
Formal Specification
ImplementationProgram, build, unit-testing, integrate, documentation
Testable system
Testing & Integration
Integrate all components, verification, validation, installation, guidance
Testing results, Working sys
MaintenanceBug fixes, modifications, adaptationSystem versions
![Page 4: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/4.jpg)
4
Behavior Modeling
Intro | Basics | Structures
CheckoutManager
Order
message: changestatus
Add to cart
Check availability
Supply Order
Notify User
[okay][problem]
Sequence Diagrams Activity Diagrams
Inventory
message: create In process
supplied
Order
State Diagrams
![Page 5: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/5.jpg)
5
Strengths
• Best for modeling complex behavior– Which does not rely on interactions.– Has parallel behavior.
• Examples:– Business workflow (authorizing a loan).– User behavior (login/logout).– Algorithms.
Intro | Basics | Structures
![Page 6: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/6.jpg)
6
Outline
• Introduction
• Basics– Activities, Tokens, objects, signals
• Structures– Decomposition
![Page 7: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/7.jpg)
7
Customer Service Modeling
Intro | Basics | Structures
![Page 8: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/8.jpg)
8
Activity Diagram for Customer Service
Start
Fork
decision
merge
Join Final Node
Action
Intro | Basics | Structures
![Page 9: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/9.jpg)
9
Tokens
• The conceptual model of activity diagrams is based on tokens.
Intro | Basics | Structures
![Page 10: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/10.jpg)
10
Tokens
Each fork node generates tokens, according to the number of paths.
The initial node creates a single token
Each join “collects” all the incoming tokens, producing a token afterwards.
An action requires a token to execute, and produce a token when it ends
Intro | Basics | Structures
![Page 11: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/11.jpg)
11
Object Flows
• Objects describe the interface between actions
Call DataReceive Call Log Call
Receive Call Log Call
Object Flow
PinsCall data
Call data
Intro | Basics | Structures
Initiate Call
Call data
![Page 12: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/12.jpg)
12
Pins
• Pins declare the interface between two actions.
Input Pin
Output Pin
Parameter Transformation
Intro | Basics | Structures
![Page 13: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/13.jpg)
13
Objects with States
• Object nodes allow state change modeling:
Call Data[created]
Receive CallFind Customer
TypeCall Data
[classified]
Intro | Basics | Structures
![Page 14: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/14.jpg)
14
Data Store
• A datastore is a stereotype for an object which stores objects persistently.
All entering tokens are copied so that tokens never leave the data store
If a token already present in the data store, it replaces the old one
Intro | Basics | Structures
![Page 15: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/15.jpg)
15
Catching Signals
Time SignalEvent Signal
Flows when the time expression is true
Flows when an event occurs
Sends an event when a flow enters
Intro | Basics | Structures
![Page 16: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/16.jpg)
16
Example: Volvo Blind Spot Info System (BLIS)
Intro | Basics | Structures
![Page 17: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/17.jpg)
17
BLIS
Intro | Basics | Structures
Camera Behavior
Check Objects in Camera
Is object Detected?[no]
Side Object Detected
[yes]
Safety Controller Behavior
Side Object Detected
Detection data
Alarm Deciding
Side?
Left Alarm Right Alarm
[left] [right]
![Page 18: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/18.jpg)
18
Outline
• Introduction
• Basics– Activities, Tokens, objects, signals
• Structures– Decomposition
![Page 19: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/19.jpg)
19
Final Nodes
the activity is terminated when the first token arrives
the activity is terminated when all tokens in the graph are destroyed
Intro | Basics | Structures
![Page 20: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/20.jpg)
20
• An action can be decomposed into an subactivity.
• The invoked activity graph can be used by many subactivity states.
Decomposition
Input Parameter Final Action
Intro | Basics | Structures
![Page 21: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/21.jpg)
21
Partitions
• Partitions (swimlanes) can group actions by: – class, business unit, person etc…
• Can be multidimensional (not always possible).
RegisterBug
EvaluateImpact
FixBug
RevisePlan
ReleaseFix
TestFix
[ priority = 1]
Management
Support
Engineering
Intro | Basics | Structures
![Page 22: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/22.jpg)
22
Pre / Post Conditions
for Decompositions
for Actions
Intro | Basics | Structures
![Page 23: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/23.jpg)
23
Exceptions
• Exception represent errors and unexpected situations
interruptible region
Exception Edge
What happens to the tokens?
Exception Handler
Intro | Basics | Structures
![Page 24: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/24.jpg)
24
Exception – cont’d
Multiple events
Actions can throw events too
Exception info can be modeled
Multiple event handlers
Intro | Basics | Structures
![Page 25: UML Activity Diagrams](https://reader033.vdocument.in/reader033/viewer/2022061611/5549f478b4c90512488b56c1/html5/thumbnails/25.jpg)
25
Summary
Activity Diagrams:– Represent workflows– Good for designing activities
Basic Elements– Activities– Objects– Signals
Structures – Tokens– Decomposition– Interfaces