Chaining Rules vs. Simple Rules for every Path #418
-
Let's say I have a tree of decisions with True/False like this (only bigger) at the end of my tree I have the resulting actions I want to excecute.
Is there a preferred way how I should create rules for this kind of example? It is better to just create simple rules like
or would it be better to create a ruletree like I could create with https://microsoft.github.io/RulesEngine/#evaluaterule (If I understood this right) Is there even a preferred way or is this just I like to solve the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @squadwuschel The initial version of RulesEngine only supported executing all rules in one go. Using EvalutateRule and Idea behind EvaluateRule was to incorporate the whole workflow in json based rules, and you only need to look at final result. It boils down to your preference, use-case and complexity. Both options are provided and choice is left to the user. |
Beta Was this translation helpful? Give feedback.
Hi @squadwuschel The initial version of RulesEngine only supported executing all rules in one go.
That approach as you mentioned is a simpler one and is recommended for most users.
Using EvalutateRule and
ExecuteActionWorkflowAsync
is for advance workflow operations.It can technically support looping, input overrides, cross workflow execution and much more.
Idea behind EvaluateRule was to incorporate the whole workflow in json based rules, and you only need to look at final result.
Using simple rules will require you to define some logic in code to complete the workflow.
It boils down to your preference, use-case and complexity. Both options are provided and choice is left to the user.