Query Tab in the UI

Is there any documentation on what the query tab is for? Does it just track all the queries that are made or is it suppose to give you the ability to query the running workflow for status?

Thanks,
Derek

It gives you an ability to execute synchronous queries associated with workflows. Just make sure that there is a worker running.

Here is the documentation for Queries
General: https://docs.temporal.io/docs/queries
Go specific: https://docs.temporal.io/docs/go-queries

Feel free to use this sample to see the tab in action https://github.com/temporalio/samples-go/tree/master/query
image

1 Like

Thanks @Ruslan

I looked at the documentation and I’m still trying to wrap my head around the usage of this feature and what use cases it’s ideal for. From what I understand, the main purpose is to be able to query custom defined states about the workflow while it’s running. This is useful for debugging purposes if the workflow gets stuck or if you have workflows that never ends or are long running.

Questions

  1. Can’t the history/stack trace be used to evaluate error cases within the workflow?
  2. Once the workflow is done executing it would be nice to be able to access the last state of those custom values. I’m not seeing it in the UI Summary or history tabs. Is it possible to access that? Or is it queryable from the API via describe
  3. Is there any other use case for the query feature?
  4. in the link you provided, it talks about how there are two types of consistency (eventual and strong) and how you would determine which one to use in a CLI. How does that work with the UI?

Thanks
Derek

I assume that you use “waveform” as a synonym for a workflow. Is it correct?

  1. History and stack trace are used for troubleshooting by developers. The query is also useful to return business level state out of a workflow. For example status of the workflow to show in a UI. BTW stack trace is implemented as a query as well.
  2. It is possible to query closed workflow. UI will be fixed to support this.
  3. Almost any use case that requires querying workflow information when it is running.
  4. I believe Temporal supports only strong consistency for queries. It means that if a client sends a signal and then query it is guaranteed that signal will be delivered to a workflow before the query is executed.

This topic was automatically closed after 5 days. New replies are no longer allowed.