Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Workflow - Check if user group exists

kunal_saxena
Regular Contributor
Regular Contributor

Hello,

We are working on an approval workflow and we are having an issue with the following query as it is giving the result as 'true' in both 'true' and 'false' cases-

(com.saviynt.ecm.identitywarehouse.domain.User_groups.executeQuery("select ug.id from User_groups ug where ug.user_groupname='${entitlement.customproperty8}'").size()!=0)

The requirement is to check whether the user group exists in Saviynt with the name saved in entitlement's customproperty8. We have taken reference from the solution provided in a similar forum post - https://forums.saviynt.com/t5/identity-governance/workflow-condition/m-p/73256 but it is not working in our case with version 24.2.

Thank you

4 REPLIES 4

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @kunal_saxena,

Looks like you are using the wrong domain class,
com.saviynt.ecm.identitywarehouse.domain.User_groups.executeQuery
Instead please use
com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.executeQuery 

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

CR
Regular Contributor III
Regular Contributor III

@kunal_saxena  try like below

(com.saviynt.ecm.identitywarehouse.domain.User_groups.executeQuery("select ug.id from User_groups ug where ug.user_groupname='${entitlement.entitlement_value.customproperty8}'").size()!=0)


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star
(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.executeQuery("select ug.id from User_groups ug where ug.user_groupname='${entitlement.customproperty8}'").size()!=0)

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

The following worked for us:

(com.saviynt.ecm.identitywarehouse.domain.Usergroups.executeQuery("select ug.id from Usergroups ug where ug.user_groupname =  '${entitlement.customproperty8}'")?.size() !=0)

Thanks,

Kunal