Get User Operation Log (Historic)
Queries for user operation log entries that fulfill the given parameters. The size of the result set can be retrieved by using the Get User Operation Log Count method.
Note that the properties of operation log entries are interpreted as restrictions on the entities they apply to. That means, if a single process instance is updated, the field processInstanceId
is populated. If a single operation updates all process instances of the same process definition, the field processInstanceId
is null
(a null
restriction is viewed as a wildcard, i.e., matches a process instance with any id) and the field processDefinitionId
is populated. This way, which entities were changed by a user operation can easily be reconstructed.
Method
GET /history/user-operation
Parameters
Query Parameters
Name | Description |
---|---|
deploymentId | Filter by deployment id. |
processDefinitionId | Filter by process definition id. |
processDefinitionKey | Filter by process definition key. |
processInstanceId | Filter by process instance id. |
executionId | Filter by execution id. |
caseDefinitionId | Filter by case definition id. |
caseInstanceId | Filter by case instance id. |
caseExecutionId | Filter by case execution id. |
taskId | Only include operations on this task. |
externalTaskId | Only include operations on this external task. |
batchId | Only include operations on this batch. |
jobId | Filter by job id. |
jobDefinitionId | Filter by job definition id. |
userId | Only include operations of this user. |
operationId | Filter by the id of the operation. This allows fetching of multiple entries which are part of a composite operation. |
operationType | Filter by the type of the operation like Claim or Delegate . See the Javadoc
for a list of available operation types. |
entityType | Filter by the type of the entity that was affected by this operation, possible values are Task , Attachment or IdentityLink . |
entityTypeIn | Filter by a comma-separated list of types of the entities that were affected by this operation, possible values are Task , Attachment or IdentityLink . |
category | Filter by the category that this operation is associated with, possible values are TaskWorker , Admin or Operator . |
categoryIn | Filter by a comma-separated list of categories that this operation is associated with, possible values are TaskWorker , Admin or Operator . |
property | Only include operations that changed this property, e.g., owner or assignee . |
afterTimestamp | Restrict to entries that were created after the given timestamp. By default*, the timestamp must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ , e.g., 2014-02-25T14:58:37.000+0200 . |
beforeTimestamp | Restrict to entries that were created before the given timestamp. By default*, the timestamp must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ , e.g., 2014-02-25T14:58:37.000+0200 . |
sortBy | Sort the results by a given criterion. At the moment the query only supports sorting based on the timestamp .
|
sortOrder | Sort the results in a given order. Values may be asc for ascending order or desc for descending order.
Must be used in conjunction with the sortBy parameter. |
firstResult | Pagination of results. Specifies the index of the first result to return. |
maxResults | Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. |
* For further information, please see the documentation.
Result
A JSON array of user operation log entries. Each log entry has the following properties:
Name | Value | Description |
---|---|---|
id | String | The unique identifier of this log entry. |
userId | String | The user who performed this operation. |
timestamp | String | Timestamp of this operation. |
operationId | String | The unique identifier of this operation. A composite operation that changes multiple properties has a common operationId . |
operationType | String | The type of this operation, e.g., Assign , Claim and so on. |
entityType | String | The type of the entity on which this operation was executed, e.g., Task or Attachment . |
category | String | The name of the category this operation was associated with, e.g., TaskWorker or Admin . |
annotation | String | An arbitrary annotation set by a user for auditing reasons. |
property | String | The property changed by this operation. |
orgValue | String | The original value of the changed property. |
newValue | String | The new value of the changed property. |
deploymentId | String | If not null, the operation is restricted to entities in relation to this deployment. |
processDefinitionId | String | If not null, the operation is restricted to entities in relation to this process definition. |
processDefinitionKey | String | If not null, the operation is restricted to entities in relation to process definitions with this key. |
processInstanceId | String | If not null, the operation is restricted to entities in relation to this process instance. |
executionId | String | If not null, the operation is restricted to entities in relation to this execution. |
caseDefinitionId | String | If not null, the operation is restricted to entities in relation to this case definition. |
caseInstanceId | String | If not null, the operation is restricted to entities in relation to this case instance. |
caseExecutionId | String | If not null, the operation is restricted to entities in relation to this case execution. |
taskId | String | If not null, the operation is restricted to entities in relation to this task. |
externalTaskId | String | If not null, the operation is restricted to entities in relation to this external task. |
batchId | String | If not null, the operation is restricted to entities in relation to this batch. |
jobId | String | If not null, the operation is restricted to entities in relation to this job. |
jobDefinitionId | String | If not null, the operation is restricted to entities in relation to this job definition. |
removalTime | String | The time after which the entry 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 entry. |
* 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. |
Examples
(1) Request
Gets an operation that updates a single task.
GET /history/user-operation?operationType=Claim&userId=demo&sortBy=timestamp&sortOrder=asc
Response
[{"id": "anUserOperationLogEntryId",
"deploymentId": "aDeploymentId",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": null,
"processInstanceId": "aProcessInstanceId",
"executionId": "anExecutionId",
"taskId": "aTaskId",
"jobId": "aJobId",
"jobDefinitionId": "aJobDefinitionId",
"userId": "demo",
"timestamp": "2014-02-25T14:58:37.000+0200",
"operationId": "anOperationId",
"operationType": "Claim",
"entityType": "Task",
"property": "assignee",
"orgValue": null,
"newValue": "demo",
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"category": "TaskWorker",
"annotation": "anAnnotation"}]
(2) Request
Gets an operation that updates a multiple process instances with the same key.
GET /history/user-operation?operationType=Suspend&userId=demo
Response
[{"id": "anUserOperationLogEntryId",
"deploymentId": "aDeploymentId",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": "aProcessDefinitionKey",
"processInstanceId": null,
"executionId": null,
"taskId": null,
"jobId": null,
"jobDefinitionId": null,
"userId": "demo",
"timestamp": "2014-02-25T14:58:37.000+0200",
"operationId": "anOperationId",
"operationType": "Suspend",
"entityType": "ProcessInstance",
"property": "suspensionState",
"orgValue": null,
"newValue": "suspended",
"removalTime": "2018-02-10T14:33:19.000+0200",
"rootProcessInstanceId": "aRootProcessInstanceId",
"category": "Operator",
"annotation": "anAnnotation"}]