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 Query - Decide Approval Flow Based on Entitlement Enddate in Access Request

Sivagami
Valued Contributor
Valued Contributor

Hi Team,

I have a requirement to send the entitlement to application owner approval only if enddate is populated in Access request and send the entitlement to manager & application owner approval if end date is left blank.

How do I achieve this? What's the binding variable that I can use in the if else block? 

Can REQUESTACCESSOBJ be used? Any syntax?

Siva

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

rushikeshvartak_0-1653061509661.png

 


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

Sivagami
Valued Contributor
Valued Contributor

@rushikeshvartak - Which workflow block have you used for the condition?

Seems like Request_Access / REQUESTACCESSOBJ object is not exposed in if/else block. Receiving missing property exception. I would need to put some condition in if/else block along with the end date condition.

ERROR services.WorkflowService - Exception in workflow service
org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: Request_Access for class: Script5

If else block with Expression language select as groovy


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

Sivagami
Valued Contributor
Valued Contributor

Request_Access seems to be not exposed in if else block. No matter if expression language is selected as groovy or left blank, receiving same missing property exception

amit_krishnajit
Saviynt Employee
Saviynt Employee

In the if-else block, you may want to try the following expression:

com.saviynt.ecm.workflow.Request_Access.get(new Long(requestaccesskey))?.enddate != null

To use this expression, you would need to select Groovy in the expression language drop-down. 

Also, you may want to have another if-else block before this, so that the account related item can be approved (you may want to use something like entitlement != null in the previous if-else block). 

 

Thanks,
Amit

Sivagami
Valued Contributor
Valued Contributor

Thanks @rushikeshvartak & @amit_krishnajit for the solution. Works!