As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
18-Feb-2013 19:40:49 org.activiti.engine.impl.interceptor.CommandContext closeSEVERE: Error while closing command contextjava.lang.NullPointerException at org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.leave(ParallelMultiInstanceBehavior.java:96) at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:49) at org.activiti.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior.signal(ReceiveTaskActivityBehavior.java:35) at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.signal(MultiInstanceActivityBehavior.java:102) at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:353) at org.activiti.engine.impl.cmd.SignalCmd.execute(SignalCmd.java:45) at org.activiti.engine.impl.cmd.NeedsActiveExecutionCmd.execute(NeedsActiveExecutionCmd.java:52) at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60) at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40) at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) at org.activiti.engine.impl.RuntimeServiceImpl.signal(RuntimeServiceImpl.java:170) at com.ajita.activiti.MessageSender.notify(MessageSender.java:60) at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
I assume the reason for one extra task, is in effect a parent for each of the individual tasks, but then how is this stored in the database?
At what point does the individual multi task get marked as ended? When each one is signalled?
Question, how do I detect which instance has already been signalled? I can see that one gets marked as inactive in the database. I assumed that Execution.isEnded() would tell me which one is complete, but seems to return false even for the inactive instance.
Interestingly my jUnit example returns the parent last and not first from the executionQuery.
Can't you use ExecutionQuery activityId(String activityId); to fetch the executions which are specifically on the receive task?If that query also returns the parent or any already signalled children then we've hit a limit of Activiti and we'll have to add some new logic I'm afraid.
List<Execution> executionList = runtimeService.createExecutionQuery()<br> .processInstanceId(processInstance.getId())<br> .activityId("receivetask1")<br> .list();
List<Execution> executionList = runtimeService.createNativeExecutionQuery()<br> .sql("SELECT * FROM ACT_RU_EXECUTION WHERE ACT_ID_ = 'waitWeighed' AND IS_ACTIVE_ = 'TRUE'AND IS_SCOPE_ = 'FALSE'")<br> .list();