input payload validation in OPA for a message based OPA App. — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

input payload validation in OPA for a message based OPA App.

Summary:

Validate array-based input payload

Content (please ensure you mask any confidential information):

I have a message based OPA app which has an array for approvers. I'm passing this to a sub-process with multiple instances. Before the sub-process, I want to make sure input payload has a valid array for approvers either one approver or more using exclusive gateway. something like this along with some more JSON elements

"approvers": [
{
"approver": "123456",
"approverName": "John McEnroe"
},
{
"approver": "234567",
"approverName": "Roger Federer"
}
]

In the conditional branch,I tried inputData.approvers.length()>0 and inputData.approvers[1].approver!=null and none of this is working. I checked the documentation below and it says I should be able to use these.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!