Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

If-Else Workflow

mgra
New Contributor III
New Contributor III

Hello,

I have the following use case and it seems not working. Could you help look into what's causing the issue?

Scenario: I want the request to be auto-approved whenever the manager requested the access on behalf of his/her direct reports. But if it's the user or others the one who requested the access, there should be an approval request that will route to the user manager.

 

graceandrade_0-1660814529574.png

 

 

 

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

RequestedFor.owner eq RequestedBy.username


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

mgra
New Contributor III
New Contributor III

Still not working, I'm getting an error when I test the workflow "The server encountered an error and cannot complete your request."

requestedby.username eq manager.username

PFA attached transport zip of workflow

rushikeshvartak_0-1660873749962.png

 


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

mgra
New Contributor III
New Contributor III

I'm trying to create a workflow with this one. I'm a newbie when it comes to SQL queries so apologies for my dumb question. I don't know why the request is being send to the Entitlement owner and Manager at the same time. wherein the flow should be sequential.

Scenario: Request will first require Manager Approval then it will check if the entitlement has owner. If yes, approval request should go next to the Entitlement Owner.

graceandrade_0-1660989491491.png

 

Remove Groovy Expression language from if else block. 

Requirement is go sequence right manager followed by owner ? 

Or both should go at same time. 

Confirm if manager & owner & requestor same ? 

Give example n explain how to it works currently


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

mgra
New Contributor III
New Contributor III

Yup, in sequence. Manager followed by owner (Only if the entitlement access requested has owner). 
If the entitlement has no owner. Manager Approval is already enough.
Manager and entitlement owner are different.
May i know what's the use of groovy?

I even tried testing the workflow when I remove the groovy but still getting the same output. It generates an approval request for Manager and Entitlement Owner at the same time. Then If the entitlement owner approved the request, when I refresh the Pending Approval for the Manager the approval request is already gone. Manager approval is waived.

saviyntsupportagent3 is not the Manager, it's the entitlement owner. Manager is different.

graceandrade_2-1660997845974.png

 

What is type of workflow? 

Serial or parallel? 

If your workflow is parallel then

Condition

entitlement.entowners.size() == 0

True - Grant 

false - Entitlement Owner Approval

 

Groovy is used when you java code of saviynt

 

Refer https://saviynt.freshdesk.com/support/solutions/articles/43000618490-workflows 


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

haardik_verma
Regular Contributor
Regular Contributor

Hi @mgra ,

As far as I know, this happens automatically by default.

If the manager is requesting on behalf of their subordinate, the manager approval part is auto-approved by default.

And if service owner is request for access on behalf of any user and if that request is coming for this owner's approval, it is auto-approved by default.

From my experience, we do not need any if-else block here.

Please correct me if I am wrong @rushikeshvartak 


Thanks & Regards,
Haardik Verma