0 Replies Latest reply on Jun 26, 2015 7:33 AM by mdegan

    Tasks generated for completed processInstance

    mdegan

      This is something that happened by chance but got me thinking if this is how it should be. I had a process flow that had a parallel divergence into 2 branches. On the convergence of the branch, we had used the exclusive convergence by mistake. What happened after this was interesting. When the process instance started, it went fine to both branches. However when branch 1 was completed, it reached the exclusive convergence and proceeded on to further tasks from there. This was expected. However now, when the branch 2 completed, it also crossed exclusive convergence and went on to create duplicate tasks on the process flow. Since we had already proceeded from branch 1, we completed all tasks originated due to that flow and completed the processInstance. However, the tasks created because of branch 2 were still active and completing them continued creating subsequent tasks on the processInstance that was already complete. This did not look right to me.

       

      So, in principle, I understand that if we want to wait for both branches to complete, we should use parallel convergence. However, tasks being created on completed process instance doesnt look right. Should we have a handling somewhere to check if process instance is still active before sending a task message to the task server or before proceeding to the next node? Also, Should we have some handling to ensure that tasks do not get duplicated in such scenarios?