How to find decision instance id of a dmn

Hi,
step 1: I have deployed a dmn using “/deployment/create” api which returns
“key”, “deployedDecisionDefinitionsId” …etc

step 2: Using either "Key’ or “id” we can evaluate a dmn using “/evaluate” api.

Now in order to see the history of this dmn , i’m using Get Historic Decision Instance | docs.camunda.org
but this requires “decision-instance id”.

Question 1: From where i get this “decision-instance id” in the above steps.
Question 2: When i’m invoking "“decision-instance/{id}?includeInput=true&includeOutputs=true”
Why only output is included ?
“outputs”: [
{
“type”: “Boolean”,
“value”: false,
“valueInfo”: {},
“id”: “9822afb4-36b2-11ea-80aa-a68dd4e61d41”,
“decisionInstanceId”: “9822afb1-36b2-11ea-80aa-a68dd4e61d41”,
“clauseId”: “output_1”,
“clauseName”: “approved”,
“ruleId”: “DecisionRule_0t0cu6d”,
“ruleOrder”: 1,
“variableName”: “approved”,
“errorMessage”: null,
“createTime”: “2020-01-14T09:45:27.271+0000”,
“removalTime”: null,
“rootProcessInstanceId”: null
}
],

Hi @Nitin_Gupta,

Answer 1: you can also query for the decision-instance: https://docs.camunda.org/manual/7.12/reference/rest/history/decision-instance/get-decision-instance-query/. Select the appropriate query parameter(s) from the docs to identify your instance.

Answer 2: You made a typo in your request. It should be “includeInputs” instead of “includeInput”.

Hope this helps, Ingo

how to get decision instance id in the response of decision evaluate API itself, I don’t want to filter and get my decision instance-id every time by making a follow-up call after evaluation.

Just like BPMN instance id in BPMN call is it possible to get decision instance id in the evaluate call - this is needed.

thank you

1 Like