我正在尝试使用 WorkflowServiceTChannel 查询 ListOpenWorkflowExecutions。我总是得到 0 的 ListOpenWorkflowExecutionsResponse 大小。我无法弄清楚我哪里出错了。以下是我正在使用的 java 代码。
IWorkflowService cadenceService = new WorkflowServiceTChannel(ipAddress, 7933);
// Start Window
Calendar startCal = Calendar.getInstance();
startCal.add(Calendar.HOUR_OF_DAY, -24);
// End Window
Calendar endCal = Calendar.getInstance();
StartTimeFilter timeFilter = new StartTimeFilter();
timeFilter.setEarliestTime(startCal.getTimeInMillis());
timeFilter.setLatestTime(endCal.getTimeInMillis());
ListOpenWorkflowExecutionsRequest request = new ListOpenWorkflowExecutionsRequest();
request.setStartTimeFilter(timeFilter);
request.setDomain("staging");
ListOpenWorkflowExecutionsResponse response =
cadenceService.ListOpenWorkflowExecutions(request);
System.out.println(response.getExecutionsSize());