External Task

Fetch and Lock

Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted to specific task topics and for each task topic an individual lock time can be provided.

post/external-task/fetchAndLock

Request

  • Base URL: http://localhost:8080/engine-rest
  • URL: http://localhost:8080/engine-rest/external-task/fetchAndLock
  • Auth: HTTP basic

Request body

workerIdstring required

Mandatory. The id of the worker on which behalf tasks are fetched. The returned tasks are locked for that worker and can only be completed when providing the same worker id.

maxTasksinteger nullable required

Mandatory. The maximum number of tasks to return.

usePriorityboolean nullable

A boolean value, which indicates whether the task should be fetched based on its priority or arbitrarily.

asyncResponseTimeoutinteger nullable

The Long Polling timeout in milliseconds.

Note: The value cannot be set larger than 1.800.000 milliseconds (corresponds to 30 minutes).

Response

Request successful.

activityIdstring nullable

The id of the activity that this external task belongs to.

activityInstanceIdstring nullable

The id of the activity instance that the external task belongs to.

errorMessagestring nullable

The full error message submitted with the latest reported failure executing this task;null if no failure was reported previously or if no error message was submitted

errorDetailsstring nullable

The error details submitted with the latest reported failure executing this task.null if no failure was reported previously or if no error details was submitted

executionIdstring nullable

The id of the execution that the external task belongs to.

idstring nullable

The id of the external task.

lockExpirationTimestring date-time nullable

The date that the task's most recent lock expires or has expired.

processDefinitionIdstring nullable

The id of the process definition the external task is defined in.

processDefinitionKeystring nullable

The key of the process definition the external task is defined in.

processDefinitionVersionTagstring nullable

The version tag of the process definition the external task is defined in.

processInstanceIdstring nullable

The id of the process instance the external task belongs to.

tenantIdstring nullable

The id of the tenant the external task belongs to.

retriesinteger nullable

The number of retries the task currently has left.

suspendedboolean nullable

Whether the process instance the external task belongs to is suspended.

workerIdstring nullable

The id of the worker that posesses or posessed the most recent lock.

priorityinteger nullable

The priority of the external task.

topicNamestring nullable

The topic name of the external task.

businessKeystring nullable

The business key of the process instance the external task belongs to.

variablesobject nullable

A JSON object containing a property for each of the requested variables. The key is the variable name, the value is a JSON object of serialized variable values with the following properties:

extensionPropertiesobject

A JSON object containing a property for each extension property. The key is the property name, the value is the property value

createTimestring date-time nullable

The date that the task was created.

Changes

No recorded changes to this operation across all 1 revision of this API.