【发布时间】:2020-09-11 15:16:12
【问题描述】:
我正在尝试使用 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());
【问题讨论】:
标签: java cadence-workflow