Presentation is loading. Please wait.

Presentation is loading. Please wait.

Activity Diagrams.

Similar presentations


Presentation on theme: "Activity Diagrams."— Presentation transcript:

1 Activity Diagrams

2 Definition Activity diagrams represent the dynamics of the system.
They are flow charts that are used to show the workflow of a system. They show. The flow of control from activity to activity in the system, What activities can be done in parallel. Alternate paths through the flow. They can show the flow across use cases or within a use case. Helpful in developing system sequence diagrams (SSD)

3 Activity Diagram Supplements the use-case by providing a diagrammatic representation of procedural flow Details: Start is a single circle End is a bulls-eye Decisions are diamonds (guards must be on both branches of the diamond!) Start Marker Stop Marker

4 Activity Diagram Example
Fork/Branch To show concurrent activity, activity diagrams allow branches and joins. You can also reference or include other activity diagrams Got here Class -- Sept 30th 2008 Synch. Bar (Join) Join Splitting Bar (Fork)

5 [no coffee] [no cola] Find Beverage [found coffee] Put coffee in filter Add water to reservoir Get cups Get can of cola Put filter in machine Turn on machine Brew coffee Pour coffee Drink Beverage

6 When to Use Activity Diagrams
Do use them for Analysing Use Cases. Understanding workflow across many Use Cases. Dealing with multi-threaded applications. Don’t use them to see how objects collaborate. to see how an object behaves over its lifetime.

7 Example: Activity Diagram for Receiving an Order
Receive order * for each line item on order Check line item [failed] Authorise Payment [in stock] Cancel Order [succeeded] Assign to Order [need to reorder] Reorder item [stock assigned to all line items and payment authorised] Dispatch Order

8 Example: Activity Diagram for receiving Supply
Receive Supply Example: Activity Diagram for receiving Supply Choose outstanding order items * for each chosen order item Assign goods to order [all outstanding order items filled] Add remainder to stock Dispatch Order

9 Combined Activity Diagram
Receive order Receive Supply * for each line item on order Choose outstanding order items Check line item Authorise Payment [in stock] [failed] * for each chosen order item [succeeded] Assign to Order Assign goods to order Cancel Order [need to reorder] Reorder item [stock assigned to all line items and payment authorised] [all outstanding order items filled] Dispatch Order Add remainder to stock

10 [all outstanding order items filled]
Finance Order Processing Stock Manager Receive order Receive Supply * for each line item on order Choose outstanding order items Check line item Authorise Payment [in stock] [failed] * for each chosen order item [succeeded] Assign to Order Assign goods to order Cancel Order [need to reorder] Reorder item [stock assigned to all line items and payment authorised] [all outstanding order items filled] Dispatch Order Add remainder to stock With Swimlanes

11 Example: Business Level Activity Diagram of the Library
With Swimlanes member Librarian [borrower] Find book on shelf [returning] [returner] Wait in queue [borrowing] Record return Put book back of shelf Record borrowing Prepare for next member


Download ppt "Activity Diagrams."

Similar presentations


Ads by Google