Home Ask Login Register

Developers Planet

Your answer is one click away!

Prashant Shilimkar February 2016

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 ?


Sebastian Menski February 2016

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.

Bernd Ruecker February 2016

As Sebastian pointed out there is no built-in functionality to achieve this. However, we discussed in a project that you could create a parameterized JUnit test case and run it with all permutations of input possibilities yourself. You will get an exception if you call the decision table with an input which does not have a unique result.

Cheers Bernd

Post Status

Asked in February 2016
Viewed 1,882 times
Voted 6
Answered 2 times


Leave an answer

Quote of the day: live life