Use cases for queries

There can be many use cases for queries, this post shows how they could be used in a “human in the loop” scenario.

Uses cases revolve around being able to get/poll the current wf state, doing that with queries is fully consistent (relies on primary temporal db).
Using visibility queries, for example querying Elasticsearch directly or using ListWorkflowExecutions api is eventually consistent.