Camunda DMN bulk evaluation

Hello,
In my application I am using a DMN table for storing rules and its evaluations.

For DMN rules evaluation I am using following rest endpoint:
http://localhost:8080/engine-rest/decision-definition/key/decision_table_key/evaluate
This request takes variables values like:
{
“variables”: {
“variable_1”: {
“value”: “W/C”,
“type”: “String”
},
“variable_2”: {
“value”: “OSL”,
“type”: “String”
}
}
}

Now I have a requirement such that I want to evaluate multiple rules in a single request.
Means in a single rest request I want a provision that I should be able to pass array of “Variables” and fetch evaluated data of every array object separately.

Any suggestions on how this can be achieved?

Thanks,
Rahul Sharma

Hi @RahulSharma and welcome to the forum,

Such an endpoint does not exist.
However, I can think of different options for doing this.

  1. You could add a literal expression (or decision table) that requires the output of all other decisions and aggregates them into a single result.
  2. You can extend your application with a custom REST endpoint that performs the desired logic (for embedded engine only)
1 Like

In addition to Stephan’s solutions…
3. Create a BPMN that accepts the array object, then runs the DMN per item in the array, collects all the responses and provides them back in a single array

3 Likes

Thank You @StephanHaarmann and @GotnOGuts for the response.
Solution 2 and 3 suits well for our requirements.