AnsweredAssumed Answered

Spring bean with execution in sub process

Question asked by butik on Nov 28, 2014
Latest reply on Dec 2, 2014 by butik
Hi,

I have used spring bean in subprocess in the service task. This bean should do some actions with user and according to result, define which transition it should go.

[IMG]http://i59.tinypic.com/2088hvp.png[/IMG]

T accomplished it I'm passing ActivityExecution execution
${springBean.addUser(execution)}
to bean.

After executing process I got exception (full log attached):
<sub>
11:15:29,119 [main] DEBUG org.activiti.engine.impl.interceptor.CommandContext  - Error while closing command context
org.activiti.engine.impl.pvm.PvmException: already taking a transition
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:395)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:105)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:54)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
   at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47)
   at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:49)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:54)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:89)

</sub>

Unit test for this error attached as activiti-unit-test-spring-subprocess.zip.txt.


Could you please tell is it a bug or I used service task and spring in wrong way?

Outcomes