Process scope bean error on task complete

Description

A Spring bean is defined using "process" scope.
The bean is injected into a Task Listener.
During create event, the bean works properly.
But during complete event, the following error occurs:

10:39:11,391 [main] WARN org.activiti.spring.components.scope.ProcessScope - couldn't return value from process scope! java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102)
at org.activiti.engine.impl.context.Context.getExecutionContext(Context.java:68)
at org.activiti.spring.components.scope.ProcessScope.getExecutionId(ProcessScope.java:121)
at org.activiti.spring.components.scope.ProcessScope.getConversationId(ProcessScope.java:170)
at org.activiti.spring.components.scope.ProcessScope.get(ProcessScope.java:90)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:328)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:34)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.getTarget(CglibAopProxy.java:663)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:614)
at org.activiti.ProcessScopeBean$$EnhancerByCGLIB$$546889df.getValue(<generated>)
at org.activiti.MyTaskListenerBean.notify(MyTaskListenerBean.java:15)
at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.bpmn.listener.DelegateExpressionTaskListener.notify(DelegateExpressionTaskListener.java:49)
at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:533)
at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:146)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:39)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:24)
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:61)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)

Environment

None

Attachments

Assignee

Joram Barrez

Reporter

Claudio Tasso

Labels

None

Components

Affects versions

Priority

Major
Configure