Workflow that is triggered when provisioning fails

Hi,

I am fairly new to workflows and am still learning technically but essentially we want to create a workflow in which is triggered when an access request provisioning failure occurs. I am using the following trigger “Provisioning Complete” with the following filter $.accountRequests[?(@.provisioningResult == “FAIL”)] Although when testing this trigger and replacing the JSON input of provisioningResult with SUCCESS, it still manages to trigger the workflow for some reason?

Below is some of the JSON input

“accountRequests”: [
{
“source”: {
“id”: “4e4d982dddff4267ab12f0f1e72b5a6d”,
“name”: “Corporate Active Directory”,
“type”: “SOURCE”
},
“accountId”: “CN=Rob.Robertson,ou=csm,ou=sales,dc=helpco,dc=com”,
“accountOperation”: “Modify”,
“provisioningResult”: “SUCCESS”,

I have also read another post in which the trigger filter $.accountRequests[?(!(@.provisioningResult == “SUCCESS” || @.provisioningResult==“committed”))] was used, but that still always triggers the workflow

Hello,

Are you testing using the test module in the workflow configuration ?

From my experience, the test will always trigger the workflow whatever the input you provide

I agree - the test workflow feature always ignores the filter criteria.

Ah ok I will try initiating an actual test within tenant in that case, thanks!