Inability to list workflow executions with test environment


I am designing an endpoint to list some information about executions of various workflows. This is available in the example: io.temporal.samples.listworkflows. When I run this code using a TestWorkflowEnvironment I get the exception:

io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method temporal.api.workflowservice.v1.WorkflowService/ListWorkflowExecutions is unimplemented
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(
	at io.grpc.stub.ClientCalls.getUnchecked(

I wonder if there is a mode in which I must put the TestWorkflowEnvironment in order for this to work or if ListWorkflowExecutionsResponse is not supported when using TestWorkflowEnvironment?



Any observations welcome including “why would you want that” or “it works for me”… Thanks :slight_smile:

Hello @Matthew_Gerring

The method is not implemented for the environment. You can use ListOpenWorkflowExecutionsRequest or LisClosedWorkflowExecutionsRequest instead.

“why would you want that”?


I want to have endpoints for returning all the temporal queue information in order to build my own queue UI. I do not want to expose temporal endpoints on the internet and prefer to wrap the functionality. Then in order to test this, I need to start a test temporal environment. If you can think of a better way, very interested to know.

It makse sense @Matthew_Gerring

There is an open issue to support listworkflowexecutions in test environment Support listWorkflowExecutions in test server · Issue #1693 · temporalio/sdk-java · GitHub