Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.
Greetings All,
I am trying to create a workflow that will trigger when multiple identity attributes have changed. I am having a difficult time achieving that.
Specifically, I want the workflow to only be triggered when department, jobTitle and manager attributes have changed. Example { "identity": { "id": "1234", "name": "John Doe", "type": "IDENTITY" }, "changes": [ { "attribute": "position", "oldValue": "sales exec", "newValue": "marketing exec" }, { "attribute": "manager", "oldValue": { "id": "ee769173319b41d19ccec6c235423237b", "name": "william.wilson", "type": "IDENTITY" }, "newValue": { "id": "ee769173319b41d19ccec6c235423236c", "name": "ed.engineer", "type": "IDENTITY" } }, { "attribute": "jobTitle", "oldValue": "sales", "newValue": "marketing" } ] }. I tried tried this filter $.changes[?((@.attribute=="manager" && @.attribute=="position"))] and a few others with no success.
Hi @Bhekamandla
try this filter
$.changes[?(@.attribute == “department” && @.attribute==“jobtitle” && @.attribute==“manager”)] This is the filter for which all three attributes need to be changed
If you need to trigger if anyone of this attributes changed then the filter will be as follows
$.changes[?(@.attribute == “department” || @.attribute==“jobtitle” || @.attribute==“manager”)]
here use the technical name of the attributes, and make sure the jobtitle is also an identity attribute
Thanks for your response. I don’t need the newValue to be a specific value, I just need it to change. The requirement is that the workflow should be triggered when all three attributs change - regardsless of the values they are changing from or to.
Thanks for your response. I tried this and it worked! I will do some testing of the different scenarios I have and provide feedback. Thanks a lot - I will accept the as a solution after the tests.