UML Activity Diagram Software Engineering EKT 420 What

  • Slides: 17
Download presentation
UML Activity Diagram Software Engineering EKT 420

UML Activity Diagram Software Engineering EKT 420

What is Activity Diagram �Activity diagrams are graphical representations of workflows of stepwise activities

What is Activity Diagram �Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. �In UML, activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. �An activity diagram shows the overall flow of control.

�The flow of execution is modeled as activity nodes connected by activity edges. �A

�The flow of execution is modeled as activity nodes connected by activity edges. �A node can be the execution of a subordinate behavior, such as an arithmetic computation, a call to an operation, or manipulation of object contents. �Activity nodes also include flow of control constructs, such as synchronization, decision, and concurrency control. �Activities may form invocation hierarchies invoking other activities, ultimately resolving to individual actions.

Example 1 Activity diagram for a guided brainstorming process

Example 1 Activity diagram for a guided brainstorming process

Example 2 Activity diagram to authenticate PIN number

Example 2 Activity diagram to authenticate PIN number

Example 3 Activity diagrams with swimlanes © Lethbridge/Laganière 2005 Chapter 8: Modelling Interactions and

Example 3 Activity diagrams with swimlanes © Lethbridge/Laganière 2005 Chapter 8: Modelling Interactions and Behaviour 6

Labels/Symbols/Notation �Initial node. The filled in circle is the starting point of the diagram.

Labels/Symbols/Notation �Initial node. The filled in circle is the starting point of the diagram. �Activity final node. The filled circle with a border is the ending point. An activity diagram can have zero or more activity final nodes. �Activity. The rounded rectangles represent activities that occur. An activity may be physical, such as Inspect Forms, or electronic, such as Display Create Student Screen. �Flow/edge. The arrows on the diagram. �Fork. A black bar with one flow going into it and several leaving it. This denotes the beginning of parallel activity. �Join. A black bar with several flows entering it and one leaving it. All flows going into the join must reach it before processing may continue. This denotes the end of parallel processing.

Labels/Symbols/Notation � Condition. Text such as [Incorrect Form] on a flow, defining a guard

Labels/Symbols/Notation � Condition. Text such as [Incorrect Form] on a flow, defining a guard which must evaluate to true in order to traverse the node. � Decision. A diamond with one flow entering and several leaving. � Merge. A diamond with several flows entering and one leaving. The implication is that one or more incoming flows must reach this point until processing continues, based on any guards on the outgoing flow. � Partitions also called swimlanes, indicating who/what is performing the activities (either the Applicant, Registrar, or System). � Sub-activity indicator. The rake in the bottom corner of an activity, such as in the Apply to University activity, indicates that the activity is described by a more finely detailed activity diagram. In Example 4 the Enroll In Seminar activity includes this symbol. � Flow final. The circle with the X through it. This indicates that the process stops at this point.

Example 4 UML activity diagram with partitions based on actors.

Example 4 UML activity diagram with partitions based on actors.

More labels/symbols �Activity edge is notated by an open arrowhead line connecting two activity

More labels/symbols �Activity edge is notated by an open arrowhead line connecting two activity nodes. �Activity edge connects Fill Order and Review Order.

More labels/symbols �Edges can be named, however, edges are not required to have unique

More labels/symbols �Edges can be named, however, edges are not required to have unique names within an activity. If the edge has a name, it is notated near the arrow. �Activity edge "updated" connects two nodes.

More labels/symbols �Activity edge can have a guard - specification evaluated at runtime to

More labels/symbols �Activity edge can have a guard - specification evaluated at runtime to determine if the edge can be traversed. The guard must evaluate to true for every token that is offered to pass along the edge. �The guard of the activity edge is shown in square brackets that contain the guard. �Fill Order when priority is 1

More labels/symbols �Connectors are generally used to avoid drawing a long edge. This is

More labels/symbols �Connectors are generally used to avoid drawing a long edge. This is purely notational. It does not affect the underlying model. �Connector A connects two edges between Fill Order and Review Order.

More labels/symbols �Object flow edges are activity edges used to show data flow of

More labels/symbols �Object flow edges are activity edges used to show data flow of object and data tokens between action nodes. �An object flow is notated by an arrowed line. �Object flow of Orders between Fill Order and Review Order actions

More labels/symbols �The weight of the edge may be shown in curly braces that

More labels/symbols �The weight of the edge may be shown in curly braces that contain the weight. The weight is a value specification, which may be a constant, that evaluates to a non-zero unlimited natural value. An unlimited weight is notated as "*". �Send Notification when number of Warnings reaches 6

More labels/symbols �Interrupting edge is activity edge expressing interruption for regions having interruptions. It

More labels/symbols �Interrupting edge is activity edge expressing interruption for regions having interruptions. It is rendered as a lightning-bolt. �Cancel Request signal causes interruption resulting in Cancel Order.

More labels/symbols �Activity diagram can have external entity that may exist during the activity

More labels/symbols �Activity diagram can have external entity that may exist during the activity Authenticate Check balance <<system>> Accounting system