AnsweredAssumed Answered

Multi Instance java.lang.Double cannot be cast to java.lang.Integer

Question asked by ashendra1 on Apr 7, 2014
Latest reply on Apr 22, 2014 by jbarrez
I recently upgraded my activiti-engine to the newer version 5.15. In my bpmn I have a multi-instance subprocess. There is no completion condition set. So by default the execution ends when all the instances are completed. When the last execution ends, it throws this exception.

Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
   at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.getLoopVariable(MultiInstanceActivityBehavior.java:229)
   at org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.leave(ParallelMultiInstanceBehavior.java:105)
   at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.lastExecutionEnded(MultiInstanceActivityBehavior.java:109)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityEnd.eventNotificationsCompleted(AtomicOperationActivityEnd.java:81)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:90)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:571)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:566)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:90)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:571)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:566)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.end(ExecutionEntity.java:367)
   at org.activiti.engine.impl.bpmn.behavior.NoneEndEventActivityBehavior.execute(NoneEndEventActivityBehavior.java:24)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:54)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:90)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:571)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:566)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   
I check the  variable history table and there the type is 1 but it is loading as 1.0 in MultiInstanceActivityBehavior.
| ID_   | PROC_INST_ID_ | EXECUTION_ID_ | TASK_ID_ | NAME_         | VAR_TYPE_ | REV_ | BYTEARRAY_ID_ | DOUBLE_ | LONG_ | TEXT_ | TEXT2_ 11100 | 11084         | 11098         | NULL     | nrOfInstances | integer   |    0 | NULL          |    NULL |     1 | 1     | NULL   | 2014-04-06 | CREATE_TIME_        | LAST_UPDATED_TIME_ 
20:57:02 | 2014-04-06 20:57:02

Can anyone help in this.

Ashendra

Outcomes