Custom query on a terminated workflow returns error


Query method returns results as expected on a Completed Workflow.
However when i call the query method on a terminated workflow it returns error

Error: Query workflow failed.

Error Details: rpc error: code = InvalidArgument desc = io.temporal.internal.replay.InternalWorkflowTaskException: Failure handling event 29 of 'EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED' type. IsReplaying=false, PreviousStartedEventId=27, workflowTaskStartedEventId=0, Currently Processing StartedEventId=27

Are custom query methods not supported on terminated/cancelled workflows?


Thanks for reporting. This looks like a bug. I filed an issue to get this fixed.

Is there a Java SDK build with the fix?


It looks like it is not released yet.

Hi, I’m also encountering this error using Java SDK.
Is there already a fix for this error?

Thank you.

reposted here Calling Query Method on a Terminated Workflow Throws Exception