I had a workflow with activiti: 5.18.0 which when started, creates a single row in ACT_RU_EXECUTION.
I decided to create a new flow and migrate existing instances to the new flow. For which I tried with activiti version 6x, 5.22.0 and even 5.18.0. New flow creates multiple row (2 rows) in ACT_RU_EXECUTION table for every new instance.
Now if I work on migrated flow it throws an exception:
(Note: when tried with 6x, i also used v5 compatibility jars).
The exception comes because old execution have only single row per instance. while all the new flow have 2 rows (could be more):
old flow data:
ID_ | REV_ | PROC_INST_ID_ | BUSINESS_KEY_ | PARENT_ID_ | PROC_DEF_ID_ | SUPER_EXEC_ | ACT_ID_ | IS_ACTIVE_ | IS_CONCURRENT_ | IS_SCOPE_ | IS_EVENT_SCOPE_ | SUSPENSION_STATE_ | CACHED_ENT_STATE_ | TENANT_ID_ | NAME_ | LOCK_TIME_
38575005 | 3 | 38575005 | NULL | NULL | selfSignup:4:38575004 | NULL | registration | 1 | 0 | 1 | 0 | 1 | 2 | | NULL | NULL
new flow data: (first row has parent id)
29 | 1 | 5 | NULL | 5 | selfSignup:1:4 | NULL | categoryInputTask | 1 | 0 | 1 | 0 | 1 | 6 | | NULL | NULL
5 | 1 | 5 | f81b6787db8d4769 | NULL | selfSignup:1:4 | NULL | NULL | 0 | 0 | 1 | 0 | 1 | 0 | | NULL | NULL
Note: I do not have any subprocess in the new flow. All I introduced new is the timers but before it reaches timer, it fails.
(following line execution fails for old flows:
propagatingExecution = (InterpretableExecution) execution.getParent();
from AtomicOperationTransitionDestroyScope class )
java.lang.NullPointerException: null
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:95)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:95)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:661)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:654)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:34)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:55)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:95)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:661)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:654)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:48)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:95)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:661)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:654)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:468)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:446)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:139)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:63)
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:42)
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:43)
at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:231)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:424)
at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:207)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:64)
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:23)
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:58)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:58)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:46)
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:189)