Queries on Terminated Workflows

Hi,

I wanted to double check what I’m seeing and trying to understand what’s happening under the hood.

When a workflow is terminated (or completed), what do the queries to it return?

From what I have observed through experimentation, the queries are calculated before termination and saved. Whenever there’s a query to the workflow, the saved response will be given. Is this true? If so, is there anything that might make the query return blank?

Thanks!

Albert

Query requests for completed executions are delivered via workflow task, so require your workers to be up. Worker has to pull event history and replay it against workflow code, then return query result back to service (which delivers it to client that requested).

If so, is there anything that might make the query return blank?

If you change your workflow code for the completed exec you are querying then yes query handler could return a different value.