Sei sulla pagina 1di 13

Activity Diagrams

• An activity diagram is a special case of a state


chart diagram
• The states are activities (“functions”)
• An activity diagram is useful to depict the
workflow in a system

Handle Document Archive


Incident Incident Incident

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1
Activity Diagrams

• Shows the sequence of activities in a process


(manual or computerized)
• Activity Diagrams allow to model Decisions
• Activity Diagrams can model Concurrency
• Activity Diagrams: Grouping of Activities

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2
Notations
Activity name • Activity Name (manual, automatic)

Event
• Events: things that happen

[cond] [else] • Decision branching (and Merge)

• Synchronization bar (show parallel activities)


• Fork: one in, several out (start of parallel)
• Join: Several in, one out (end of parallel)
• Start
• End
• Swimlanes

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3
Example of a Activity Diagram
with a Frame
Activity Nodes & Edges
• An activity diagram consists of nodes and edges
• There are three types of activity nodes
Control nodes
Executable nodes
– Most prominent: Action
Object nodes
– E.g. a document
• An edge is a directed connection between nodes
• There are two types of edges
– Control flow edges
– Object flow edges
in an Activity Control Nodes
Diagram
• Initial node
• Final node
–Activity final node
–Flow final node
• Fork node
• Join node
• Merge node
• Decision node
Activity Diagram Example
Fork Join Merge
node node node
Initial
node

Final
node
Activity Diagrams can model Concurrency

• Synchronization of multiple activities


• Splitting the flow of control into multiple threads

Allocate
Splitting Resources Synchronization

Open Coordinate Archive


Incident Resources Incident

Document
Incident

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8
Activity Diagram

Grouping of Activities

• Swimlanes: surrounding rectangles used to


partition the activity diagram activities according
to some criteria, for instance:

• Object or subsystem that implements the activities.


• Different user groups
• Different platforms

Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9
Action Nodes and Object
Nodes
• Action Node Action
Name

Object
• Object Node Name

Write Review
Thesis Thesis Thesis
Activity Diagram Example

Action
Object
node
Activity Nodes & Edges
• An activity diagram consists of nodes and edges
• There are three types of activity nodes
Control nodes
Executable nodes
– Most prominent: Action
Object nodes
– E.g. a document
• An edge is a directed connection between nodes
• There are two types of edges
– Control flow edges
– Object flow edges
Activity Diagram Example

Control
flow

Object
flow

Potrebbero piacerti anche