cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Timer Boundary event and Spring bean

cundurs
Champ in-the-making
Champ in-the-making
Hello!

I try put  Timer Boundary event between receive task or user task (I tried both) and service task, but got exception during execution.

When process does not use Timer Boundary event than it works smoothly - bean is found and required method is executed. But, when I put timer between receive task or user task  and service task, then by executing timer fallowing exception is raised:

Exception in thread "pool-1-thread-3" org.activiti.engine.ActivitiException: Unknown property used in expression
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:48)
        at org.activiti.engine.impl.bpmn.listener.ExpressionExecutionListener.notify(ExpressionExecutionListener.java:35)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:38)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:109)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:326)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.takeAll(ExecutionEntity.java:420)
        at org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior.execute(BoundaryEventActivityBehavior.java:57)
        at org.activiti.engine.impl.jobexecutor.TimerExecuteNestedActivityJobHandler.execute(TimerExecuteNestedActivityJobHandler.java:48)
        at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:78)
        at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62)
        at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:58)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:36)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'dummyBean'
        at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
        at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
        at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
        at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
        at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
        at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:46)
        … 25 more

When I go to ActivitiProbe -> Jobs and for corresponding job press "Execute job", than job is executed and process finishes without errors. I have seen similar problem descriptions on forum, but provided tips don't helped much. Is there needed to configure something more to let job executor to "see" beans ?
4 REPLIES 4

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
The tips in the other posts probably did contain the right info, but it can be difficult to grasp. I has everything to do with having multiple instances of the engine and where your spring beans are on which classpath. They are probably on te classpath of probe so you can execute te jobs there, but not on the classpath of the jobexecutor that executes them in other cases.

cundurs
Champ in-the-making
Champ in-the-making
Thanks Ronald!

Where should I look to find some configuration file for job executor or where could be defined classpath for job executor ?

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
In the current (pre 5.7) release there are multiple ones, that is part of the 'confusion'. I do not know by heart which webapps have the job executor running, but I think it is the rest-webapp and the kickstart. So look at those.

In 5.7 A lot changes afaik and there will only be one running. So check that out

cundurs
Champ in-the-making
Champ in-the-making
Thanks, I copied configuration file from rest to kickstart and with with tears in eyes  Smiley Very Happy was watching how timer successfully executed bean.