sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

TestWorkflowEnvironment - add support for filtering for ListOpenWorkflowExecutions

Open tsurdilo opened this issue 3 years ago • 1 comments

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.

tsurdilo avatar Apr 12 '22 23:04 tsurdilo

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.

Spikhalskiy avatar Apr 12 '22 23:04 Spikhalskiy