temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Add ability for workflow to wait for completion of an external workflow

Open mfateev opened this issue 3 years ago • 8 comments

Currently, the workflow code can wait for the completion of its child workflow. It is also possible to wait for the completion of any workflow given its id from an external client. Ability waiting for the completion of any workflow from a decider code is missing.

Strawman proposal:

Add a WaitForExternalWorkflowCompletion decision and the corresponding event. Add a WaitForExternalWorkflowCompletionFailed event Add ExternalWorkflowCompleted/Failed/Cancelled/Terminated/TimedOut events. Another option is to have an ExternalWorkflowCompleted event that contains the termination event of the external workflow as a field.

Copied from https://github.com/uber/cadence/issues/656

mfateev avatar Aug 18 '20 03:08 mfateev

+1 for this change - it would make it possible to "re-parent" child workflows across continued-as-new parents, which is very useful in batch-like workflows where children take varying amount of time to execute and you don't want to have to wait for all children to complete before moving on to the next chunk in the batch.

thewmo avatar Feb 03 '22 18:02 thewmo

+1

This would be extremely helpful as the current mechanisms for a workflow to wait for the completion of an external workflow are all quite messy. I really just want my workflow to go to "sleep" until that external workflow completes.

shaunco avatar Jul 26 '22 09:07 shaunco

Is this feature added?

akhil-ggv avatar Aug 14 '23 11:08 akhil-ggv

discussed in-depth internally

paulnpdev avatar Jan 28 '24 23:01 paulnpdev

discussed in-depth internally

We wait with bated breath...

dylanturn avatar Jan 30 '24 23:01 dylanturn

+1

moredure avatar Mar 28 '24 13:03 moredure