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

Groovy script for Access_Approvers table

Pagrahari
New Contributor
New Contributor

Can someone please help in identifying whats the correct query in groovy which can be added in the if-else block of workflow. The below query doesnt work. (com.saviynt.ecm.identitywarehouse.domain.Access_approvers.executeQuery("Select status from access_approvers where request_access_key=18201").size()==2)

 

I am getting below error :

Exception in workflow service
 
2024-07-09T14:47:14-05:00-ecm--null-49d2d--org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: com for class: Script6 at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:582) at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:487) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:123) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:53) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:71) at com.saviynt.ecm.services.WorkflowService.workflowaccessreqStart(WorkflowService.groovy:1063) at com.saviynt.ecm.services.RoleversionService.sendRequest(RoleversionService.groovy:1930) at com.saviynt.ecm.identitywarehouse.controllers.RolesController$_closure81.doCall(RolesController.groovy:4611) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: com for class: Script6 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 37 moreCaused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: com for class: Script6 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 39 moreCaused by: groovy.lang.MissingPropertyException: No such property: com for class: Script6 at Script6.run(Script6.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 40 more
24 REPLIES 24

rushikeshvartak
All-Star
All-Star
  • Share workflow screenshot
  • make sure select language selected as groovy

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

Pagrahari_0-1720625045056.png

 

class name is wrong.

try class name as 

com.saviynt.ecm.workflow.Request_Access.executeQuery(

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

I think that worked but now i see a different error as below:

java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:601) at java.lang.Long.<init>(Long.java:965) at com.saviynt.ecm.RefreshDashboardService$_getEndpointList_closure47.doCall(RefreshDashboardService.groovy:4522) at com.saviynt.ecm.RefreshDashboardService.getEndpointList(RefreshDashboardService.groovy:4520) at com.saviynt.ecm.identitywarehouse.controllers.DashboardController$_closure16.doCall(DashboardController.groovy:1016) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)

what is condition now ? share as text


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

My groovy query works now but its going to else block when added in ifelse block condition

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select status from Access_Approvers where request_access_key='18201'") == 2)

👍Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.


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

Can you let me know why this query is going to else block

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select status from Access_Approvers where request_access_key='18201'") == 2)

Condition might not be matching what is output of query


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

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select distinct case when aa.status=2 then 'true' else 'false' end as status from Access_Approvers aa ,Request_Access  ra where aa.request_access_key=ra.id and ra.requestkey =  ${ars_requests.id}"))

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

This query gave me an error as below

 

org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY]; nested exception is org.hibernate.QueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY] at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:582) at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:487) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:123) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:53) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:71) at com.saviynt.ecm.services.WorkflowService.workflowaccessreqStart(WorkflowService.groovy:1063) at com.saviynt.ecm.services.RoleversionService.sendRequest(RoleversionService.groovy:1930) at com.saviynt.ecm.identitywarehouse.controllers.RolesController$_closure81.doCall(RolesController.groovy:4611) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY]; nested exception is org.hibernate.QueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 37 moreCaused by: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY]; nested exception is org.hibernate.QueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 39 moreCaused by: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY]; nested exception is org.hibernate.QueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY] at Script80.run(Script80.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 40 moreCaused by: org.hibernate.QueryException: could not resolve property: REQUESTKEY of: com.saviynt.ecm.workflow.Request_Access [Select distinct case when aa.status=2 then 'true' else 'false' end as status from com.saviynt.ecm.workflow.Access_Approvers AA, com.saviynt.ecm.workflow.Request_Access RA where RA.REQUESTKEY = '18201' AND RA.REQUEST_ACCESSKEY=AA.REQUEST_ACCESS_KEY] ... 42 more

Raghu
All-Star
All-Star

@Pagrahari  try below

com.saviynt.ecm.workflow.Access_Approvers.get(new Long(requestaccesskey)).accesstype == 2


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Can you help me how can i execute below query in workflow

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("select AA.status from ARS_REQUESTS AR, REQUEST_ACCESS RA, ACCESS_APPROVERS AA WHERE AR.REQUESTKEY = RA.REQUESTKEY AND AA.REQUEST_ACCESS_KEY = RA.REQUEST_ACCESSKEY AND AR.REQUESTKEY='${ARSREQUEST.id}' AND AA.STATUS=2").size()==1)

WHAT IS ERROR YOU GOT IN LOGS


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

This is the query I tried 

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from Access_Approvers AA ,Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'"))

 

Errors captured in the logs:

 

org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201']; nested exception is org.hibernate.QueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'] at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:582) at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:487) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:123) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:53) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:71) at com.saviynt.ecm.services.WorkflowService.workflowaccessreqStart(WorkflowService.groovy:1063) at com.saviynt.ecm.services.RoleversionService.sendRequest(RoleversionService.groovy:1930) at com.saviynt.ecm.identitywarehouse.controllers.RolesController$_closure81.doCall(RolesController.groovy:4611) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201']; nested exception is org.hibernate.QueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 37 moreCaused by: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201']; nested exception is org.hibernate.QueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 39 moreCaused by: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201']; nested exception is org.hibernate.QueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'] at Script84.run(Script84.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 40 moreCaused by: org.hibernate.QueryException: could not resolve property: STATUS of: com.saviynt.ecm.workflow.Access_Approvers [Select distinct case when AA.STATUS=2 then 'true' else 'false' end as STATUS from com.saviynt.ecm.workflow.Access_Approvers AA ,com.saviynt.ecm.workflow.Request_Access RA where AA.REQUEST_ACCESS_KEY=RA.REQUEST_ACCESSKEY AND RA.REQUESTKEY = '18201'] ... 42 more

 

 

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("select AA.status from Ars_Requests AR, Request_access RA, Access_Approvers AA WHERE AR.id= RA.REQUESTKEY AND AA.REQUEST_ACCESS_KEY = RA.id AND AR.REQUESTKEY='${ARSREQUEST.id}' AND AA.status=2").size()==1)


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

I tried this query 

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select AA.status from Request_Access RA, Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'").size()==1)

and I see below error in logs

org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'] at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:582) at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:487) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:123) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:53) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:71) at com.saviynt.ecm.services.WorkflowService.workflowaccessreqStart(WorkflowService.groovy:1063) at com.saviynt.ecm.services.RoleversionService.sendRequest(RoleversionService.groovy:1930) at com.saviynt.ecm.identitywarehouse.controllers.RolesController$_closure81.doCall(RolesController.groovy:4611) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 37 moreCaused by: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 39 moreCaused by: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'] at Script102.run(Script102.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 40 moreCaused by: org.hibernate.QueryException: could not resolve property: REQUEST_ACCESS_KEY of: com.saviynt.ecm.workflow.Access_Approvers [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND AA.REQUEST_ACCESS_KEY= RA.Request_Accesskey AND AA.status='2'] ... 42 more

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select AA.status from Request_Access RA, Access_Approvers AA WHERE RA.requestkey='18201' AND AA.id= RA.Request_Accesskey AND AA.status='2'").size()==1)


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

Its giving me this error

org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2'] at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.fire(ExecutionImpl.java:582) at org.jbpm.pvm.internal.model.ExecutionImpl.take(ExecutionImpl.java:487) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:123) at org.jbpm.jpdl.internal.activity.ForEachActivity.execute(ForEachActivity.java:53) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:63) at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:36) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:71) at com.saviynt.ecm.services.WorkflowService.workflowaccessreqStart(WorkflowService.groovy:1063) at com.saviynt.ecm.services.RoleversionService.sendRequest(RoleversionService.groovy:1930) at com.saviynt.ecm.identitywarehouse.controllers.RolesController$_closure81.doCall(RolesController.groovy:4611) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:159) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 37 moreCaused by: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2'] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 39 moreCaused by: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2']; nested exception is org.hibernate.QueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2'] at Script105.run(Script105.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 40 moreCaused by: org.hibernate.QueryException: could not resolve property: request_accesskey of: com.saviynt.ecm.workflow.Request_Access [Select AA.status from com.saviynt.ecm.workflow.Request_Access RA, com.saviynt.ecm.workflow.Access_Approvers AA WHERE RA.requestkey='18201' AND RA.request_accesskey =AA.id AND AA.status='2'] ... 42 more

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select AA.status from Request_Access RA, Access_Approvers AA WHERE RA.requestkey='18201' AND AA.id= RA.id AND AA.status='2'").size()==1)


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

Thanks a lot @rushikeshvartak,the provided query worked. Could you please let me know if we can add ifelse condition post escalation timer block will the query given in ifelse condition will be executed?

You can add


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

Thanks a lot for your help. There is one more thing I wanted to check I tried using below query in ifelseblock which gave me error

Query:

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select AA.status from Request_Access RA, Access_Approvers AA WHERE RA.id= AA.id AND AA.status='2' AND RA.requestkey='${ARSREQUEST.id}'").size()==0)

Error in the logs:

org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ARSREQUEST for class: Script95 at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:127) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:115) at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:87) at org.jbpm.pvm.internal.el.ScriptExpression.evaluateInScope(ScriptExpression.java:48) at org.jbpm.pvm.internal.el.Expression.evaluate(Expression.java:108) at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:41) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:47) at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.execute(DecisionConditionActivity.java:43) at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.op.TransitionEndActivity.perform(TransitionEndActivity.java:56) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:672) at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:632) at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:430) at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:416) at org.jbpm.pvm.internal.job.TimerImpl.execute(TimerImpl.java:92) at org.jbpm.pvm.internal.job.TimerImpl.execute(TimerImpl.java:50) at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:79) at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:41) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ARSREQUEST for class: Script95 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:123) ... 33 moreCaused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: ARSREQUEST for class: Script95 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:349) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:146) ... 35 moreCaused by: groovy.lang.MissingPropertyException: No such property: ARSREQUEST for class: Script95 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at Script95.run(Script95.groovy:1) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:346) ... 36 more

(com.saviynt.ecm.workflow.Access_Approvers.executeQuery("Select AA.status from Request_Access RA, Access_Approvers AA WHERE RA.id= AA.id AND AA.status='2' AND RA.requestkey='${ars_requests.id}'").size()==0)


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