Skip to main content
POST
/
variable-instance
Get Variable Instances (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/variable-instance \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "variableValues": [
    {
      "name": "amount",
      "operator": "gteq",
      "value": 5
    },
    {
      "name": "amount",
      "operator": "lteq",
      "value": 200
    }
  ],
  "processInstanceIdIn": [
    "aProcessInstanceId",
    "anotherProcessInstanceId"
  ],
  "sorting": [
    {
      "sortBy": "variableType",
      "sortOrder": "asc"
    }
  ]
}'
[
  {
    "id": "someId",
    "name": "amount",
    "type": "Integer",
    "value": 5,
    "processDefinitionId": "aProcessDefinitionId",
    "processInstanceId": "aProcessInstanceId",
    "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726",
    "taskId": null,
    "batchId": null,
    "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726",
    "errorMessage": null,
    "tenantId": null
  },
  {
    "id": "someOtherId",
    "name": "amount",
    "type": "Integer",
    "value": 15,
    "processDefinitionId": "aProcessDefinitionId",
    "processInstanceId": "aProcessInstanceId",
    "executionId": "68b71c9-e310-11e2-beb0-f0def1557726",
    "taskId": null,
    "batchId": null,
    "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726",
    "errorMessage": null,
    "tenantId": null
  },
  {
    "id": "yetAnotherId",
    "name": "amount",
    "type": "Integer",
    "value": 150,
    "processDefinitionId": "aProcessDefinitionId",
    "processInstanceId": "anotherProcessInstanceId",
    "executionId": "68b71c9-e310-11e2-beb0-f0def1557726",
    "taskId": null,
    "batchId": null,
    "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726",
    "errorMessage": null,
    "tenantId": null
  }
]

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

firstResult
integer

Pagination of results. Specifies the index of the first result to return.

maxResults
integer

Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

deserializeValues
boolean

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 Jackson's 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.

Body

application/json

A variable instance query which defines a list of variable instances

variableName
string | null

Filter by variable instance name.

variableNameLike
string | null

Filter by the variable instance name. The parameter can include the wildcard % to express like-strategy such as: starts with (%name), ends with (name%) or contains (%name%).

processInstanceIdIn
string[] | null

Only include variable instances which belong to one of the passed process instance ids.

executionIdIn
string[] | null

Only include variable instances which belong to one of the passed execution ids.

caseInstanceIdIn
string[] | null

Only include variable instances which belong to one of the passed case instance ids.

caseExecutionIdIn
string[] | null

Only include variable instances which belong to one of the passed case execution ids.

taskIdIn
string[] | null

Only include variable instances which belong to one of the passed task ids.

batchIdIn
string[] | null

Only include variable instances which belong to one of the passed batch ids.

activityInstanceIdIn
string[] | null

Only include variable instances which belong to one of the passed activity instance ids.

tenantIdIn
string[] | null

Only include variable instances which belong to one of the passed tenant ids.

variableValues
object[] | null

An array to only include variable instances that have the certain values. The array consists of objects with the three properties name, operator and value. name (String) is the variable name, operator (String) is the comparison operator to be used and value the variable value. value may be String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like

variableNamesIgnoreCase
boolean | null

Match all variable names provided in variableValues case-insensitively. If set to true variableName and variablename are treated as equal.

variableValuesIgnoreCase
boolean | null

Match all variable values provided in variableValues case-insensitively. If set to true variableValue and variablevalue are treated as equal.

variableScopeIdIn
string[] | null

Only include variable instances which belong to one of passed scope ids.

sorting
object[] | null

An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. Sorting has no effect for count endpoints

Response

Request successful.

id
string | null

The id of the variable instance.

name
string | null

The name of the variable instance.

processDefinitionId
string | null

The id of the process definition that this variable instance belongs to.

processInstanceId
string | null

The id of the process instance that this variable instance belongs to.

executionId
string | null

The id of the execution that this variable instance belongs to.

caseInstanceId
string | null

The id of the case instance that this variable instance belongs to.

caseExecutionId
string | null

The id of the case execution that this variable instance belongs to.

taskId
string | null

The id of the task that this variable instance belongs to.

batchId
string | null

The id of the batch that this variable instance belongs to.<

activityInstanceId
string | null

The id of the activity instance that this variable instance belongs to.

tenantId
string | null

The id of the tenant that this variable instance belongs to.

errorMessage
string | null

An error message in case a Java Serialized Object could not be de-serialized.

value
any

Can be any value - string, number, boolean, array or object. Note: Not every endpoint supports every type.

type
string | null

The value type of the variable.

valueInfo
object

A JSON object containing additional, value-type-dependent properties. For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.

For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.

The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations. (Not applicable for decision-definition, /process-instance/variables-async, and /migration/executeAsync endpoints)