Best practice in handling parallel call microflow steps in workflow

0
Dear all, Does anyone know how to best handle parallel ‘call microflow’ steps which are inflicting updates and database commits to the same object(s). For instance when I want to complete a document using parallel workflow steps and both steps are changing 1 object, I may run into database errors. Anyone any suggestions in preventing this?  I've thought about delaying steps, but that might not solve the problem if for instance 1 of the steps is running for a while (i.e. multiple calls to other applications) and I don't really want to delay several minutes or longer. Thanks for your ideas!  
asked
2 answers
0

Hi Joost,

 

This can cause issues indeed, so we do not recommend performing system tasks in parallel like this. Could you share more insight into why these are in a parallel branch? Based on your use case, I might be able to suggest a different workflow setup, or we will have to think this through within the team and come up with a solution.

 

Thanks in advance,

Jef Hellemans

answered
0

Found a way to solve this.

  1. Add a user task before starting the 2nd parallel action with only 1 outcome (i.e. Completed)
  2. Add a complete user task microflow after finishing first parallel action in which you complete the task created in 1

 

Then after finishing step A, it is the turn of step B, which will complete the user task of step C, which results in parallel action step D. 

Would be nice to add some sort of an event listener where you can have this done ‘out-of-the-box’. Do I need to create an idea for that or is this question already something that can end up in the idea section?

answered