Skip to main content
POST
/
external-task
Get List (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/external-task \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "processDefinitionId": "aProcessDefinitionId",
  "sorting": [
    {
      "sortBy": "processDefinitionKey",
      "sortOrder": "asc"
    },
    {
      "sortBy": "lockExpirationTime",
      "sortOrder": "desc"
    },
    {
      "sortBy": "createTime",
      "sortOrder": "asc"
    }
  ]
}'
[
  {
    "activityId": "anActivityId",
    "activityInstanceId": "anActivityInstanceId",
    "errorMessage": "anErrorMessage",
    "executionId": "anExecutionId",
    "id": "anExternalTaskId",
    "lockExpirationTime": "2015-10-06T16:34:42.000+0200",
    "processDefinitionId": "aProcessDefinitionId",
    "processDefinitionKey": "aProcessDefinitionKey",
    "processInstanceId": "aProcessInstanceId",
    "tenantId": null,
    "retries": 3,
    "suspended": false,
    "workerId": "aWorkerId",
    "topicName": "aTopic",
    "priority": 9,
    "businessKey": "aBusinessKey"
  },
  {
    "activityId": "anotherActivityId",
    "activityInstanceId": "anotherActivityInstanceId",
    "errorMessage": "anotherErrorMessage",
    "executionId": "anotherExecutionId",
    "id": "anotherExternalTaskId",
    "lockExpirationTime": "2015-10-06T16:34:42.000+0200",
    "processDefinitionId": "aProcessDefinitionId",
    "processDefinitionKey": "anotherProcessDefinitionKey",
    "processInstanceId": "anotherProcessInstanceId",
    "tenantId": null,
    "retries": 1,
    "suspended": false,
    "workerId": "aWorkerId",
    "topicName": "aTopic",
    "priority": 3,
    "businessKey": "aBusinessKey"
  }
]

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

firstResult
integer

Pagination of results. Specifies the index of the first result to return.

maxResults
integer

Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Body

application/json

A JSON object with the following properties:

externalTaskId
string | null

Filter by an external task's id.

externalTaskIdIn
string[] | null

Filter by the comma-separated list of external task ids.

topicName
string | null

Filter by an external task topic.

workerId
string | null

Filter by the id of the worker that the task was most recently locked by.

locked
boolean | null

Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be true, as false matches any external task.

notLocked
boolean | null

Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be true, as false matches any external task.

withRetriesLeft
boolean | null

Only include external tasks that have a positive (> 0) number of retries (or null). Value may only be true, as false matches any external task.

noRetriesLeft
boolean | null

Only include external tasks that have 0 retries. Value may only be true, as false matches any external task.

lockExpirationAfter
string<date-time> | null

Restrict to external tasks that have a lock that expires after a given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.

lockExpirationBefore
string<date-time> | null

Restrict to external tasks that have a lock that expires before a given date. By default, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.

activityId
string | null

Filter by the id of the activity that an external task is created for.

activityIdIn
string[] | null

Filter by the comma-separated list of ids of the activities that an external task is created for.

executionId
string | null

Filter by the id of the execution that an external task belongs to.

processInstanceId
string | null

Filter by the id of the process instance that an external task belongs to.

processInstanceIdIn
string[] | null

Filter by a comma-separated list of process instance ids that an external task may belong to.

processDefinitionId
string | null

Filter by the id of the process definition that an external task belongs to.

tenantIdIn
string[] | null

Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids.

active
boolean | null

Only include active tasks. Value may only be true, as false matches any external task.

suspended
boolean | null

Only include suspended tasks. Value may only be true, as false matches any external task.

priorityHigherThanOrEquals
integer | null

Only include jobs with a priority higher than or equal to the given value. Value must be a valid long value.

priorityLowerThanOrEquals
integer | null

Only include jobs with a priority lower than or equal to the given value. Value must be a valid long value.

sorting
object[] | null

A JSON array of criteria to sort the result by. Each element of the array is a JSON object that specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. The ordering objects have the following properties:

**Note:** The `sorting` properties will not be applied to the External Task count query.

Response

Request successful. The Response is a JSON array of external task objects.

activityId
string | null

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

activityInstanceId
string | null

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

errorMessage
string | null

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

executionId
string | null

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

id
string | null

The id of the external task.

lockExpirationTime
string<date-time> | null

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

processDefinitionId
string | null

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

processDefinitionKey
string | null

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

processDefinitionVersionTag
string | null

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

processInstanceId
string | null

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

tenantId
string | null

The id of the tenant the external task belongs to.

retries
integer | null

The number of retries the task currently has left.

suspended
boolean | null

A flag indicating whether the external task is suspended or not.

workerId
string | null

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

topicName
string | null

The topic name of the external task.

priority
integer | null

The priority of the external task.

businessKey
string | null

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