How can I handle synchronization or a rendezvous point using the Task Queue?

0
I have a question about executing multiple microflows in parallel using the Task Queue, and understanding when all the items, that I need to process, have been completed. Each request may involve a different number of iterations, and I need to ensure that all items have been processed before invoking another microflow. How can I achieve this use case? Any suggestions or best practices?  
asked
2 answers
0

In this case, why use the Task Queue? If all items need to be processed, I believe the use of a Task Queue may not be necessary.

However, you can include a validation inside the SUB_Microflow to check if all items have already been processed, and if so, trigger the "END" flow.

answered
0

Use the Task Queue Manager from the marketplace: https://marketplace.mendix.com/link/component/220289

With this module you can check if all your tasks that where put in the queue are finished (do check also the status of the task). 

So create a microflow that retrieves all the just created task and check their status if not use the Delay function of the community commons to wait X amount of time before checking again. Use a loop counter so you do not create an endless loop in your model but quit after a certain number of loops. If all the queues are correctly finished trigger the next flow to do the rest of your stuff.

 

Regards,

Ronald

answered