CSC340 Information Systems Analysis and Design XI Activity Diagrams Activity Diagrams Petri Nets Examples 2004 John Mylopoulos Activity Diagrams 1 Information Systems Analysis and Design CSC340 Activity Diagrams Like state diagrams activity diagrams describe activities which involve concurrency and synchronization Activity diagrams focus on the flow of actions and events Can be used To model a human task e g a business process To describe a system function represented by a use case To describe the logic of an operation 2004 John Mylopoulos Activity Diagrams 2 Information Systems Analysis and Design CSC340 Petri Nets Petri nets generalize state diagrams by allowing transitions which involve several input and output states Before After 2004 John Mylopoulos Activity Diagrams 3 Information Systems Analysis and Design CSC340 An Example 2004 John Mylopoulos Activity Diagrams 4 Information Systems Analysis and Design CSC340 Order Processing Receive Order failed Authorize Payment for each line item on order Check Line Item in stock Cancel Order succeeded stock assigned to all line items and payment authorized Dispatch Order Assign to Order need to reorder Reorder Item 2004 John Mylopoulos Activity Diagrams 5 Information Systems Analysis and Design CSC340 Decision Points Decision points Calculate total cost cost 50 cost 50 Charge customer s account Get authorization Dead ends there may be transitions in an activity diagram with no destination state this can mean that Not all processing has been specified Or that another activity diagram will take over 2004 John Mylopoulos Activity Diagrams 6 Information Systems Analysis and Design CSC340 Swimlanes Order Processing Finance Receive Order for each line item on order Authorize Payment failed Check Line Item Stock Manager Receive Supply Choose Outstanding Order Items for each chosen Cancel in stock order item Order Assign Goods Assign to to Order Order succeeded stock assigned to all line items and payment authorized need to all outstanding reorder order items filled Dispatch Order Reorder Item 2004 John Mylopoulos Add Remainder to Stock Activity Diagrams 7 Information Systems Analysis and Design CSC340 When to Use What State diagrams are good for modeling the lifetime of an object or actor also for modeling user interfaces and business processes which involve many states Activity diagrams are good for modeling business processes and system processes that involve a lot of concurrency Sequence and collaboration diagrams are useful for modeling interactions several of them can be used to model dialogue structure for a user interface or a business process 2004 John Mylopoulos Activity Diagrams 8 Information Systems Analysis and Design CSC340 Additional Readings Booch99 Booch G et al The Unified Modeling Language User Guide Chapters 19 20 21 24 Addison Wesley Fowler00 Fowler M UML Distilled A Brief Guide to the Standard Object Modelling Language Chapters 8 9 AddisonWesley 2004 John Mylopoulos Activity Diagrams 9
View Full Document
Unlocking...