0
votes

I have a feeling there may not be an easy answer to this question.

Lets assume this is my decision table, which operates on an object instance called "input".

CONDITION     CONDITION      ACTION
a == $param   b != $param    input.setC($param)

1             5              11
1             6              11

My case is that if a is not 1, and b is not in (5,6) then set c to 11. However, if b is 6, the first rule will still fire since b is not 5, thus setting c to 11.

I would like to keep the organization of the columns without having to put multiple values in a column.

QUESTION: Is there some sort of header I can use which basically turns the decision table into a single rule, where b will not be in any of the rows where a is 1? Or some alternative method?

I am tempted to go with the negation of the rule:

CONDITION     CONDITION      ACTION
a == $param   b == $param    input.setC($param)

1             1              11
1             2              11
1             3              11
1             4              11
1             7              11
1             8              11

There are way more in this table and this makes it more difficult to maintain.

1

1 Answers

0
votes

If you are using XLS decision table, then a similar to this one should work. enter image description here

If you are familiar with drools or jbpm workbench I can provide you also solution based on Guided Decision Tables.

Hope this helps and let me know.