Get Executions

Queries for the executions that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of executions. The size of the result set can be retrieved by using the Get Execution Count method.

Method

GET /execution

Parameters

Query Parameters

Name Description
businessKey Filter by the business key of the process instances the executions belong to.
processDefinitionId Filter by the process definition the executions run on.
processDefinitionKey Filter by the key of the process definition the executions run on.
processInstanceId Filter by the id of the process instance the execution belongs to.
activityId Filter by the id of the activity the execution currently executes.
signalEventSubscriptionName Select only those executions that expect a signal of the given name.
messageEventSubscriptionName Select only those executions that expect a message of the given name.
active Only include active executions. Value may only be true, as false is the default behavior.
suspended Only include suspended executions. Value may only be true, as false is the default behavior.
incidentId Filter by the incident id.
incidentType Filter by the incident type. See the User Guide for a list of incident types.
incidentMessage Filter by the incident message. Exact match.
incidentMessageLike Filter by the incident message that the parameter is a substring of.
tenantIdIn Filter by a comma-separated list of tenant ids. An execution must have one of the given tenant ids.
variables Only include executions that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:
A valid parameter value has the form key_operator_value. key is the variable name, operator is the comparison operator to be used and value the variable value.
Note: Values are always treated as String objects on server side.

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.
key and value may not contain underscore or comma characters.
processVariables Only include executions that belong to a process instance with variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:
A valid parameter value has the form key_operator_value. key is the variable name, operator is the comparison operator to be used and value the variable value.
Note: Values are always treated as String objects on server side.

Valid operator values are: eq - equal to; neq - not equal to.
key and value may not contain underscore or comma characters.
variableNamesIgnoreCase Match all variable names provided in variables and processVariables case-insensitively. If set to true variableName and variablename are treated as equal.
variableValuesIgnoreCase Match all variable values provided in variables and processVariables case-insensitively. If set to true variableValue and variablevalue are treated as equal.
sortBy Sort the results lexicographically by a given criterion. Valid values are instanceId, definitionKey, definitionId 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.

Result

A JSON array of execution objects. Each execution object has the following properties:

Name Value Description
id String The id of the execution.
processInstanceId String The id of the process instance that this execution instance belongs to.
ended Boolean A flag indicating whether the execution has ended or not.
tenantId String The tenant id of the execution.

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, or if an invalid operator for variable comparison is used. See the Introduction for the error response format.

Example

Request

GET /execution?variables=myVariable_eq_camunda

Response

Status 200.

[{"id":"anId",
 "processInstanceId":"aProcInstId",
 "ended":false,
 "tenantId":null}]

目录: