Is there an easier way to wait until some task in a workflow is completed?

Hi, I am writing a http endpoint that triggers a workflow, I would like to make the API response only after some steps is completed.

For example, say the workflow has 3 activities A → B → C.
I want to make the endpoint to

  1. start the workflow
  2. wait for A to be done
  3. send response
  4. let B and C running asynchronously

One way I can think of is to split it into two workflows:
The first workflow runs A and trigger a second workflow which runs B and C.

I am wondering if there is an easier way to do this.

Thanks

Hi,

you can use updateWithStart, see this blog post Reduce End-User Latency and Accelerate Temporal Workflows | Temporal and the doc here Sending Signals, Queries, & Updates | Temporal Platform Documentation. There are examples for each sdk

Antonio

Exactly what I want. Thanks a lot :blush: