You are on page 1of 13

UML Diagrams

Activity Diagram
Overview of UML Diagrams
Behavioral
Structural
: behavioral features of a system / business
process
: element of spec. irrespective of time
• Activity
• State machine
• Class
• Use case
• Component
• Interaction
• Deployment
• Object
• Package Interaction
: emphasize object interaction

• Communication(collaberati
on)
• Sequence
• Interaction overview
• Timing
Activity diagram
• It helps to describe the flow of control of the
target system, such as the exploring complex
business rules and operations, describing the
use case also the business process.
• Activity Diagrams are like Flow Charts, but Flow
Charts are usually limited to sequential activities
while Activity Diagrams can show parallel
activities as well
Activity diagram
• Activity Diagrams consist of activities and
transitions between activities
• Activity Diagrams describe:
– how the events in a single use case relate to one
another
– how a collection of use cases coordinate to
create a workflow for an organization
– focus on the flow of activities involved in a single
process
– how activities depend on one another
Activity Diagram Elements
• Activities and Actions
• Transitions
• Triggers
• Gaurds
• Control Nodes
– Initial and Final Nodes
– Forks and Joins
– Decision and Merge Points
• Swimlanes
What is an Activity?
• Two definitions
– In a conceptual diagram, an activity is some task that needs
to be done, whether by a human or a computer
– In a specification-perspective diagram or an implementation-
perspective diagram, an activity is a method on a class
• Activity arrangement
– Sequential – one activity is followed by another
– Parallel – two or more sets of activities are performed
concurrently, and order is irrelevant
• Interleaving is permitted – we can jump between the
parallel flows

6
Concurrent Activities

7
Synchronization Bar

8
Activity Diagrams – Notation (concluded)

Activity – an oval
Trigger – path exiting an activity
Guard – each trigger has a guard, a
logical expression that evaluates to “true”
or “false”
Synchronization Bar – can break a
trigger into multiple triggers operating in
parallel or can join multiple triggers into
one when all are complete
Decision Diamond – used to describe
nested decisions (the first decision is
indicated by an activity with multiple
triggers coming out of it)

9
Swimlanes

10
Activity
diagram

withdraw
money
(ATM)
Place Order
When to use Activity Diagram?

13

You might also like