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 - Bypass Rank 1 approver if Rank 1 is inactive and no present

Gaurav29
New Contributor
New Contributor

I couldn't find specific details in the documentation, but I remember that at some point, workflow configurations could automatically detect the status of the entitlement owner.

For instance, consider a three-step workflow:

  1. If Rank 1 is active, route it to Rank 1 for approval.
  2. If Rank 1 is inactive and not present, route it to Rank 2 for approval.
  3. If Rank 1 is active but doesn't approve within 7 days, escalate it to Rank 2 for approval.

I configured the workflow as described, but if Rank 1 is inactive, the system assigns the request to admins. Please refer to the screenshots below:

Gaurav29_0-1705067141888.pngGaurav29_1-1705067167999.png

 

 

9 REPLIES 9

rushikeshvartak
All-Star
All-Star

use Custom Assignment block with custom query to handle above use cases.


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

Hi Rushikesh, 

Thank you for the reply!

I tried the below query but it's not working. it's assigning the workflow to Admins. 

(Select u.statuskey as eoStatus from Users u,Entitlement_owners eo,Entitlement_values ev where u.id=eo.userkey.id AND eo.entitlement_valuekey.id=ev.id AND ev.id='${entitlement.id}').get(0).toString().contains('0')


Thanks
Gaurav

 

  • Output of query should be always userkey
  • Sample for use case 1
    • select userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=1

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

Hi @rushikeshvartak

I apologize for bothering you again. I attempted to execute the query you shared earlier, and it seems to be returning a Null value for a False case. Specifically, when the approver at Rank 1 is present but in inactive state, the workflow defaults to Admin.

Could you assist me in modifying the query? I aim to redirect the workflow to Rank 2 or the False condition if Rank 1 is inactive.

Thanks

Gaurav

Above query was sample you need to manipulate logic and update


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

  • select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=1 Union select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=2 and 0= ( select count(*) from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=0 and eo.rank=1)

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

Gaurav29
New Contributor
New Contributor

I tried to run the below query but it's not working properly hence requesting help to correct the query as per the below requirement. 

For instance, consider a three-step workflow:

  1. If Rank 1 is active, route it to Rank 1 for approval.
  2. If Rank 1 is inactive and not present, route it to Rank 2 for approval.
  3. If both Rank 1 and Rank 2 are not present or Inactive then assign the request to User Group.

Please find the below query which I'm using: 

SELECT case when
(select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=1 Union select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=2 and 0!= ( select count(*) from entitlement_owners eo,users u where eo.ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=0 and eo.rank=1))is null then (select u.userkey from usergroup_users u where u.USER_GROUPKEY=217)
ELSE
(select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=1 Union select u.userkey from entitlement_owners eo,users u where ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=1 and eo.rank=2 and 0!= ( select count(*) from entitlement_owners eo,users u where eo.ENTITLEMENT_VALUEKEY=${REQUESTACCESSOBJ.id} and u.userkey=eo.userkey and u.statuskey=0 and eo.rank=1))
end

Please help. 

Thanks

Gaurav

Which logic is not working ?

https://forums.saviynt.com/t5/identity-governance/workflow-bypass-rank-1-approver-if-rank-1-is-inact...


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

Gaurav29
New Contributor
New Contributor

Hi @rushikeshvartak

Thank you for your reply!

Actually, the system is not assigning the workflow to any approver. The approver column is blank in the request. Looks like some issue with the query itself. 

Thanks

Gaurav