Trigger Identity Attributes Changed Filter not working proprerly

Hello all,

I am currently working on a workflow that aims to send an email based on certains attributes modifications to an identity.

To explain my problem, here is a view of my simple workflow :

If any identity attributes has been changed, I would like to filter some of them.
In this case, it would be the “location” and “cloudLifecycleState”.

Unfortunately, the Identity Attributes Changed Trigger Filter seems to not working properly and continues to send the email despite the filter, if a change is made to the “location” OR/AND “cloudLifecycleState” attributes.

I also checked on the Jsonpath evaluator online that my conditions were correct, and there are.

Any pointers will be helpful.

Best regards,
Leo

1 Like

Your current filter will evaluate to true if location or cloudLifecycleState is present in the list of changes because of the OR (||) operator. If you use AND (&&) instead, it will work better.

$.changes[?(@.attribute != "location" && @.attribute != "cloudLifecycleState")]

Be aware though, that there may be multiple changes in a given payload. For example, if both the email and the location attributes are changed, the filter will still pass since at least one of the attributes passes the filter.

2 Likes

Hi @colin_mckibben,

Thank you for your reply,

I carried out some tests with $.changes[?(@.attribute != "location" && @.attribute != "cloudLifecycleState")], however the problem persists.

If I change an other attribute like endDate which affects the cloudLifecycleState, the workflow continues to be triggered. Howerver, I can’t add endDate in the filter because sometimes its doesn’t affects it.
Which is why I was used the OR (||) operator.

Do you have any idea how I could filter in this condition?

Best regards,
Leo

@LEOS1 :
Refer to this post : [Workflow] Filter for attribute change only if two specific attributes are changing
Here are two possibility :

Solution  1 :

$[?(("location" in @.changes[*].attribute && "cloudLifecycleState" in @.changes[*].attribute))]
Solution 2 : 
$[?($.changes[?(@.attribute == "location")] size 1)][?($.changes[?(@.attribute == "cloudLifecycleState")] size 1)]
3 Likes

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