activity modeling
DESCRIPTION
Rekayasa Perangkat LunakTRANSCRIPT
![Page 1: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/1.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Lecture 6
Activity Diagrams(Fowler Chp 11)
(Figures from Fowler, UML Distilled)
![Page 2: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/2.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Modern version of classic flowchart– Updated to show parallel flow– Significantly updated in UML 2.0
• Most versatile UML diagram– Procedural logic– Algorithms– Business process– Workflow– Complex use case flows– Substitute for classic data flow diagram
![Page 3: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/3.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Most underutilized UML diagram– Don’t require technical SAD expertise– Don’t require OOAD expertise– Understandable by stakeholders– Can show varying level of complexity
![Page 4: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/4.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Diagram essentials– Initial & Final Nodes
• Beginning & end of diagram• Final node is within circle
– Actions• Rounded rectangles• An activity is a sequence of actions• For clarity, show 1 incoming & 1 outgoing edge/action
– Forks & Joins• Beginning & end of parallel activities• Think multithreaded processes• Forks must be completed by joins
![Page 5: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/5.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
– Directed arrows (flow/edge)• Show sequence of activities
– Diamonds w/ outward flows (decision)• Depict alternative flow based on boolean
expression• Think if/else
– Diamonds w/ inward flows (merge)• Reconnects a thread after a decision is completed• Think initial statement after an if/else block
![Page 6: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/6.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 7: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/7.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Actions can be decomposed into activity diagrams
• Enclosing action is labeled– It contains an activity diagram
• Next figure shows a detailed activity diagram of the order action
![Page 8: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/8.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 9: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/9.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Rake symbol in an action implies presence of sub-activity diagram for the action
• See next figure
![Page 10: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/10.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 11: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/11.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Partitions (aka swimlanes)– Depict who is responsible for completing an
action– Very useful for workflow modeling
![Page 12: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/12.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 13: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/13.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Signals– Action sequence may initiate due to a signal or event
(e.g., time) • Hourglass symbol
– Actions listen for signals • Action with inward angled edge
– Actions may generate signals for other actions • Action with outward angled edge
– Hourglass symbol used for signal
![Page 14: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/14.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 15: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/15.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 16: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/16.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Flows & Edges– Synonymous terms– Usually directed lines (arrowhead implies
direction)– Can use connector symbols for drawing clarity
• Helps when diagrams continues on another page
– Objects can be passed along edges
![Page 17: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/17.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 18: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/18.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Pins & Transformations– Actions can have parameters like methods– An action’s outputs must correspond to inputs of next
action– If outputs != inputs then must indicate a
transformation
![Page 19: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/19.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 20: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/20.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Expansion regions– Used to show iteration (looping) over a collection
• Internal actions can be sequential or parallel (concurrent)
– Enclosed actions occur once for each item in collection
![Page 21: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/21.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 22: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/22.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Flow final– Essentially a terminating node within an expansion
region– Each iteration need not produce an output token– Shows a filtering operation
![Page 23: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/23.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
![Page 24: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/24.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams
• Join specification– Allows boolean constraint to control the
behavior of a join
![Page 25: Activity Modeling](https://reader035.vdocuments.net/reader035/viewer/2022062407/55cf8fca550346703b9fe5f8/html5/thumbnails/25.jpg)
Copyright 2005 by Glenn L. Ray, all rights reserved
Activity Diagrams