Get Variable Instances
Queries for historic variable instances that fulfill the given parameters. The size of the result set can be retrieved by using the Get Variable Instance Count method.
Method
GET /history/variable-instance
Parameters
Query Parameters
Name | Description |
---|---|
variableName | Filter by variable name. |
variableNameLike | Restrict to variables with a name like the parameter. |
variableValue | Filter by variable value. Is treated as a String object on server side. |
variableTypeIn | Only include historic variable instances which belong to one of the passed and comma-separated variable types. |
includeDeleted | Include variables that has already been deleted during the execution. |
processInstanceId | Filter by the process instance the variable belongs to. |
processInstanceIdIn | 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". |
processDefinitionId | Filter by the process definition the variable belongs to. |
executionIdIn | Only include historic variable instances which belong to one of the passed and comma-separated 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 and comma-separated case execution ids. |
caseActivityIdIn | Only include historic variable instances which belong to one of the passed and comma-separated case activity ids. |
taskIdIn | Only include historic variable instances which belong to one of the passed and comma-separated task ids. |
activityInstanceIdIn | Only include historic variable instances which belong to one of the passed and comma-separated activity instance ids. |
tenantIdIn | Only include historic variable instances which belong to one of the passed and comma-separated tenant ids. |
sortBy | Sort the results by a given criterion. Valid values are instanceId , variableName and tenantId .
Must be used in conjunction with the sortOrder parameter. |
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. |
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 |
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 process instance id the variable instance belongs to. | ||||||||||||
executionId | String | The execution id 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 case instance id the variable instance belongs to. | ||||||||||||
caseExecutionId | String | The case execution id 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. | ||||||||||||
errorMessage | String | An error message in case a Java Serialized Object could not be de-serialized. | ||||||||||||
state | String | The current state of the variable. Can be 'CREATED' or 'DELETED'. |
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
GET /history/variable-instance?variableName=my_variable
Response
[
{
"id": "someId",
"name": "my_variable",
"type": "String",
"value": "my_value",
"valueInfo": {},
"processDefinitionKey": "aVariableInstanceProcDefKey",
"processDefinitionId": "aVariableInstanceProcDefId",
"processInstanceId": "aVariableInstanceProcInstId",
"executionId": "aVariableInstanceExecutionId",
"activityInstanceId": "aVariableInstanceActivityInstId",
"caseDefinitionKey": null,
"caseInstanceId": null,
"caseExecutionId": null,
"taskId": null,
"tenantId": null,
"errorMessage": null
}
]