External Task Logs (POST)

Queries for historic external task logs that fulfill the given parameters. This method is slightly more powerful than the Get External Task Logs method because it allows filtering by historic external task logs values of the different types String, Number or Boolean.

Method

POST /enhancement/history/external-task-log

Parameters

Request Body

A JSON object with the following properties:

Name Description
logId Filter by historic external task log id.
externalTaskId Filter by external task id.
topicName Filter by an external task topic.
workerId Filter by the id of the worker that the task was most recently locked by.
errorMessage Filter by external task exception message.
activityIdIn Only include historic external task logs which belong to one of the passed activity ids.
activityInstanceIdIn Only include historic external task logs which belong to one of the passed activity instance ids.
executionIdIn Only include historic external task logs which belong to one of the passed execution ids.
processInstanceId Filter by process instance id.
processDefinitionId Filter by process definition id.
processDefinitionKey Filter by process definition key.
tenantIdIn Only include historic external task log entries which belong to one of the passed and comma-separated tenant ids.
withoutTenantId Only include historic external task log entries that belong to no tenant. Value may only be true, as false is the default behavior.
priorityLowerThanOrEquals Only include logs for which the associated external task had a priority lower than or equal to the given value. Value must be a valid long value.
priorityHigherThanOrEquals Only include logs for which the associated external task had a priority higher than or equal to the given value. Value must be a valid long value.
creationLog Only include creation logs. Value may only be true, as false is the default behavior.
failureLog Only include failure logs. Value may only be true, as false is the default behavior.
successLog Only include success logs. Value may only be true, as false is the default behavior.
deletionLog Only include deletion logs. Value may only be true, as false is the default behavior.
lockedLog Only include lockedLog logs. Value may only be true, as false is the default behavior.
unlockedLog Only include unlockedLog logs. Value may only be true, as false is the default behavior.
extendLockedDurationLog Only include extendLockedDurationLog logs. Value may only be true, as false is the default behavior.
sorting

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:

Name Description
sortBy Mandatory. Sort the results by a given criterion. Valid values are timestamp, externalTaskId, topicName, workerId, retries, priority, activityId, activityInstanceId, executionId, processInstanceId, processDefinitionId, processDefinitionKey and tenantId.
sortOrder Mandatory. Sort the results in a given order. Values may be asc for ascending order or desc for descending order.

Result

A JSON array of historic external task log objects. Each historic external task log object has the following properties:

Name Type Description
id String The id of the log entry.
externalTaskId String The id of the external task.
timestamp String The time when the log entry has been written.
topicName String The topic name of the associated external task.
workerId String The id of the worker that posessed the most recent lock.
retries Number The number of retries the associated external task has left.
priority Number The execution priority the external task had when the log entry was created.
errorMessage String The message of the error that occurred by executing the associated external task.
activityId String The id of the activity on which the associated external task was created.
activityInstanceId String The id of the activity instance on which the associated external task was created.
executionId String The execution id on which the associated external task was created.
processInstanceId String The id of the process instance on which the associated external task was created.
processDefinitionId String The id of the process definition which the associated external task belongs to.
processDefinitionKey String The key of the process definition which the associated external task belongs to.
tenantId String The id of the tenant that this historic external task log entry belongs to.
state interger A flag indicating that this log represents the state of the associated external task.state:0-create 1-failed 2-success 3-deleted 4-locked 5-unlocked 6-extend-lock-duration
removalTime String The time after which this log should be removed by the History Cleanup job. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
rootProcessInstanceId String The process instance id of the root process instance that initiated the process containing this log.

* For further information, please see the documentation.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. See the Introduction for the error response format.

Example

Request

POST /enhancement/history/external-task-log

Request Body:

{
  "externalTaskId": "anExternalTaskId"
}

Response

[
	{
	  "id" : "someId",
	  "timestamp" : "2017-01-15T15:22:20.000+0200",
	  "externalTaskId" : "anExternalTaskId",
	  "topicName" : "aTopicName",
	  "workerId" : "aWorkerId",
	  "retries" : 3,
	  "priority": 5,
	  "errorMessage" : "An error occured!",
	  "activityId" : "externalServiceTask",
	  "activityInstanceId" : "externalServiceTask:15",
	  "executionId" : "anExecutionId",
	  "processInstanceId" : "aProcessInstanceId",
	  "processDefinitionId" : "aProcessDefinitionId",
	  "processDefinitionKey" : "aProcessDefinitionKey",
	  "tenantId": null,
    "state": 0,
	  "removalTime":"2018-02-10T14:33:19.000+0200",
	  "rootProcessInstanceId": "aRootProcessInstanceId"
	}
]

On this Page: