Retrieving decision instance id


#1

Hello,

we are evaluating a decision table outside of a process model or case model but directly in java.

Therefore, we use the following code snippet:

DmnDecisionTableResult decisionResult = processEngine.getDecisionService()
.evaluateDecisionTableByKey(id, Variables.createVariables());
DmnDecisionRuleResult dmnResult = decisionResult.getSingleResult();

Now we want to keep track of all evaluations. In the Camunda Cockpit, there is an unique instance id for each of the evaluations. Is it possible to retrieve the decision instance id via the API directly after the evaluation?

With the following statement, we can not be sure what really is the last evaluation we performed when multiple processes are running.

processEngine.getHistoryService().createHistoricDecisionInstanceQuery().list();

Thank you in advance!
Kind regards


#2

Hi @mhoc,

currently, there is no way to retrieve the decision instance id after the evaluation. This id is only used for the history.

Best regards,
Philipp


#3

Hello @Philipp_Ossler,

ok, thank you for your answer!