Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/09/2024 06:44 AM
Hi Team,
We have a requirement related to the workflow for access and account requests, as detailed below:
Requirement: When a user requests an account or access, the request should first go to the user's manager for approval. After the manager's approval, it should proceed to the manager's manager. Following this step, it will go to the Resource Owner for final approval.
However, there is a specific condition to handle:
1. If the manager's manager is on leave (indicated by a leave status of 1), the request should be routed to a specific group instead of proceeding to the manager's manager.
2. If the leave status is not set (leave status is 0 or null), the request should go to the manager's manager as usual.
3. Note that in this scenario, the manager is not setting any "Do Not Disturb Delegate" or "Delegate User" for his absence.
We need a condition in the workflow that can check the leave status of the manager's manager and redirect the approval task accordingly.
Please let me know the possible solutions or approaches to implement this workflow requirement.
Regards
Sabyasachi Mohanty
09/09/2024 07:05 AM
Hi @sabyasachi1 you can use one custom assignment block with union
If leaves status is set to 1 it will go to user group otherwise to manager's manager
09/09/2024 07:16 AM
Hi @NM ,
I request you please help me with the code. I have already tried but it not working.
09/09/2024 07:18 AM
@sabyasachi1 share the tried one..
09/09/2024 07:20 AM
SELECT ug.userkey FROM usergroup_users ug WHERE EXISTS (SELECT endusermanager.manager FROM request_Access ra JOIN users endusermanager ON ra.userkey = endusermanager.userkey WHERE ra.REQUESTKEY = ${ARSREQUEST.id} AND endusermanager.leavestatus = '1') AND USER_GROUPKEY=100 UNION SELECT endusermanager.manager as userkey FROM request_Access ra JOIN users endusermanager ON ra.userkey = endusermanager.userkey WHERE ra.REQUESTKEY = ${ARSREQUEST.id} AND (endusermanager.leavestatus = '0' OR endusermanager.leavestatus IS NULL);