Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

3.activity Diagram

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Activity Diagrams

March 12, 2014

Activity Diagrams

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

Activity Diagrams

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

They specify both sequential and concurrent flows of activities.

Activity Diagrams

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

They specify both sequential and concurrent flows of activities.


They are used to show the workflow of the system.

Activity Diagrams

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

They specify both sequential and concurrent flows of activities.


They are used to show the workflow of the system.

Activity Diagrams

Flow of control from activity to activity in the system

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

They specify both sequential and concurrent flows of activities.


They are used to show the workflow of the system.

I
I

Activity Diagrams

Flow of control from activity to activity in the system


What activities can be done in parallel

Activity Diagrams
I

UML diagrams that can be used to describe the dynamic


behavior of a system.

They specify both sequential and concurrent flows of activities.


They are used to show the workflow of the system.

I
I
I

Activity Diagrams

Flow of control from activity to activity in the system


What activities can be done in parallel
Alternate paths to the flow

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:

Activity Diagrams

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:
1. rounded rectangles represent actions

Activity Diagrams

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions

Activity Diagrams

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. bars represent the start or end of concurrent activities

Activity Diagrams

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. bars represent the start or end of concurrent activities
4. a black circle represents the initial state

Activity Diagrams

Components

Activity diagrams are constructed using the following shapes,


connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. bars represent the start or end of concurrent activities
4. a black circle represents the initial state
5. an encircled black circle represents the final state

Activity Diagrams

Example
Consider the flow of activities of an order management system.

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.
After the type of order is identified, the order is dispatched.

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.
After the type of order is identified, the order is dispatched.
The problem describes 4 main activities:
1. Send order by customer

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.
After the type of order is identified, the order is dispatched.
The problem describes 4 main activities:
1. Send order by customer
2. Receipt of the order

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.
After the type of order is identified, the order is dispatched.
The problem describes 4 main activities:
1. Send order by customer
2. Receipt of the order
3. Confirm the order

Activity Diagrams

Example
Consider the flow of activities of an order management system. When
a customer sends an order request, the order request system confirms
the receipt of the order.After receiving the order request, condition
checks are performed to check if it is a normal or a special order.
After the type of order is identified, the order is dispatched.
The problem describes 4 main activities:
1. Send order by customer
2. Receipt of the order
3. Confirm the order
4. Dispatch order

Activity Diagrams

Example continued...

Activity Diagrams

Activity vs Action
Activity
An activity consists of a block of statements that take some time to
execute.

Activity Diagrams

Activity vs Action
Activity
An activity consists of a block of statements that take some time to
execute.

Action
An action consists of a single statement and takes an insignificant
amount of time to execute.
I

Actions and activities can be grouped according to actor, object,


or system that performs them.

Activity Diagrams

Activity vs Action
Activity
An activity consists of a block of statements that take some time to
execute.

Action
An action consists of a single statement and takes an insignificant
amount of time to execute.
I

Actions and activities can be grouped according to actor, object,


or system that performs them.

Vertical lines separate the obtained groups.

Activity Diagrams

Activity vs Action
Activity
An activity consists of a block of statements that take some time to
execute.

Action
An action consists of a single statement and takes an insignificant
amount of time to execute.
I

Actions and activities can be grouped according to actor, object,


or system that performs them.

Vertical lines separate the obtained groups.

A swimlane includes all grouped action and activities between


two vertical lines.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed. Otherwise,
an invoice is prepared and sent to the Finance department for follow
up and, at the same time, the order is sent to the Order Fulfillment
department.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed. Otherwise,
an invoice is prepared and sent to the Finance department for follow
up and, at the same time, the order is sent to the Order Fulfillment
department. The Finance department processes the payment once
received and informs the Customer Service department.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed. Otherwise,
an invoice is prepared and sent to the Finance department for follow
up and, at the same time, the order is sent to the Order Fulfillment
department. The Finance department processes the payment once
received and informs the Customer Service department.Also, the
Order Fulfillment department checks to see if the ordered items are
available.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed. Otherwise,
an invoice is prepared and sent to the Finance department for follow
up and, at the same time, the order is sent to the Order Fulfillment
department. The Finance department processes the payment once
received and informs the Customer Service department.Also, the
Order Fulfillment department checks to see if the ordered items are
available. If available, the order is delivered to the customer,
otherwise, it is back ordered.

Activity Diagrams

Example
Consider the flow of activities within a company that receives orders
through the internet.Once the order is received by the Customer
Service department, the customers credit is checked.If the customer
has a bad credit rating, the order is rejected and closed. Otherwise,
an invoice is prepared and sent to the Finance department for follow
up and, at the same time, the order is sent to the Order Fulfillment
department. The Finance department processes the payment once
received and informs the Customer Service department.Also, the
Order Fulfillment department checks to see if the ordered items are
available. If available, the order is delivered to the customer,
otherwise, it is back ordered.In either case, the Customer Service
department is informed to close the order.

Activity Diagrams

Example continued...

Activity Diagrams

Exercise (SW or HW)

Consider the process of ordering pizza over the phone. Draw an


activity diagram representing each step of the process, from the
moment you pick up the phone to the point where you start eating
your pizza. Include activities that others need to perform (i.e. use
swimlanes). Consider also at least three exceptions (e.g. delivery
person wrote down wrong address, delivery person brought the wrong
pizza, pizza shop out of pepperoni,...)

Activity Diagrams

You might also like