software engineering ekt 420. what is activity diagram activity diagrams are graphical...

17
UML Activity Diagram Software Engineering EKT 420

Upload: andrew-cox

Post on 24-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

UML Activity DiagramSoftware Engineering EKT 420

Page 2: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

What is Activity DiagramActivity 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.

Page 3: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

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.

Page 4: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

Example 1Activity diagram for a guided brainstorming process

Page 5: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

Example 2

Activity diagram to authenticate PIN number

Page 6: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

© Lethbridge/Laganière 2005

Chapter 8: Modelling Interactions and Behaviour 6

Example 3 Activity diagrams with swimlanes

Page 7: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

Labels/Symbols/NotationInitial 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.

Page 8: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

Labels/Symbols/NotationCondition.  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.

Partition. 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. 

Page 9: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

Example 4 UML activity diagram with partitions based on actors.

Page 10: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsActivity edge is notated by an open

arrowhead line connecting two activity nodes.

Activity edge connects Fill Order and Review Order.

Page 11: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsEdges 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.

Page 12: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsActivity 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

Page 13: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsConnectors 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.

Page 14: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsObject 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

Page 15: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsThe 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

Page 16: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsInterrupting 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.

Page 17: Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions

More labels/symbolsActivity diagram can have external entity

that may exist during the activity

Authenticate

Check balance

<<system>>Accounting

system