and more in a single search tool across platforms. Read the announcement here. |
02/16/2024 11:05 AM
In a workflow, I need to check if the item being requested(entitlement/role) has only a single owner and if that owner is requestor or requestee. Is this possible?
Solved! Go to Solution.
02/16/2024 11:15 AM
We can check try below condition:
entitlement!=null and entitlement.getOwnerRank1().size() > 0
02/16/2024 11:57 AM
I need to check if the entitlement has one owner only and whether owner is either requestor or requestee
02/16/2024 12:37 PM
Use if else with groovy block
(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.executeQuery("select u.id from Users u,Usergroup_users ug where u.id=ug.userkey AND ug.user_groupkey='${dynamicAttributesReqAccess.get(requestaccesskey).get('USERGROUPOWNERKEY')}' AND u.id='${requestedby.id}'").size()!=0)
Above is sample
02/18/2024 08:28 PM
Check this post : Solved: User group is not working as expected in if else b... - Saviynt Forums - 64590
02/20/2024 09:19 AM
I modified the query to below to fit out requirement
(com.saviynt.ecm.identitywarehouse.domain.entitlement_owners.executeQuery("select u.id from Users u,entitlement_owners eo where u.id=eo.userkey AND (u.id='${requestedby.id}' or u.id='${requestedFor.id}'"))
Looks like this is not working. I see the below error
stdout F de.odysseus.el.tree.TreeBuilderException: Error parsing '#{((com.saviynt.ecm.identitywarehouse.domain.entitlementslist.get(requestaccesskey)_owners.executeQuery("select u.id from Users u,entitlementslist.get(requestaccesskey) eo where u.id=eo.userkey AND u.id='${requestedby.id}'").size()!=0)) eq true }': syntax error at position 83, encountered '_owners', expected ')'
Tried with
03/05/2024 06:40 PM - edited 03/05/2024 06:40 PM
(com.saviynt.ecm.identitywarehouse.domain.Entitlement_values.executeQuery("select u.id from Users u,entitlement_owners eo where u.id=eo.userkey AND (u.id='${requestedby.id}' or u.id='${requestedFor.id}'"))
03/05/2024 04:46 PM
Could you do something like this:
The first condition checks if there is an entitlement in the request. The second condition checks that there are no owners on the first 3 ranks of the entitlement. The 3rd condition checks that there is only one owner on Rank1 and the other 2 ranks are empty and the Rank1 owner is either the requestor or the requestee.
03/06/2024 11:53 AM
Hi Chitra,
I was able to get it working using the below query:
entitlement ne null and entitlement.allowner.size() eq 1 and (entitlement.allowner.contains(requestedby.username) or entitlement.allowner.contains(user.username))