Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to execute multiple Separate conditions with separate events #353

kashifrahman started this conversation in General
Discussion options

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"
}
}
}
]

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /