We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

User group is not working as expected in if else block

Israr
New Contributor II
New Contributor II

Hi Team,

I am trying to use the if else block in workflow where it is checking if the requestor user is group user for the requested logical application or not if yes then it should go for requestor manager approval or else it should go for group owner approvals.

This same workflow we are using for multiple logical applications for your information iam using the below query in if else block.

 

(com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.executeQuery("select ugu.id from Usergroup_users ugu where ugu.userkey= '${requestedby?.id}'")?.size() != 0)

 

This is working fine for the requestor if he is not group users for any logical application and if suppose requestor is the group user for specific logical application then first request is going for resource owner approval then it is going for requestor manager approval which is not expected in this if else condition we want this to be check if the requestor is group users for requested logical application then only it should go requestor manager approval or else it should only go for resource owner approval and once approved access should be granted.

could you please help me how to achieve this and what query should be added here to check if he is the group users for requested logical application because workflow will be used for multiple logical application.

 

Thanks!

Regards

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Does language is selected as groovy. 
share workflow snippets 


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

Israr
New Contributor II
New Contributor II

Hello Rushikesh,

Thanks for your response!

Israr_0-1701863252185.png

I have selected the language as groovy but this is working fine but it is failing condition like if the requestor is not the group user for the requested application but requestor is part of other application and it is going for manager approval as well the resource owner approval hence here i just want to add the condition if the requestor is group user for requested application it should only go for requestor manager approval else resource owner approval is sufficient.

In simple words I just want to add the conditions in if else block if requestor is part of user group of requested application then request should go requestor manager approval else user group owner approval is enough.

The same workflow is for multiple logical application.

Thanks!

Regards,

Israr Ahmed ,

 

(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)


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

Manu269
All-Star
All-Star

@Israr Try this :

(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)

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Israr
New Contributor II
New Contributor II

Hello  manu,

This solution is working for group user owner and now we want group users condition.,

Israr_0-1701936701489.png

 

How we can achieve this.

Thanks!

Regards,

Israr Ahmed M