如何从 Uber Cadence 中的 Java 代码获取 open/closed 工作流列表?
How to get open/closed workflow list from Java code in Uber Cadence?
我正在从事一个使用 Uber Cadence Java 客户端的项目。如何从代码中获取 open/closed 工作流列表?我可以从 CLI 获取它,但不能从 java 代码获取。
谢谢。
WorkflowServiceTChannel cadenceService =
new WorkflowServiceTChannel(ClientOptions.defaultInstance());
ListOpenWorkflowExecutionsRequest request = new ListOpenWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.set...;
ListOpenWorkflowExecutionsResponse resp = cadenceService.ListOpenWorkflowExecutions(request);
ListClosedWorkflowExecutionsRequest request = new ListClosedWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.set...;
ListClosedWorkflowExecutionsResponse resp = cadenceService.ListClosedWorkflowExecutions(request);
// If you have advanced visibility
ListWorkflowExecutionsRequest request = new ListWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.setQuery(...);
ListWorkflowExecutionsResponse resp = cadenceService.ListWorkflowExecutions(request);
看看 cadenceService
在这个 sample
中是如何使用的
的文档
我正在从事一个使用 Uber Cadence Java 客户端的项目。如何从代码中获取 open/closed 工作流列表?我可以从 CLI 获取它,但不能从 java 代码获取。
谢谢。
WorkflowServiceTChannel cadenceService =
new WorkflowServiceTChannel(ClientOptions.defaultInstance());
ListOpenWorkflowExecutionsRequest request = new ListOpenWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.set...;
ListOpenWorkflowExecutionsResponse resp = cadenceService.ListOpenWorkflowExecutions(request);
ListClosedWorkflowExecutionsRequest request = new ListClosedWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.set...;
ListClosedWorkflowExecutionsResponse resp = cadenceService.ListClosedWorkflowExecutions(request);
// If you have advanced visibility
ListWorkflowExecutionsRequest request = new ListWorkflowExecutionsRequest();
request.setDomain(DOMAIN);
=request.setQuery(...);
ListWorkflowExecutionsResponse resp = cadenceService.ListWorkflowExecutions(request);
看看 cadenceService
在这个 sample