Does the RuleEngine evaluate rules concurrently or sequentially? #426
Unanswered
anshulk-arch
asked this question in
Q&A
Replies: 1 comment
-
As per my understanding, it does sequentially. So if there are two rules in one workflow which fulfill the condition, the execution will stop after the first one |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a given workflow with N rules, does the RuleEngine execute these rules concurrently or sequentially from 1 to N e.g. in the workflow below, will it execute GiveDiscount10 and GiveDiscount20 in parallel or, one after the other? If sequential, is it possible to execute rules sequentially?
[
{
"WorkflowName": "Discount",
"Rules": [
{
"RuleName": "GiveDiscount10",
"SuccessEvent": "10",
"ErrorMessage": "One or more adjust rules failed.",
"ErrorType": "Error",
"RuleExpressionType": "LambdaExpression",
"Expression": "input1.country == "india" AND input1.loyaltyFactor <= 2 AND input1.totalPurchasesToDate >= 5000"
},
{
"RuleName": "GiveDiscount20",
"SuccessEvent": "20",
"ErrorMessage": "One or more adjust rules failed.",
"ErrorType": "Error",
"RuleExpressionType": "LambdaExpression",
"Expression": "input1.country == "india" AND input1.loyaltyFactor >= 3 AND input1.totalPurchasesToDate >= 10000"
}
]
}
]
Beta Was this translation helpful? Give feedback.
All reactions