Hi I am trying to create a filter for this workflow
I want for when an identity manager changes, but also if they are in a specific businessUnit example here is what I have tried.
Hi I am trying to create a filter for this workflow
I want for when an identity manager changes, but also if they are in a specific businessUnit example here is what I have tried.
I have a similar workflow in place but it only utilizes a single filter on a single attribute. Have you had any success with AND statements in filters at all? Is your workflow test input valid? I had no shortage of issues massaging my test input into something usable.
Yea I have no issues with just single attribute. No so success so for with and statement, but I am not sure I am doing it properly
At trigger level you only have changed attributes in changes array.
So you firstly, do this filter at your trigger level :
$.changes[?(@.attribute === "manager")]
And after in your get identity action
After that you can add a " Comparison Operators" operator :
Value 1 : $.getIdentity.attributes.businessUnit
Comparison operator : Contains
Value 2 : ["business unit 1", "Businnes unit 2"]
In false output of this operator you can end your workflow and in true output you can continue with your logic.
Note :
Here is example of data of “Identity Attribute changed” trigger :
{
"identity":{
"id":"ee769173319b41d19ccec6cea52f237b",
"name":"john.doe",
"type":"IDENTITY"
},
"changes":[
{
"attribute":"department",
"oldValue":"sales",
"newValue":"marketing"
},
{
"attribute":"manager",
"oldValue":{
"id":"ee769173319b41d19ccec6c235423237b",
"name":"william.wilson",
"type":"IDENTITY"
},
"newValue":{
"id":"ee769173319b41d19ccec6c235423236c",
"name":"ed.engineer",
"type":"IDENTITY"
}
},
{
"attribute":"email",
"oldValue":"[email protected]",
"newValue":"[email protected]"
}
]
}
And in Identity object you have only three attributes : id, name and type and no more.
And in changes object you have only attribute that was changed.
Or do you want to trigge in same time manager and businnessUnit modification ?
For that you can use this filter :
$[?($.changes[?(@.attribute == "manager")] size 1)][?($.changes[?(@.attribute == "businessUnit" && @.newValue in ["Business unit 1", "Business unit 2", "Business unit 3"])] size 1)]
Yes I already have the first one with compare strings I was hoping that I could only have the workflow to trigger for the manager to change but the identity being apart of a specific business unit.
@Dw2456 you can refer to the steps that i describe. You can identity who manager was changed and check his businnessUnit/
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.