Information Systems Analysis and DesignCSC340© 2004 John Mylopoulos Activity Diagrams -- 1XI. Activity DiagramsXI. Activity DiagramsActivity DiagramsPetri NetsExamplesInformation Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 2Activity DiagramsActivity Diagrams Like state diagrams, activity diagrams describeactivities which involve concurrency andsynchronization. Activity diagrams focus on the flow of actions andevents. Can be used To model a human task (e.g., a business process). To describe a system function represented by ause case. To describe the logic of an operation.Information Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 3Petri Petri NetsNets Petri nets generalize state diagrams by allowingtransitions which involve several input and output states:BeforeBeforeAfterAfterInformation Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 4An ExampleAn ExampleInformation Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 5Order ProcessingOrder ProcessingReceiveOrderReorderItemDispatchOrderCheckLine ItemAssign toOrderAuthorizePaymentCancelOrderfor each lineitem on order*[in stock][need toreorder][stock assigned toall line items andpayment authorized][succeeded][failed]Information Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 6Decision PointsDecision PointsDecision points:Dead ends: there may be transitions in an activitydiagram with no destination state; this can mean that: Not all processing has been specified; Or, that another activity diagram will take over.Chargecustomer’saccountCalculatetotal costGetauthorization[cost<$50][cost≥$50]Information Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 7SwimlanesSwimlanesReceiveOrderReorderItemDispatchOrderCheckLineItemAssign toOrderfor each lineitem on order*[in stock][need toreorder][stock assigned toall line items andpayment authorized]AuthorizePaymentCancelOrder[succeeded][failed]ReceiveSupplyChooseOutstandingOrder ItemsAssign Goodsto Orderfor each chosenorder item*[all outstandingorder items filled]Add Remainderto StockOrderProcessingFinanceStockManagerInformation Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 8When to Use What?When to Use What? State diagrams are good for modeling the lifetime ofan object or actor, also for modeling user interfacesand business processes which involve many states. Activity diagrams are good for modeling businessprocesses and system processes that involve a lot ofconcurrency. Sequence and collaboration diagrams are useful formodeling interactions; several of them can be used tomodel dialogue structure for a user interface, or abusiness process.Information Systems Analysis and Design CSC340© 2004 John Mylopoulos Activity Diagrams -- 9Additional ReadingsAdditional Readings [Booch99] Booch, G. et al., The Unified Modeling LanguageUser Guide, Chapters 19, 20, 21, 24. Addison-Wesley. [Fowler00] Fowler, M., UML Distilled: A Brief Guide to theStandard Object Modelling Language, Chapters 8, 9.
View Full Document