Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3679

Problem with subprocesses embedded in multi-instance nodes



      We are struggling with a problem involving sub processes from within a multi-instance node if the sub processes contain a timer or a signal event, so when the execution flow is interrupted in the sub process.

      The problem is that the main process never continues beyond the second multi-instance node.

      • We start the process as usual by using startProcess, providing an array with two strings "A" and "B" which in essence launches two sub-processes from the multi-instance node.
      • Everything is fine with the first multi-instance node, it creates the sub processes, adds two more rows to the ProcessInstanceInfo table (in addition to the one of the main process) and adds another two rows to EventTypes with the fixed content "processInstanceCompleted:xxx" where xxx is the process id of the respective sub process.
      • Within the subprocesses, the timer event stops the process execution, persisting everything to the database and waits until the timer fires again.
      • Once the timer has fired, the two sub processes are signalled and due to the fact that there is a listener to the "processInstanceCompleted" event in the main process, the main process will get evidence once all sub processes have completed, and can continue to execute.
      • Now the main process again creates two sub processes and again it will register the two "processInstanceCompleted" created by its child sub processes.
      • But - and here is the problem from my point of view - the sub process does not get updated or otherwise persisted once the sub processes run into the timer events.

      As a result, those "processInstanceCompleted" events will not show up in the database and consequently, the main process will never be informed once the sub processes are terminating.

      The last step in the process can never be reached.

      From what I understand, the problem can occur ONLY in cases when there is a second sub process/multi-instance component and within the sub process there is a break from a timer node or a signal event node.

      We are launching the main process from a stateless session bean in response to a message grabbed from a JMS-like queuing system. I am pretty sure that we do not have a problem with persistence in general.

        Gliffy Diagrams




              • Assignee:
                swiderski.maciej Maciej Swiderski
                martin.landua Martin Landua
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: