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
Hello,

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(AstIdentifier.java:83) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:79) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25) [activiti-engine-5.10.jar:5.10]
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50) [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!

Outcomes