Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/20/2022 05:35 AM
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
Solved! Go to Solution.
05/20/2022 08:45 AM
05/20/2022 11:51 AM
@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
05/20/2022 02:15 PM - edited 05/20/2022 02:15 PM
If else block with Expression language select as groovy
05/20/2022 08:57 PM
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
05/23/2022 12:36 AM
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).
05/23/2022 11:24 AM
Thanks @rushikeshvartak & @amit_krishnajit for the solution. Works!