Is there a way to show the caller why a Rule returns False
Rules are very useful for implementing all kinds of business-rules. Is a customer creditworthy? Is the order allowed? Is this person allowed to use this tool? The only thing missing is when the rule returns False. When False is returned the caller usually want to know “for what reason is it False?” Is there any way to get more information returned from a Rule?
Tim van Steenbergen
By essence a rule just returns true or false. Hence the ‘architecturally correct solution’ would be to split your rules in smaller blocks…But
You could call a microflow from the rule, create a rule object and associate it to your session.
Then in the rule at each test you can associate feedbacks to this rule. After calling the rule in your microflow, retrieve the associated feedbacks and present them to the user.
An example is on its way to the appstore, but awaiting approval. (RuleFeedback) in the meantime the mpk is available here: