Assign a task
PATCH/v1/tasks/:taskId/assign
Assign a task with taskId
to assignee
or the active user. Returns the task.
Request
Path Parameters
The ID of the task.
- application/json
Body
When using REST API with JWT authentication token following request body parameters may be used.
When using a JWT token, the assignee parameter is NOT optional when called directly from the API. The system will not be able to detect the assignee from the JWT token, therefore the assignee parameter needs to be explicitly passed in this instance.
When true
the task that is already assigned may be assigned again. Otherwise the task
must be first unassigned and only then assigned again. (Default: true
)
Responses
- 200
- 400
- 403
- 404
On success returned
- application/json
- Schema
- Example (from schema)
Schema
The unique identifier of the task.
The name of the task.
User Task ID from the BPMN definition.
The name of the process.
When was the task created (renamed equivalent of Task.creationTime
field).
When was the task completed (renamed equivalent of Task.completionTime
field).
The username/id of who is assigned to the task.
Possible values: [CREATED
, COMPLETED
, CANCELED
]
The state of the task.
Reference to the task form.
Reference to the ID of a deployed form. If the form is not deployed, this property is null.
Reference to the version of a deployed form. If the form is not deployed, this property is null.
Is the form embedded for this task? If there is no form, this property is null.
Reference to process definition (renamed equivalent of Task.processDefinitionId
field).
Reference to process instance id (renamed equivalent of Task.processInstanceId
field).
The tenant ID associated with the task.
The due date for the task.
The follow-up date for the task.
The candidate groups for the task.
The candidate users for the task.
{
"id": "string",
"name": "string",
"taskDefinitionId": "string",
"processName": "string",
"creationDate": "string",
"completionDate": "string",
"assignee": "string",
"taskState": "CREATED",
"formKey": "string",
"formId": "string",
"formVersion": 0,
"isFormEmbedded": true,
"processDefinitionKey": "string",
"processInstanceKey": "string",
"tenantId": "string",
"dueDate": "2024-04-03T03:19:13.858Z",
"followUpDate": "2024-04-03T03:19:13.858Z",
"candidateGroups": [
"string"
],
"candidateUsers": [
"string"
]
}
An error is returned when the task is not active (not in the CREATED state).
An error is returned when task was already assigned, except the case when JWT authentication token used and allowOverrideAssignment = true
.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}
An error is returned when user doesn't have the permission to assign another user to this task.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}
An error is returned when the task with the taskId
is not found.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}