Specify DMN rules for Decision table at runtime

Is it possible to specify DMN rules (for a decision table) at runtime (when executing the rule).

E.g.
Input columns - Season
Output columns - Temperature

Rule rows: (inject into the DMN table at runtime instead of specifying statically when creating the rule table)

  1. Winter - Cold
  2. Summer - Hot

@MichaelS, in that case better approach is create the decision table also at runtime.

@aravindhrs
Thanks for your response.

I have thought about it and I am going to create a base template of the decision table.
At runtime I am going to retrieve this template (contains only in/out), add the rule rows and save it as a new instance.
This new DMN instance will then be used for the specific entity assigned to it in future instead of the base template.

Thanks for your input.

Hi Michael,

Hope you are doing well. I am also in need of solving a similar usecase in my project. Could you please share with us your experience on how you have implemented your solution in the end?Do you have the solution in Git where I can take a look please?

Thanks very much,
Roshini

I have managed to solve this problem. I have put together a spring boot app that has can dynamically generate and deploy the DMN decision table. The source code is given below. Hope this will help the others looking for a similar solution.

2 Likes