How to find all workflows that are currently in "Workflow.await"?

Hello,

I’m trying out Temporal and playing with patterns like:

  • perform Activity (like send user notification)
  • block Worfklow to wait for signal via ‘Workflow.await’
  • receive signal
  • perform another Activity
  • block Worfklow to wait for signal via ‘Workflow.await’
  • receive signal

What I’m looking for is a way to see which Workflows are now in ‘Workflow.await’ and what signal they are waiting for specifically.

Is there a way to perform such a search via UI or command line?

So far I only noticed I can go to the “Stacktrace” tab on Temporal UI and see the line and class name where “Workflow.await” was called. But since it can only be performed for each workflow separately, this doesn’t support searching across all workflows.

Thanks!

You can use custom search attributes (requires ElasticSearch integration) to query workflows waiting on some property. Use upsertSearchAttributes to update such a property from a workflow.