Get Variable Instances (POST)
Queries for historic variable instances that fulfill the given parameters.
This method is slightly more powerful than the Get Variable Instances method because it allows filtering by variable values of the different types String
, Number
or Boolean
.
Method
POST /history/variable-instance
Parameters
Query Parameters
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. |
deserializeValues |
Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on server side (default true ).
If set to If set to Note: While |
Request Body
A JSON object with the following properties:
Name | Description | ||||
---|---|---|---|---|---|
variableName | Filter by variable name. | ||||
variableNameLike | Restrict to variables with a name like the parameter. | ||||
variableValue | Filter by variable value. May be String , Number or Boolean . |
||||
variableTypeIn | Only include historic variable instances which belong to one of the passed and comma-separated variable types. A list of all supported variable types can be found here. Note: All non-primitive variables are assoziated with the type "serializable". | ||||
processInstanceId | Filter by the process instance the variable belongs to. | ||||
processInstanceIdIn | Only include historic variable instances which belong to one of the passed process instance ids. | ||||
processDefinitionId | Filter by the process definition the variable belongs to. | ||||
executionIdIn | Only include historic variable instances which belong to one of the passed execution ids. | ||||
caseInstanceId | Filter by the case instance the variable belongs to. | ||||
caseExecutionIdIn | Only include historic variable instances which belong to one of the passed case execution ids. | ||||
caseActivityIdIn | Only include historic variable instances which belong to one of the passed case activity ids. | ||||
taskIdIn | Only include historic variable instances which belong to one of the passed task ids. | ||||
activityInstanceIdIn | Only include historic variable instances which belong to one of the passed activity instance ids. | ||||
tenantIdIn | Only include historic variable instances which belong to one of the passed and comma-separated tenant ids. | ||||
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:
|
Result
A JSON array of historic variable instance objects. Each historic activity instance object has the following properties:
Name | Value | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | String | The id of the variable instance. | ||||||||||||
name | String | The name of the variable instance. | ||||||||||||
type | String | The value type of the variable.} | ||||||||||||
value | String/Number/Boolean/Object |
|
||||||||||||
valueInfo | Object | A JSON object containing additional, value-type-dependent properties.
For variables of type
|
||||||||||||
processDefinitionKey | String | The key of the process definition the variable instance belongs to. | ||||||||||||
processDefinitionId | String | The id of the process definition the variable instance belongs to. | ||||||||||||
processInstanceId | String | The id the process instance belongs to. | ||||||||||||
executionId | String | The id of the execution the variable instance belongs to. | ||||||||||||
activityInstanceId | String | The id of the activity instance in which the variable is valid. | ||||||||||||
caseDefinitionKey | String | The key of the case definition the variable instance belongs to. | ||||||||||||
caseDefinitionId | String | The id of the case definition the variable instance belongs to. | ||||||||||||
caseInstanceId | String | The id of the case instance the variable instance belongs to. | ||||||||||||
caseExecutionId | String | The id of the case execution the variable instance belongs to. | ||||||||||||
taskId | String | The id of the task the variable instance belongs to. | ||||||||||||
tenantId | String | The id of the tenant that this variable instance belongs to. |
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 /history/variable-instance
Request Body:
{
"variableName": "someVariable",
"variableValue": 42,
"sorting":
[{"sortBy": "variableName",
"sortOrder": "asc"
},
{"sortBy": "instanceId",
"sortOrder": "desc"
}]
}
Response
[
{
"id": "someId",
"name": "someVariable",
"type": "Integer",
"variableType": "integer",
"value": 5,
"valueInfo": {},
"processDefinitionKey": "aProcessDefinitionKey",
"processDefinitionId": "aProcessDefinitionId",
"processInstanceId": "aProcInstId",
"executionId": "aExecutionId",
"activityInstanceId": "aActivityInstId",
"caseDefinitionKey": null,
"caseInstanceId": null,
"caseExecutionId": null,
"taskId": null,
"tenantId": null,
"errorMessage": null
}
]