Manually add process instance id to decision evaluations

Hi,

Currently, we have a setup with many complicated DMNs running in our engine. If the DMNs are called from the process the decision instances have a reference to the related process instance with the process instance id.
Our process steps are executed in external workers that fetches external tasks and executes the needed action for this task. In our case, the service task can also make evaluations to make decisions. Therefore, a worker can request a DMNevaluation to the process/decision engine and uses the result to decide what to do.

Our problem is that we have no traceability to for external DMN evaluations. For external evaluations, the process reference is (of course) set to null. Therefore, we had the question if there is a possibility to any kind of reference key to the DMN evaluation instance to find the right historic evaluation for external task execution. This would help a lot to find things that went wrong in the system.

Thanks for any suggestion!

Tobias

1 Like

Hi @tobwe,

I assume that you use the decision service of the engine to evaluate decisions in the worker. In order to add the execution context, you could replace the DMN history evaluation handler or add the execution context manually. Have a look at:

Does this help you?

Best regards,
Philipp

Hi,
Thanks for your answer. I think this would work for values like the process instance id. Is there a way to store custom key-value pairs for a dmn evaluation?

Best regards
Tobias