Modeling rules with combination of && and || in dmn decision table

Hi
I am trying to implement rules in camunda dmn. I have scenario where I want to put different logical operators between rules.

For example:
I have rule around Product entity based on different attributes.

availableQuantity (integer)
zipcode(list of string)
size (string)
color (string)

Rules can be combination of different attributes with different logical operators.

For example:

  1. if (color == black && size == M && availableQuantity > 10) then discount = 10%
  2. if (color == black && (size == XL || availableQuantity > 50) then discount = 20%
  3. if (color in (blue, red, green) || availableQuantity > 100) then discount = 25%
  4. if (zipcode in (12345, 45678) || color = pink) then discount = 0%

In summary, I want to have combination of both &&s and ||s on rules with different attributes.

Any help is appreciated.

Hi @chetan,

welcome to the Camunda community :tada:

It seems that your example can be transformed into a normal decision table.

If the rule has multiple conditions that are combined with && then each of the conditions is one input column of this rule.

If the rule has multiple conditions that are combined with || then they can be split into different rules.

For example:

Does this help you?

Best regards,
Philipp

Hi @Philipp_Ossler
This definitely helps. Thank you for your quick response.