Search code examples
javaangularjscamunda

Validate DMN rule not overlap while adding new rule to DMN table


I am using camunda DMN in my application(in angular, java, spring).

I want to validate if rule is not overlapping while adding new rule to DMN table.

for example following is my DMN table,


| x | y | o/p |

| <9 | >50 | "ABC" |

| <20 | >100 | "XYZ" |

Consider user is so dumb :D , and can create rules like above.

Now if i/p's for above DMN are x = 10 and y = 99 then it satisfy both rules.

If I use UNIQUE hit policy, it wont show me error at the time of add new rule rather it will show me while evaluation of DMN table. And I dont want that :(

How to avoid overlapping of rules while creating of rule it self using either camunda dmn js api or camunda dmn java api ?


Solution

  • This is currently not possible as it would require knowledge about all the possible input combinations. Also to infer the overlapping value range of all rules can be quite hard.