sdk-java
sdk-java copied to clipboard
TestWorkflowEnvironment - add support for filtering for ListOpenWorkflowExecutions
Currently TestWorkflowEnvironment does support ListOpenWorkflowExecutions, but it does not apply filtering, for example:
StartTimeFilter
ListOpenWorkflowExecutionsRequest req = ListOpenWorkflowExecutionsRequest
.newBuilder()
.setStartTimeFilter(StartTimeFilter.newBuilder()
.setEarliestTime(Timestamp.newBuilder()
.setSeconds(seconds)
.build())
.build())
.setNamespace(client.getOptions().getNamespace())
.build();
WorkflowTypeFilter
ListOpenWorkflowExecutionsRequest req = ListOpenWorkflowExecutionsRequest
.newBuilder()
.setTypeFilter(WorkflowTypeFilter.newBuilder()
.setName(type)
.build())
.setNamespace(client.getOptions().getNamespace())
.build();
are not applied when using TestWorkflowEnvironment service and client.
Assigning low priority. Test Server is intended for testing Workflow implementations, full on-par support of all administrative endpoints is not really a goal. Workflow logic shouldn’t trigger listopenworkflowexecutions, it's an admin/operation endpoint.
Leaving it open, because it's good to have.