I am working to create an app in which there are multiple stages- in the first stage there are multiple tasks to be executed in parallel...once all tasks of that stage have been completed, only then processing should go to next stage.
From what I read about deciders, deciders can choose from one of many possible options for the next stage.
But I want to go to next stage only when all parallel processes of current stage are complete.
Does this mean that I should set up each parallel process to invoke the next stage, and when the next stage is initialised, it should check if all parallel processes of previous stage are complete, and only then actually start processing? This will mean that all the parallel processes of first stage will invoke corresp. parallel processes of second stage, out of which only one will actually do processing (since this will be the process that finds that all processes of previous stage are complete).
Is there a better way of implementing this? So that the process of next stage is called only once?