Working with VariableContext in DecisionService

Hi guys,

the API of the DMN Engine provides a useful method to evaluate a decision with a given VariableContext. This is crucial if you don’t preload the varables into a map (e.g because you don’t know the names of the variables inside of your Java code).

I’m wondering, if there is a possibility to do the same with the DecisionService (for reasons of tracibility and history of the evaluated decisions). I found out that the DecisionService is working with the VariableMap abstraction and maps that to the VariableContext inside of the DecisionEvaluationUtil class.

Is there any way to provide variable context to DMN Engine and support lazy evaluation of the variable names?

Are you planning to extend the corresponding methods along the DecisionService API to support the VariableContext as input parameter.

I would be happy to provide a PR, if it is worth to do so…

Kind regards,

Simon

1 Like

Hi Simon,

that sounds interesting. Currently, all Apis of Camunda pass the variables as Map<String,Object>. But I see no reason why the decision service should not pass the variables as VariableContext.

Can you please describe your use case more in detail?

Best regards,
Philipp