Get Historic Decision Instances
Queries for historic decision instances that fulfill the given parameters. The size of the result set can be retrieved by using the Get Historic Decision Instance Count method.
Method
GET /history/decision-instance
Parameters
Query Parameters
Name | Description |
---|---|
decisionInstanceId | Filter by decision instance id. |
decisionInstanceIdIn | Filter by decision instance ids. Must be a comma-separated list of decision instance ids. | decisionDefinitionId | Filter by the decision definition the instances belongs to. | decisionDefinitionIdIn | Filter by the decision definitions the instances belongs to. Must be a comma-separated list of decision definition ids. |
decisionDefinitionKey | Filter by the key of the decision definition the instances belongs to. |
decisionDefinitionKeyIn | Filter by the keys of the decision definition the instances belongs to. Must be a comma-separated list of decision definition keys. |
decisionDefinitionName | Filter by the name of the decision definition the instances belongs to. | processDefinitionId | Filter by the process definition the instances belongs to. |
processDefinitionKey | Filter by the key of the process definition the instances belongs to. | processInstanceId | Filter by the process instance the instances belongs to. | caseDefinitionId | Filter by the case definition the instances belongs to. |
caseDefinitionKey | Filter by the key of the case definition the instances belongs to. | caseInstanceId | Filter by the case instance the instances belongs to. | activityIdIn | Filter by the activity ids the instances belongs to. Must be a comma-separated list of acitvity ids. | activityInstanceIdIn | Filter by the activity instance ids the instances belongs to. Must be a comma-separated list of acitvity instance ids. |
tenantIdIn | Filter by a comma-separated list of tenant ids. A historic decision instance must have one of the given tenant ids. |
evaluatedBefore |
Restrict to instances that were evaluated before the given date.
The date must have the format yyyy-MM-dd'T'HH:mm:ss , e.g., 2013-01-23T14:42:45 .
|
evaluatedAfter |
Restrict to instances that were evaluated after the given date.
The date must have the format yyyy-MM-dd'T'HH:mm:ss , e.g., 2013-01-23T14:42:45 .
|
userId | Restrict to instances that were evaluated by the given user. |
includeInputs |
Include input values in the result.
Value may only be true , as false is the default behavior.
|
includeOutputs |
Include output values in the result.
Value may only be true , as false is the default behavior.
|
disableBinaryFetching |
Disables fetching of byte array input and output values.
Value may only be true , as false is the default behavior.
|
disableCustomObjectDeserialization |
Disables deserialization of input and output values that are custom objects.
Value may only be true , as false is the default behavior.
|
rootDecisionInstanceId | Restrict to instances that have a given root decision instance id. This also includes the decision instance with the given id. |
rootDecisionInstancesOnly |
Restrict to instances those are the root decision instance of an evaluation.
Value may only be true , as false is the default behavior.
|
decisionRequirementsDefinitionId | Filter by the decision requirements definition the instances belongs to. |
decisionRequirementsDefinitionKey | Filter by the key of the decision requirements definition the instances belongs to. |
sortBy |
Sort the results by a given criterion. Valid values are evaluationTime 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 historic decision instance objects. Each historic decision instance object has the following properties:
Name | Value | Description |
---|---|---|
id | String | The id of the decision instance. |
decisionDefinitionId | String | The id of the decision definition that this decision instance belongs to. |
decisionDefinitionKey | String | The key of the decision definition that this decision instance belongs to. |
decisionDefinitionName | String | The name of the decision definition that this decision instance belongs to. |
evaluationTime | String | The time the instance was evaluated. Has the format yyyy-MM-dd'T'HH:mm:ss . |
processDefinitionId | String | The id of the process definition that this decision instance belongs to. |
processDefinitionKey | String | The key of the process definition that this decision instance belongs to. |
processInstanceId | String | The id of the process instance that this decision instance belongs to. |
caseDefinitionId | String | The id of the case definition that this decision instance belongs to. |
caseDefinitionKey | String | The key of the case definition that this decision instance belongs to. |
caseInstanceId | String | The id of the case instance that this decision instance belongs to. |
activityId | String | The id of the activity that this decision instance belongs to. |
activityInstanceId | String | The id of the activity instance that this decision instance belongs to. |
tenantId | String | The tenant id of the historic decision instance. |
userId | String | The id of the authenticated user that has evaluated this decision instance without a process or case instance. |
inputs | List of decision inputs |
The list of decision input values. Only exists if includeInputs
was set to true in the query. For the decision input properties
see below.
|
ouputs | List of decision outputs |
The list of decision output values. Only exists if includeOutputs
was set to true in the query. For the decision output properties
see below.
|
collectResultValue | Double | The result of the collect aggregation of the decision result if used. null if no aggregation was used. |
rootDecisionInstanceId | String | The decision instance id of the evaluated root decision. Can be null if this instance is the root decision instance of the evaluation. |
decisionRequirementsDefinitionId | String | The id of the decision requirements definition that this decision instance belongs to. |
decisionRequirementsDefinitionKey | String | The key of the decision requirements definition that this decision instance belongs to. |
Decision Input Value
Name | Value | Description |
---|---|---|
id | String | The id of the decision input value. |
decisionInstanceId | String | The id of the decision instance the input value belongs to. |
clauseId | String | The id of the clause the input value belongs to. |
clauseName | String | The name of the clause the input value belongs to. |
errorMessage | String | An error message in case a Java Serialized Object could not be de-serialized. |
type | String | The value type of the variable. |
value | String/Number/Boolean/Object |
The variable's value. Value differs depending on the variable's type and on the disableCustomObjectDeserialization parameter.
|
valueInfo | Object |
A JSON object containing additional, value-type-dependent properties.
For variables of type
|
Decision Output Value
Name | Value | Description |
---|---|---|
id | String | The id of the decision output value. |
decisionInstanceId | String | The id of the decision instance the output value belongs to. |
clauseId | String | The id of the clause the output value belongs to. |
clauseName | String | The name of the clause the output value belongs to. |
ruleId | String | The id of the rule the output value belongs to. |
ruleOrder | Integer | The order of the rule the output value belongs to. |
errorMessage | String | An error message in case a Java Serialized Object could not be de-serialized. |
variableName | String | The name of the output variable. |
type | String | The value type of the variable. |
value | String/Number/Boolean/Object |
The variable's value. Value differs depending on the variable's type and on the disableCustomObjectDeserialization parameter.
|
valueInfo | Object |
A JSON object containing additional, value-type-dependent properties.
For variables of type
|
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/decision-instance?includeInputs=true&includeOutputs=true
Response
[
{
"activityId": "assignApprover",
"activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8",
"collectResultValue": null,
"decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8",
"decisionDefinitionKey": "invoice-assign-approver",
"decisionDefinitionName": "Assign Approver",
"evaluationTime": "2015-09-10T11:22:06",
"id": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"inputs": [
{
"clauseId": "clause1",
"clauseName": "Invoice Amount",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c41-579d-11e5-9848-f0def1e59da8",
"type": "Double",
"value": 123.0,
"valueInfo": {}
},
{
"clauseId": "clause2",
"clauseName": "Invoice Category",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c40-579d-11e5-9848-f0def1e59da8",
"type": "String",
"value": "Misc",
"valueInfo": {}
}
],
"outputs": [
{
"clauseId": "clause3",
"clauseName": "Approver Group",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c42-579d-11e5-9848-f0def1e59da8",
"ruleId": "DecisionRule_1of5a87",
"ruleOrder": 1,
"type": "String",
"value": "accounting",
"valueInfo": {},
"variableName": "result"
}
],
"processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8",
"processDefinitionKey": "invoice",
"processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8",
"caseDefinitionId": null,
"caseDefinitionKey": null,
"caseInstanceId": null,
"tenantId":null,
"userId": null,
"rootDecisionInstanceId": null,
"decisionRequirementsDefinitionId": null,
"decisionRequirementsDefinitionKey": null
}
]