A user task is used to model work that needs to be done by a human actor. When the process instance arrives at such a user task, a new job similar to a service task is created. The process instance stops at this point and waits until the job is completed.
Applications like Tasklist can be used by humans to complete these tasks.
Alternatively, a job worker can subscribe to the job type
io.camunda.zeebe:userTask to complete the job manually.
When the job is completed, the user task is completed and the process instance continues.
User task forms
User tasks support specifying a
formKey attribute, using the
zeebe:formDefinition extension element. The form key can be used to specify
an identifier to associate a form to the user task. [Tasklist] supports
embedded Camunda Forms,
these can be embedded into the BPMN process XML as a
extension element of the process element.
User tasks support specifying assignments, using the
zeebe:AssignmentDefinition extension element.
This can be used to define which user the task can be assigned to. One or both of the following
attributes can be specified simultaneously:
assignee: Specifies the user assigned to the task. [Tasklist] will claim the task for this user.
candidateGroups: Specifies the groups of users that the task can be assigned to.
Typically, the assignee and candidate groups are defined as static values (e.g.
sales, operations), but they can also be defined as
= book.author and
book.author)). The expressions are evaluated on activating the user task and must result in a
string for the assignee and a
list of strings for the candidate groups.
For Tasklist to claim the task for a known Tasklist user,
the value of the
assignee must be the user's unique identifier.
The unique identifier depends on the authentication method used to login to Tasklist:
- Camunda Platform 8 (login with email, Google, GitHub):
- Default Basic Auth (elasticsearch):
For example, say you log into Tasklist using Camunda Platform 8 login with email using your email address
email@example.com. Every time a user task activates with
assignee set to value
firstname.lastname@example.org, Tasklist automatically assigns it to you. You'll be able to find your new task under the task dropdown option
Claimed by me.
By default, all job variables are merged into the process instance. This behavior can be customized by defining an output mapping at the user task.
Input mappings can be used to transform the variables into a format accepted by the job worker.
A user task can define an arbitrary number of
taskHeaders; they are static
metadata handed to workers along with the job. The headers can be used
as configuration parameters for the worker.
A user task with a user task form and an assignment definition:
<bpmn:process id="controlProcess" name="Control Process" isExecutable="true">
<!-- Task Form Content -->
<bpmn:userTask id="Activity_025dulo" name="Configure">
<zeebe:assignmentDefinition assignee="= default_controller" candidateGroups="controllers, auditors" />
<zeebe:formDefinition formKey="camunda-forms:bpmn:userTaskForm_2g7iho6" />