Download presentation
Presentation is loading. Please wait.
Published byDonna Hodge Modified over 8 years ago
1
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Activity Diagrams
2
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2 Objectives To read and write UML activity diagrams To know when and how to use activity diagrams
3
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3 Topics Processes and process descriptions Activity diagram notation Activity diagram execution model Making activity diagrams
4
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4 Processes and Their Description Process description notations describe design processes as well as computational processes we design. A process is a collection of related tasks that transforms a set of inputs into a set of outputs. An activity diagram shows actions and the flow of control and data between them.
5
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 5 Activities and Actions An activity is a non-atomic task or procedure decomposable into actions. An action is a task or procedure that cannot be broken into parts. An activity is a non-atomic task or procedure decomposable into actions. An action is a task or procedure that cannot be broken into parts.
6
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 6 Activity Graph Elements activity symbol action node activity edge initial node activity final node
7
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 7 Branching Nodes guards merge node decision node
8
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8 Deadlock RunDrier cannot execute: when the activity begins, there is a token on the edge from the initial node but not on the other incoming edge.
9
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9 Forking and Joining Nodes fork node join node
10
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10 Object Nodes Data and objects are shown as object nodes. object node object node state
11
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11 Control and Data Flow Example control flow data flows
12
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 12 Activity Parameters Activity parameters are object nodes placed on activity symbol boundaries to indicate data or object inputs or outputs. Activity parameters contain the data or object name. Activity parameter types are specified in the activity symbol beneath the activity name.
13
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 13 Activity Parameter Example output activity parameter input activity parameter activity parameter types
14
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 14 Activity Diagram Heuristics Flow control and objects down the page and left to right. Name activities and actions with verb phrases. Name object nodes with noun phrases. Don’t use both control and data flows when a data flow alone can do the job. Make sure that all nodes entering an action node can provide tokens concurrently. Use the [else] guard at every branch.
15
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 15 When to Use Activity Diagrams When making a dynamic model of any process. Design processes (what designers do) Designed processes (what designers create) During analysis During resolution
16
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 16 Summary A process is a collection of related tasks that transforms a set of inputs to a set of outputs. UML activity diagrams model processes by depicting actions and the flow of control and data between them. Activity symbols contain activity graphs consisting of action nodes action edges data nodes special nodes for starting and stopping activities, branching, forking, and joining Activity diagrams can represent any process and are useful throughout software design.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.