AnsweredAssumed Answered

Invoking a Spring bean from Activiti Explorer

Question asked by mialtuna on Oct 23, 2012
Latest reply on Jun 30, 2015 by jbarrez

Is it possible to invoke Spring beans after a User Task is confirmed in a Activiti Explorer?

We are deploying our Spring application war and the Activiti Explorer war in the same app server. The problem is that if after a user task confirmed using the Explorer the process has to continue with a service task that executes a Spring method, the bean is not known for the Explorer and we have got the next exception

Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'ourBean'
at org.activiti.engine.impl.juel.AstIdentifier.eval( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstMethod.invoke( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstMethod.eval( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstEval.eval( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstNode.getValue( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.DelegateInvocation.proceed( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation( [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.el.JuelExpression.getValue( [activiti-engine-5.10.jar:5.10]

As there are 2 diferents apps, they have got their own spring contexts.

What would be the best approach to solve that problem?

Thanks in advance!