How to execute multiple Separate conditions with separate events #353
kashifrahman
started this conversation in
General
Replies: 0 comments
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.
-
Hi,
I have a situation where I need to execute multiple separate conditions and each condition should have its own event type to return. For example, see the below json - here I am passing multiple conditions and events in a single object and facts. need to execute
like If Name = "ABCD" return True
If Name= "XYZ" return false
If Name="123" return 123.
I need these kind of rules to be implemented in Json rules, while I understand that we can use "any" operator but then event will be single only
[
{
"shtlCondition": {
"any": [
{
"fact": "name",
"operator": "equal",
"value": "Kashif"
},
{
"fact": "name",
"operator": "equal",
"value": "tttt"
}
]
},
"shtlEvent": {
"Result": {
"Message": "Document Requirement present"
}
}
},
{
"shtlCondition": {
"any": [
{
"fact": "name",
"operator": "equal",
"value": "Kashif"
},
{
"fact": "name",
"operator": "equal",
"value": "tttt"
}
]
},
"shtlEvent": {
"Result": {
"Message": "Document Requirement Not present"
}
}
}
]
Beta Was this translation helpful? Give feedback.
All reactions