Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Workflow Enhancement Request for Conditional Approval Routing

sabyasachi1
New Contributor III
New Contributor III

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

4 REPLIES 4

NM
Honored Contributor II
Honored Contributor II

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

sabyasachi1
New Contributor III
New Contributor III

Hi @NM ,

I request you please help me with the code. I have already tried but it not working.

NM
Honored Contributor II
Honored Contributor II

@sabyasachi1 share the tried one..

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

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.