Uploaded image for project: 'Bonita Community'
  1. BBPMC-338

Storing results of multi-instantiation in empty list causes IndexOutOfBoundsException

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1
    • Fix Version/s: 7.3.2
    • Component/s: Bonita Engine
    • Labels:
      None
    • Edition:
      Community
    • Reference:
      BS-14732
    • Steps to reproduce:
      Hide
      * create task,
      * select Iteration as Parallel multi-instantiation
      * select process list variable as input (vide: attachment),
      * check "Store output results",
      * select process list variable as output,
      Show
      * create task, * select Iteration as Parallel multi-instantiation * select process list variable as input (vide: attachment), * check "Store output results", * select process list variable as output,
    • Workaround:
      initialize output list to size at least the same as input list

      Description

      if output list variable of multi-instantiation task is not preliminarly initialized at particular size (at least the same as input one) it causes an exception:

      [#|2015-11-21T10:39:39.114+0100|SEVERE|glassfish3.1.2|org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork|_ThreadID=9234;_ThreadName=Thread-2;|THREAD_ID=9234 | HOSTNAME=EFLOW2 | TENANT_ID=1 | java.lang.IndexOutOfBoundsException : "Index: 0, Size: 0"
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.set(ArrayList.java:444)
      	at org.bonitasoft.engine.execution.StateBehaviors.mapDataOutputOfMultiInstance(StateBehaviors.java:272)
      	at org.bonitasoft.engine.execution.StateBehaviors.mapDataOutputOfMultiInstance(StateBehaviors.java:233)
      	at org.bonitasoft.engine.execution.state.ExecutingAutomaticActivityStateImpl.afterOnFinish(ExecutingAutomaticActivityStateImpl.java:38)
      	at org.bonitasoft.engine.execution.state.FlowNodeStateWithConnectors.execute(FlowNodeStateWithConnectors.java:81)
      	at org.bonitasoft.engine.execution.state.FlowNodeStateWithConnectors.execute(FlowNodeStateWithConnectors.java:35)
      	at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeState(FlowNodeExecutorImpl.java:128)
      	at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.updateState(FlowNodeExecutorImpl.java:182)
      	at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.stepForward(FlowNodeExecutorImpl.java:164)
      	at org.bonitasoft.engine.execution.FlowNodeExecutorImpl.executeFlowNode(FlowNodeExecutorImpl.java:317)
      	at org.bonitasoft.engine.execution.work.ExecuteFlowNodeWork.work(ExecuteFlowNodeWork.java:72)
      	at org.bonitasoft.engine.execution.work.TxBonitaWork$1.call(TxBonitaWork.java:48)
      	at org.bonitasoft.engine.execution.work.TxBonitaWork$1.call(TxBonitaWork.java:44)
      	at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:312)
      	at org.bonitasoft.engine.execution.work.TxBonitaWork.work(TxBonitaWork.java:53)
      	at org.bonitasoft.engine.execution.work.LockProcessInstanceWork.work(LockProcessInstanceWork.java:79)
      	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
      	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
      	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
      	at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66)
      	at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
      	at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47)
      	at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      |#]
      

      I think it would be better to extend such list as if it is too small or even add a checkbox option to enable such behaviour.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jaygo Sławomir Kisiel
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: