Скачиваний:
25
Добавлен:
28.01.2021
Размер:
7.15 Mб
Скачать

10.3 Activities

An Activity is work that is performed within a Business Process. An Activity can be atomic or non-atomic (compound). The types of Activities that are a part of a Process are: Task, Sub-Process, and Call Activity, which allows the inclusion of re-usable Tasks and Processes in the diagram. However, a Process is not a specific graphical object. Instead, it is a set of graphical objects. The following sub clauses will focus on the graphical objects SubProcess and Task.

Activities represent points in a Process flow where work is performed. They are the executable elements of a BPMN Process.

The Activity class is an abstract element, sub-classing from FlowElement (as shown in Figure 10.6).

Concrete sub-classes of Activity specify additional semantics above and beyond that defined for the generic Activity.

Figure 10.6 – Activity class diagram

The Activity class is the abstract super class for all concrete Activity types.

The Activity element inherits the attributes and model associations of FlowElement (see Table 8.44). Table 10.3 presents the additional attributes and model associations of the Activity element.

Business Process Model and Notation (BPMN), v2.0.2

149

Table 10.3 – Activity attributes and model associations

Attribute Name

Description/Usage

 

 

isForCompensation: boolean = false

A flag that identifies whether this Activity is intended for the purposes of

 

compensation.

 

If false, then this Activity executes as a result of normal execution flow.

 

If true, this Activity is only activated when a Compensation Event is

 

detected and initiated under Compensation Event visibility scope (see

 

page 280 for more information on scopes).

 

 

loopCharacteristics:

An Activity MAY be performed once or MAY be repeated. If repeated,

LoopCharacteristics [0..1]

the Activity MUST have loopCharacteristics that define the repe-

 

 

tition criteria (if the isExecutable attribute of the Process is set to

 

true).

 

 

resources: ResourceRole [0..*]

Defines the resource that will perform or will be responsible for the

 

Activity. The resource, e.g., a performer, can be specified in the form of

 

a specific individual, a group, an organization role or position, or an orga-

 

nization.

 

 

default: SequenceFlow [0..1]

The Sequence Flow that will receive a token when none of the

 

conditionExpressions on other outgoing Sequence Flows evalu-

 

ate to true. The default Sequence Flow should not have a

 

conditionExpression. Any such Expression SHALL be ignored.

ioSpecification: Input

The InputOutputSpecification defines the inputs and outputs and

OutputSpecification [0..1]

the InputSets and OutputSets for the Activity. See page 210 for

 

 

more information on the InputOutputSpecification.

properties: Property [0..*]

Modeler-defined properties MAY be added to an Activity. These

 

properties are contained within the Activity.

boundaryEventRefs:

This references the Intermediate Events that are attached to the

BoundaryEvent [0..*]

boundary of the Activity.

 

 

 

dataInputAssociations:

An optional reference to the DataInputAssociations. A

DataInputAssociation [0..*]

DataInputAssociation defines how the DataInput of the Activity’s

 

 

InputOutputSpecification will be populated.

dataOutputAssociations:

An optional reference to the DataOutputAssociations.

DataOutputAssociation [0..*]

 

 

 

startQuantity: integer = 1

The default value is 1. The value MUST NOT be less than 1. This attri-

 

bute defines the number of tokens that MUST arrive before the

 

Activity can begin. Note that any value for the attribute that is greater

 

than 1 is an advanced type of modeling and should be used with caution.

 

 

150

Business Process Model and Notation (BPMN), v2.0.2

Table 10.3 – Activity attributes and model associations

completionQuantity: integer = 1

The default value is 1. The value MUST NOT be less than 1. This attri-

 

bute defines the number of tokens that MUST be generated from the

 

Activity. This number of tokens will be sent done any outgoing

 

Sequence Flow (assuming any Sequence Flow conditions are satis-

 

fied). Note that any value for the attribute that is greater than 1 is an

 

advanced type of modeling and should be used with caution.

 

 

In addition, an Activity instance has attributes whose values MAY be referenced by Expressions. These values are only available when the Activity is being executed.

Table 10.4 presents the instance attributes of the Activity element.

Table 10.4 – Activity instance attributes

Attribute Name

Description/Usage

 

 

state: string = None

See Figure 13.2 ("The Lifecycle of a BPMN Activity") in Section 13.3.2

 

for permissible values.

 

 

Sequence Flow Connections

See “Sequence Flow Connections Rules” on page 40 for the entire set of objects and how they MAY be sources or targets of Sequence Flows.

An Activity MAY be a target for Sequence Flows; it can have multiple incoming Sequence Flows. Incoming Sequence Flows MAY be from an alternative path and/or parallel paths.

If the Activity does not have an incoming Sequence Flow, then the Activity MUST be instantiated when the Process is instantiated.

There are two exceptions to this: Compensation Activities and Event Sub-Processes.

NOTE: If the Activity has multiple incoming Sequence Flows, then this is considered uncontrolled flow. This means that when a token arrives from one of the Paths, the Activity will be instantiated. It will not wait for the arrival of tokens from the other paths. If another token arrives from the same path or another path, then a separate instance of the Activity will be created. If the flow needs to be controlled, then the flow should converge on a Gateway that precedes the Activities (see “Gateways” on page 286 for more information on Gateways).

An Activity MAY be a source for Sequence Flows; it can have multiple outgoing Sequence Flows. If there are multiple outgoing Sequence Flows, then this means that a separate parallel path is being created for each Sequence Flow (i.e., tokens will be generated for each outgoing Sequence Flow from the Activity).

If the Activity does not have an outgoing Sequence Flow, then the Activity marks the end of one or more paths in the Process. When the Activity ends and there are no other parallel paths active, then the Process MUST be completed.

There are two exceptions to this: Compensation Activities and Event Sub-Processes.

Message Flow Connections

See “Message Flow Connection Rules” on page 41 for the entire set of objects and how they MAY be sources or targets of Message Flows.

Business Process Model and Notation (BPMN), v2.0.2

151