Method

POST /history/variable-instance

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 true, a serializable variable will be deserialized on server side and transformed to JSON using POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath.

If set to false, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML.

Note: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false when developing web applications that are independent of the Java process applications deployed to the engine.

A JSON object with the following properties:


|sortBy|Mandatory. Sort the results lexicographically by a given criterion. Valid values are instanceId and variableName and . |sortOrder|Mandatory. Sort the results in a given order. Values may be asc for ascending order or desc for descending order.
|sortBy|Mandatory. Sort the results lexicographically by a given criterion. Valid values are instanceId and variableName 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 variable instance objects.Each historic activity instance object has the following properties:


|value|String / Number / Boolean / Object| The variable's value. Value differs depending on the variable's type and on the deserializeValues parameter.|type|String|The value type of the variable.|valueInfo|Object| A JSON object containing additional, value-type-dependent properties.
For variables of type Object, the following properties are returned:

  • objectTypeName: A string representation of the object's type name.

  • objectTypeName: A string representation of the object's type name.

  • serializationDataFormat: The serialization format used to store the variable.
    |valueInfo|Object|A JSON object containing additional, value-type-dependent properties.
    For variables of type Object, the following properties are returned:

  • objectTypeName: A string representation of the object's type name.

  • serializationDataFormat: The serialization format used to store the variable.
    |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.
    |state|String|The current state of the variable. Can be 'CREATED' or 'DELETED'.
  • Response Codes

    Example

    POST /history/variable-instance

    Request Body:

    1. [
    2. "id": "someId",
    3. "name": "someVariable",
    4. "type": "Integer",
    5. "variableType": "integer",
    6. "value": 5,
    7. "processDefinitionKey": "aProcessDefinitionKey",
    8. "processDefinitionId": "aProcessDefinitionId",
    9. "processInstanceId": "aProcInstId",
    10. "executionId": "aExecutionId",
    11. "activityInstanceId": "aActivityInstId",
    12. "caseDefinitionKey": null,
    13. "caseInstanceId": null,
    14. "caseExecutionId": null,
    15. "taskId": null,
    16. "tenantId": null,
    17. "errorMessage": null