Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/26/2024 11:31 PM
Hi,
Request to be Auto Rejected if a user part of Sav Role and Requesting for Self
Using the below Query in "IF-ELSE" in workflow and getting ERROR - Request not Submitted(contact system Admin)
(requestedby.authorities.collect { it.authority }.contains("ROLE_ADMIN")) AND (com.saviynt.ecm.identitywarehouse.domain.Users.executeQuery("select u.id from Users u where u.userkey= '${requestedby?.id}'")?.size() != 0)
If I use only this requestedby.authorities.collect { it.authority }.contains("ROLE_ADMIN") it is working fine.
Thanks in advance. Please let me know if any details are required
09/27/2024 12:05 AM
Hi @userr use another block for self request check if if and else
requestedby.id=user.userkey or
requestedby.id=user.id
09/27/2024 12:58 AM
Hi @NM thanks for the response.
There is already once condition is in place. The expected flow is like this.
1. User with ROLE_ADMIN can submit the request and it will be Auto Approved when submitting Others
but when he is making changes for Self it should be Rejected
2. Users with other Roles also can submit for Self where it can go for Next Approver or Auto Approved based on 'region code'
Your logic can make the ROLE_ADMIN also will be Auto Approved and not check for next condition.
Consider case where User with ROLE_ADMIN and regioncode is not Employee it will go to next approval
Thanks
09/27/2024 12:59 AM
Complete Workflow