UML Activity Diagram

From Training Material
Jump to navigation Jump to search


Activity Diagram⌘

ActivityDiagramENExample.png

  • Describes the workflow behavior of a system, focuses on flows.
  • A Process describes a sequence or flow of Activities in an organization with the objective of carrying out work.

Activity, Action⌘

ActivityAction.png

Activity

  • describes a sequence of actions based on control models and object flow models
  • contains edges and activity nodes (e.g. actions)
  • represented by a rectangle with rounded corners

Action

  • is a fundamental unit of executable functionality contained within an Activity
  • represents a single step within an activity

Activity ⌘

Activity contains nodes:

  • Action
  • Object
  • Control Node

and edges:

  • Control Flow
  • Object Flow

ActivityNode.png

Control Flow⌘

ActivityControlFlow.png

  • A control flow is an edge that starts an activity node after the previous one is finished
Object Flow⌘

ObjectFlow.png OR ObjectFlow2.png

ObjectFlow3.png

  • An object flow is an activity edge that can have objects or data passing along it

Objects⌘

ActivityParameter.png

  • Incoming or outgoing objects are parameters
  • Placed (as rectangles) on the border

ActionPin2.png

  • Or as small rectangle, called a pin (input or output)

Token⌘

  • The semantics of an activity is based on a token flow
  • Control tokens and object tokens flow between nodes over edges

Activity Example⌘

ActivityExample.png

Initial Node⌘

ActivityInitialNode.png

  • It has outgoing edges but no incoming edges
  • An activity may have more than one initial node
    • Each generates a concurrent flow
  • An initial node can have more than one outgoing edge
    • Semantics: a control token at each outgoing edge
  • Activity diagrams do not have to have initial nodes
  • Notation: a filled circle

Final Node⌘

ActivityFinalNode.png

  • An activity may have more than one activity final node
  • The first one reached stops all flows in the activity
    • Regardless of the number of tokens in activity
  • At least one incoming edge and no outgoing edges
  • If several incoming edges only one must carry a token
  • Activity diagrams do not have to have final nodes
  • Notation: a filled circle with an outer ring

Decision⌘

ActivityDecision.png

  • is a control node that chooses between outgoing flows
  • One incoming edge and several outgoing edges
  • When a token is supplied guards on outgoing edges are evaluated
    • Token goes to first true outgoing
  • Notation: a rhombus

Merge⌘

ActivityMerge.png

  • A merge node is a control node that brings together multiple alternate flows
    • It is not used to synchronize concurrent flows
  • Several incoming edges, one outgoing edge
  • Nothing calculated, nothing expected
  • Notation: an empty rhombus

Fork, Join⌘

ActivityForkJoin.png

  • Fork – one incoming edge and multiple outgoing edges
  • Join – multiple incoming edges and one outgoing edge

Implicit splitting⌘

ImplicitSplitting.png

Once action A terminates

  • a control token is available at both outgoing edges
  • actions B and C start concurrently

Implicit synchronization⌘

ImplicitSynchronization.png

Action F doesn't start until tokens are available at both incoming edges - actions D and E have to terminate

Implicit split/synchronization - object flow⌘

ImplicitObjectFlow.png

AND semantics for object flows

  • Once action A terminates it provides two object nodes
  • Action F doesn't start until object tokens are available at both incoming edges - actions D and E have to terminate