droolsredhatbusiness-rulesdmnredhat-decision-manager

Red Hat Decision Manager - DMN Modeling One to Many


We are looking into using Red Hat Decision Manager as our Rules Engine. One thing that isn't clear is how would one setup a one to many relationship using DMN w/ FEELS. Here is an example:

Suppose we have 3 clients (A, B, and C) For client A we want to make sure they have a value of 1, 2 or 5. For client B we want to make sure they have a value of 6, 9, or 22. For client C, any value works.

With single values + decision table this is easy. client_a_identifier -> decision_table -> value, but how to do client_a_identifier -> decision_table -> list_of_values?

I tried seeing if Context could help here but it didn't seem to fit, also tried to see if using string data type with comma delimited values would help to no avail.


Solution

  • Based on the phrasing of the original question, I understood the following: your input is a combination of client-identifier and a FEEL:number value. Based on the combination of those attributes, you want to verify for Client A the value has one of the specified valorizations, and so on. Otherwise the decision table should express that the combination is not valid.

    ItemDefinition:

    ItemDefinition

    Decision Table for the validation rules described:

    decision table

    Please notice is important to decide if your want your table to express the positive logic or the negative logic of validation, and then setup the default value consequently.

    Wiring it all together:

    demonstrating DMN