We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there way to do such nested if rules? Is there setting to make the parent rule expression also evaluated even if there are nested child rules?
if(loyaltyFactor > 4) { if(totalOrder > 3) { ... } else { ... } } else { ... }
[ { "WorkflowName": "Discount", "Rules": [ { "RuleName": "GiveDiscount30NestedOrExample", "SuccessEvent": "30", "ErrorMessage": "One or more adjust rules failed.", "ErrorType": "Error", "Operator": "OrElse", "Rules": [ { "RuleName": "ParentRule", "ErrorMessage": "One or more adjust rules failed.", "ErrorType": "Error", "RuleExpressionType": "LambdaExpression", "Operator": "OrElse", "Expression": "input1.loyaltyFactor > 4", "Rules": [ { "RuleName": "SubHighLoyaltyLowNumberOrders", "ErrorMessage": "One or more adjust rules failed.", "ErrorType": "Error", "RuleExpressionType": "LambdaExpression", "Expression": "input2.totalOrders <= 3" }, { "RuleName": "SubHighLoyaltyHighNumberOfTotalOrders", "ErrorMessage": "One or more adjust rules failed.", "ErrorType": "Error", "RuleExpressionType": "LambdaExpression", "Expression": "input2.totalOrders > 3" } ] }, { "RuleName": "LowLayaltyHighNumberOfTotalOrders", "ErrorMessage": "One or more adjust rules failed.", "ErrorType": "Error", "RuleExpressionType": "LambdaExpression", "Expression": "input2.totalOrders > 15" } ] } ] } ]
The text was updated successfully, but these errors were encountered:
Also hoping this issue can get fixed to make the Rules Engine much power useful.
Sorry, something went wrong.
@ying234 complex scenarios can be enabled via actions such as evaluateRule and ExecuteActionWorkflowAsync . Please refer this example - https://microsoft.github.io/RulesEngine/#evaluaterule
@abbasc52 looks good for the evaluateRule. Thank you!
No branches or pull requests
Is there way to do such nested if rules? Is there setting to make the parent rule expression also evaluated even if there are nested child rules?
The text was updated successfully, but these errors were encountered: