Upload
john808
View
226
Download
0
Embed Size (px)
Citation preview
7/24/2019 3.Activity Diagram
1/36
Activity Diagrams
March 12, 2014
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
2/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
Activity Diagrams
http://find/http://goback/7/24/2019 3.Activity Diagram
3/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
They specify both sequential and concurrent flows of activities.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
4/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
They specify both sequential and concurrent flows of activities. They are used to show the workflow of the system.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
5/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
They specify both sequential and concurrent flows of activities. They are used to show the workflow of the system.
Flow of control from activity to activity in the system
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
6/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
They specify both sequential and concurrent flows of activities. They are used to show the workflow of the system.
Flow of control from activity to activity in the system What activities can be done in parallel
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
7/36
Activity Diagrams
UML diagrams that can be used to describe the dynamicbehavior of a system.
They specify both sequential and concurrent flows of activities. They are used to show the workflow of the system.
Flow of control from activity to activity in the system What activities can be done in parallel Alternate paths to the flow
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
8/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
9/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
1. rounded rectangles represent actions
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
10/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
11/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. barsrepresent the start or end of concurrent activities
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
12/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. barsrepresent the start or end of concurrent activities
4. a black circlerepresents the initial state
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
13/36
Components
Activity diagrams are constructed using the following shapes,connected by arrows:
1. rounded rectangles represent actions
2. diamonds represent decisions
3. barsrepresent the start or end of concurrent activities
4. a black circlerepresents the initial state
5. an encircled black circlerepresents the final state
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
14/36
Example
Consider the flow of activities of an order management system.
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
15/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
16/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks are performed to check if it is a normal or a special order.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
17/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks 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
http://find/7/24/2019 3.Activity Diagram
18/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks 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
http://find/7/24/2019 3.Activity Diagram
19/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks 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
http://find/7/24/2019 3.Activity Diagram
20/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks 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
http://find/7/24/2019 3.Activity Diagram
21/36
Example
Consider the flow of activities of an order management system. Whena customer sends an order request, the order request system confirmsthe receipt of the order.After receiving the order request, conditionchecks 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
http://find/7/24/2019 3.Activity Diagram
22/36
Example continued...
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
23/36
Activity vs Action
ActivityAn activity consists of a block of statements that take some time toexecute.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
24/36
Activity vs Action
ActivityAn activity consists of a block of statements that take some time toexecute.
Action
An action consists of a single statement and takes an insignificantamount of time to execute.
Actions and activities can be grouped according to actor, object,or system that performs them.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
25/36
Activity vs Action
ActivityAn activity consists of a block of statements that take some time toexecute.
Action
An action consists of a single statement and takes an insignificantamount of time to execute.
Actions and activities can be grouped according to actor, object,or system that performs them.
Vertical lines separate the obtained groups.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
26/36
Activity vs Action
ActivityAn activity consists of a block of statements that take some time toexecute.
Action
An action consists of a single statement and takes an insignificantamount of time to execute.
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 betweentwo vertical lines.
Activity Diagrams
http://goforward/http://find/http://goback/7/24/2019 3.Activity Diagram
27/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
28/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
29/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas a bad credit rating, the order is rejected and closed.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
30/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas 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 Fulfillmentdepartment.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
31/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas 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 Fulfillmentdepartment. The Finance department processes the payment oncereceived and informs the Customer Service department.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
32/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas 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 Fulfillmentdepartment. The Finance department processes the payment oncereceived and informs the Customer Service department.Also, theOrder Fulfillment department checks to see if the ordered items areavailable.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
33/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas 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 Fulfillmentdepartment. The Finance department processes the payment oncereceived and informs the Customer Service department.Also, theOrder Fulfillment department checks to see if the ordered items areavailable. If available, the order is delivered to the customer,
otherwise, it is back ordered.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
34/36
Example
Consider the flow of activities within a company that receives ordersthrough the internet.Once the order is received by the CustomerService department, the customers credit is checked.If the customerhas 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 Fulfillmentdepartment. The Finance department processes the payment oncereceived and informs the Customer Service department.Also, theOrder Fulfillment department checks to see if the ordered items areavailable. If available, the order is delivered to the customer,
otherwise, it is back ordered.In either case, the Customer Servicedepartment is informed to close the order.
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
35/36
Example continued...
Activity Diagrams
http://find/7/24/2019 3.Activity Diagram
36/36
Exercise (SW or HW)
Consider the process of ordering pizza over the phone. Draw anactivity diagram representing each step of the process, from themoment you pick up the phone to the point where you start eating
your pizza. Include activities that others need to perform (i.e. useswimlanes). Consider also at least three exceptions (e.g. deliveryperson wrote down wrong address, delivery person brought the wrongpizza, pizza shop out of pepperoni,...)
Activity Diagrams
http://find/