Workflow with Provision completed trigger

I’m trying to build an workflow with the trigger of provisioning completed.

But I want to check the whole account Request to see if there is an removal in it.

When I use the compare string with:
$.trigger.accountRequests[].attributeRequests[].operation
equals removal

It doesn’t work because the first variable is an array. So I’m not sure how to continue with the array.

Because when the accountRequest has an remove I want to follow an different path.

Hey Dennis , you can try -
$.trigger.accountRequests[?(@.attributeRequests[?(@.operation == ‘Remove’)])].length > 0
This uses JSONPath filtering to check if any attributeRequest inside any accountRequest has an operation of ‘Remove’

How do you use this in the compare operator?

Because $.trigger.accountRequests[?(@.attributeRequests[?(@.operation == ‘Remove’)])].length > 0
Is not a valid JSONPath expression it say

@zeross you can try using loop operation in this case

1 Like

Have just just the array and the exist data operator.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.