Breadcrumbs

Tasks

BPMN shape

BPMN description

tasks.png

A Task is an atomic activity that is included within a process. A task is used in a BPMN diagram if the process can not be specified on a finer level of process model detail.
Generally, an end-user and/or an application are used to perform the task when it is executed.

UML representation

UML description

states.png

As already mentioned above, tasks are atomic from business point of view. However, from an execution point of view, this is not generally true. Actually, it is only true, if the task corresponds to a synchronous service call.
In all other situations the task has to wait for a signal that the task has been done. Thus, the beginning of a task corresponds generally to a state waiting for a signal. At state entry, the task has to be triggered, i.e. by sending a notification.
A task is mapped in a state with an entry handler and, depending on the task type, a signal with a signal handler. Signal and signal handler are indicated on the transition by (...)/(...).

entryActionTask1.png

The handler of the state entry just calls an operation <task name>Begin.
This operation logs the event of the beginning of this task. It is overridable so that own handling can be implemented.

signalHandler.png

The signal handler calls an operation <task name>End when leaving the state.
The task may deliver new data as result. These data are transmitted by the signal in the attribute 'message' of type Any.
As before this operation logs the event of leaving this task. It is overridable so you can implement your own handling.

abstractClass2.png

The abstract <<PersistentState>> class contains the overridable operations that are invoked by each of the handlers.

Not for all tasks it may make sense to wait for an acknowledge signal. For instance, service tasks just call a service. The following table shows the general mapping:

BPMN

UML, generated state, handler and signal

Task Type

State Name

Stereotype

Entry Action

Signal

None

Waiting for <task name>

<<BPMNTask>>

send notification

<task name> Done

IconServiceTask.png

  Service

Executed <task name>

<<BPMNServiceTask>>

call service

./.

IconSendTask.png

  Send

Sending <task name>

<<BPMNSendTask>>

send<task name>

./.

IconReceiveTask.png

  Receive

Waiting for <task name>

<<BPMNReceiveTask>>

./.

<task name> Received

IconUserTask.png

  User

Waiting for <task name>

<<BPMNUserTask>>

send notification

<task name> Done

IconScriptTask.png

  Script

<task name>

<<BPMNTask>>

execute script

./.

Task type IconManualTask.png Manual is not supported as it makes no sense to use manual tasks in an executable process or pool.
Only unmarked tasks are supported yet. Marked tasks (as loop tasks, multiple instance tasks and compensation tasks) must be modeled explicitly.