Conditional Rules #84
Answered
by
abbasc52
larsontim12
asked this question in
Q&A
|
How would I go about creating conditional rules. I have a different set of rules that need to run for certain states. Like show below. Is this possible if so what would it look like? if(input1.State == 'CA') if(input1.State == 'WA') Thanks, |
Answered by
abbasc52
Dec 25, 2020
Replies: 1 comment
|
Hi larsontim12, Currently workflow define a set of Rules and you can execute a workflow by its name. [{
"WorkflowName": "CA",
Rules:[
Rule1,Rule2
]
},
{
"WorkflowName": "WA",
Rules:[
Rule2,Rule3
]
}
]Then you could run Rulesengine with the appropriate workflow: var result = await re.ExecuteAllRulesAsync(input1.State, input1);Let me know your thoughts on this |
0 replies
Answer selected by
larsontim12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi larsontim12,
There is no direct feature currently to conditionally run rules.
Currently workflow define a set of Rules and you can execute a workflow by its name.
So if you could separate the Rules into multiple workflows, you could achieve the above ask
[{ "WorkflowName": "CA", Rules:[ Rule1,Rule2 ] }, { "WorkflowName": "WA", Rules:[ Rule2,Rule3 ] } ]Then you could run Rulesengine with the appropriate workflow:
Let me know your thoughts on this