I'm trying Rule Engine (Dictionary) node which is pretty cool!
But, i have a small issue.
The point is that i'm trying to check a customer against a set of rules. A customer has few attributes, e.g. Age and Blacklisted. it is all provided as a data table with corresponding columns. So, i create a rule set with entries like $Age$ <= 20 and $Blacklisted$ = "Y". Each rule provided with description which i want to return in the result. Then, i supply customer data and rule set to Rule Engine (Dictionary). But, when i supply a customer that satisfies both rules, only one description is returned, the one that appears as first in the list.
Is it possible somehow return description all the rules that match?
In this case, it would be a table with 2 rows.
You should try to create a combined rule that matches only if both rules are satisfied, e.g. use an entry like
$Age$ <= 20 AND $Blacklisted$ = "Y"
Hope that helps!
Thank you for the suggestion!
But, as I mentioned, i want to return rule description for each matching rule, which is stored in a separate column $Description$. in the case of combined rule, how do i combine descriptions?
Also, I tried your suggestion, and still, only one row is returned. Seems like it is limitation of Rule Engine node.
I am thinking on possible unpivot/pivot combo that can solve the problem, but i would like to have simpler approach.
The Rule Engine (Dictionary) node tries to match the rules provided in the dictionary in the order you entered them. This means that as soon as a row in your data matches a certain rule, the node will not go on and see if it also matches the other rules.
One solution to this would be to restructure your rule dictionary so that the combined rules are above the individual rules. This way, the node will first try to match the combined rules and use the corresponding descriptions. If no combined rule is matched, it will go on and try to match the individual rules.
Hope that helps!