I’m having issues trying to get this compare numbers operator to act as an if statement to send an email for inactive identities that are owners of access profiles and other items in IDN. I would eventually like to combine all access items into one compare numbers operator with multiple OR statements to determine whether to send the email or not. I only need one of the ownership objects to check out, as I have filtering in my email body to exclude access items that don’t pertain to the identity’s ownership.
I have provided a screenshot of the workflow portion and the input and output results in the workflow test screen. Additionally, I have the JSON from the HTTP request and the path I am using to grab the length of the object. I have also linked a screenshot to a JSONPath validator to show that it does register the list size. Any help is appreciated. Thanks!
P.S. I was also wondering if there is any way to find the governance groups an identity owns. I can’t seem to find an API call that returns this. I know I can loop through the list of all the governance groups and match identity IDs with owner IDs, but I don’t think that is possible to do through workflows.
Search API should get you all the information an identity has. If you implement “HTTP Call” and implement search on identity, you can fetch all the information related to that identity.
Hey Nithesh, thanks for the response. I was wondering how you were able to determine the issue. I have that JSON path defined in my context body and use it to display the ownership info in my email, and it works completely fine. I also remember using it for a loop I had created a couple months back just to mess around in workflows and it still worked completely fine despite throwing an invalid JSON path error.
Thanks Steve,
I might have jumped a gun here. But I remember that when I tried something similar in the past it did not work. I am going to test it again and update
Update
I stand corrected. Placeholders work inside a JSONPath
Have you considered changing it from checking the length, to checking if the string exists using the Compare Strings operator? E.g., check that ACCESS_PROFILE_OWNER.id exists and is not an empty string. I think that will give you the same result you’re looking for.
I would agree, this is probably the effect that @SteveCharles is looking for.
In the screenshot in the OP, I think the jsonpath evaluation is coming out to [1] (an array), which is different that 1 (a number). A compare on this same expression could be Matches [1-9], which would effectively be the same as > 0, if I’m not mistaken.
Hey Margo, Thank you for the suggestion! This was one of the first steps I tried, unfortunately it did not work. During my initial try I only used the .ACCESS_PROFILE_OWNER part of the json path w/o checking for id. I will try again with the .id number and other variations to see if I can get a match.
What if you use “Contains” instead of “Matches”?
Otherwise, take a look at the exact contents of HttpRequest1 to make sure your regex exactly matches the field. In other words /[1-100]/ may match “1”, but does not match “[1]”.
You might also try “Does Not Contain [0]” or something to that effect.