Completing tasks synchronously (completing later tasks while waiting for another to finish)

Hey all,

I was wondering if its possible to complete tasks synchronously with Zeebe?

for example, as seen in the photo I have three tasks which each call a REST service with varying delay (10 Minutes for Task 1, nothing for task 2 and 2 minutes for Task 3). so if a workflow instance is waiting for task #1 to respond can it go ahead and finish task #2 which has no delay?

so the new order of execution would be TASK 2, TASK 3, TASK1 effectivley?

I am using the Zeebe java client
thanks in advance for you help! hope this made sense :slight_smile:

Hey @AABDIPOU

welcome to our community and thanks for raising this question.

I assume you meant asynchronously. With your given model this is not possible. It will be executed in a sequence, which means first you need to complete Task 1, then 2, then 3.

BUT If you really want to execute them concurrently then you can model it.

As an example you can do something like this:

With this model all tasks are executed concurrently and the execution of the workflow instance waits in the second parallel gateway until all tasks are completed. After all tasks are completed your workflow instance can be completed.

Hope this helps.

Greets
Chris

P.S.:

Of course you could also model it like this:

This would cause that Task 1 is started to executed concurrently with Task 2, but Task 3 can only completed after Task 2 is done.