Creating a workflow to check for changes made to the lifecyclestate

Hi guys so I need to create a workflow with a trigger that runs whenever the cloudLifecyclState of an identity changes to inactive. For this I am using a filter:

$.changes[?(@.attribute == "cloudLifecycleState" && @.newValue == "inactive")]

in the Identity Attribute changed trigger. For some reason I can’t get it to filter for changes to the newValue the filter only works when I filter for changes made to the cloudLifecycleState. I tried enabling the workflow and performing a test, but when I did the trigger would ignore my change of the cloudLifecycleState. I noticed afterwards that the trigger would only run when I changed the filter to:

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

where I just searched for changes made to the cloudLifecycleState alone. I tried with just

$.changes[?(@.newValue == "inactive")]

and again it wouldn’t run. Why would it not accept my filter to check changes made to the newValue fields? I tried other methods but nothing seems to work. Can someone tell me another way of doing this without a filter if this method doesnt work?

Hey Yaseen,

Try this:

$.changes[?((@.attribute == “cloudLifecycleState”) && (@.newValue == “inactive”)]
  • Zach

@Yaseenl this filter work perfectly for me :

$.changes[?(@.attribute == “cloudLifecycleState” && @.newValue == “terminated”)]

This tool can help for debbuging your JSON path expression filter : Online JSONPath Evaluator Tool (javainuse.com)

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