I have defined a workflow to send out on email notification for every revoke decision made during a certification campaign. I am using the “Certification Signed Off” trigger and then the HTTP Request action to get the list of all access review decisions. In the next step I am using the “Compare Strings” operator to send out the email only if a particular entitlement is part of the campaign.
The workflow works fine when the access reviewer only has one identity to review but, when there are multiple identities to review the workflow executes and the Compare String step returns false everytime and ends the workflow. I am not sure what I am doing wrong here:
Check the execution logs when the HTTP Request step has multiple identities compared to a single identity. What I assume is happening is that with multiple results, Value 1 (Compare String 1) is an array which will not compare to the string. When there is only 1 result, Value 1 (Compare String 1) is a string.
You’re right! I just checked the output from the execution report in the JSON path evaluator tool and see that the output for Value 1 is an array when there are multiple identities involved:
What would you suggest I do here? The certification signed off trigger would get triggered after every certification and I need to make sure that emails are sent out only when a particular entitlement is bring reviewed. I am facing the same issue in the next step too where I am filtering out only the “Revoke” decisions using the Compare String operator.
Hello Nilesh. Apologies for the delay in response. I tried using the loop operator as suggested but my workflow still fails to send an email notification when multiple decisions are involved. This is how my workflow is currently defined:
Set both the Loop Input and Context as $.hTTPRequest.body
Set the Compare Strings value 1 as $.loop.loopInput.identitySummary.decision and
value 2 as REVOKE
Adding the Compare String value 1 as $.loop.loopInput.decision made the difference. It is now working as expected. I am receiving email notifications for every revoke decision.
Thank you for the help!
Is there also a way I could filter the trigger for this workflow so it only gets triggered when the Certification name has “Contingent Worker” in it? Right now it is getting trigger after every certification has been signed off. I would only like it to trigger the workflow when the name has “Contingent Worker” mentioned.
My current trigger is : $.certification[?(@.phase == “SIGNED”)]