Prev Next

Activity

An Activity for UML Activity Diagrams as depicted using Sparx Systems Enterprise Architect.

Description

An Activity organizes and specifies the participation of subordinate behaviors, such as sub-Activities or Actions, to reflect the control and data flow of a process. Activities are used in Activity diagrams for various modeling purposes, from procedural-type application development for system design, to business process modeling of organizational structures or workflow.

This simple diagram of an Activity contains Action elements and includes input parameters and output parameters.

A UML Activty Diagram example using Sparx Systems Enterprise Architect.

You can define an Activity as a composite element, either during creation or during later edits. When creating a composite Activity element, it is simpler to apply the mechanism for creating Structured Activity elements, which reduces the number of steps to work through. If converting an existing Activity element, right-click on the element and select the 'New Child Diagram | Composite Structure Diagram' option.

Certain properties can be graphically depicted on an Activity. The Actions in an Activity can be further organized by Activity Partitions.

An Activity can also be depicted as an Expansion Node to indicate that the Activity consists of an Expansion Region.

If you have defined a Decision Table for the Activity element, you can select options on the element's context menu to render the element on a diagram as the Decision Table, showing the rules as either rows or columns. You can also return the element to its normal element shape.

Toolbox icon

Activity element

Learn more

OMG UML Specification:

The OMG Unified Modeling Language specification, (v2.5.1, pp.373-374) states:

An Activity is a Behavior specified as sequencing of subordinate units, using a control and data flow model. Subordinate behaviors coordinated by these models may be initiated because other behaviors in the model finish executing, because objects and data become available or because events occur externally to the flow. The flow of execution is modeled as ActivityNodes connected by ActivityEdges. An ExecutableNode can be the execution of a subordinate behavior, such as an arithmetic computation, a call to an operation, or manipulation of object contents (...). ActivityNodes also include flow-of-control constructs, such as synchronization, decision, and concurrency control.

Tokens are not explicitly modeled in an Activity, but are used for describing the execution of an Activity. An object token is a container for a value that flows over ObjectFlow edges (some object tokens can flow over ControlFlow edges, as specified by the modeler, see isControlType for ObjectNodes in sub clause 15.4). An object token with no value in it is called a null token. A control token affects execution of ActivityNodes, but does not carry any data, and flows only over ControlFlow edges. Each token is distinct from any other, even if it contains the same value as another.