List of usage examples for com.amazonaws.services.simpleworkflow.model WorkflowExecutionInfos getNextPageToken
public String getNextPageToken()
If a NextPageToken
was returned by a previous call, there are more results available.
From source file:org.diksha.common.dyutils.SchedulerUDE.java
License:Apache License
public static ArrayList<String> listOpenExecutionsFromSWF(String config) { ArrayList<String> retValue = new ArrayList<String>(); SchedulerConfig schedulerConfig = DyDBUtils.getSchedulerConfig(config); AmazonSimpleWorkflowClient amazonSimpleWorkflowClient = new AmazonSimpleWorkflowClient( DyDBUtils.getAwsCredentials()); amazonSimpleWorkflowClient.setEndpoint(schedulerConfig.getEndPoint()); ListOpenWorkflowExecutionsRequest listOpenWorkflowExecutionsRequest = new ListOpenWorkflowExecutionsRequest() .withDomain(schedulerConfig.getDomain()) .withStartTimeFilter(new ExecutionTimeFilter().withOldestDate(new Date(0L))); WorkflowExecutionInfos workflowExecutionInfos = amazonSimpleWorkflowClient .listOpenWorkflowExecutions(listOpenWorkflowExecutionsRequest); String nextPageToken;/*from www .j a va2 s . c o m*/ do { java.util.List<WorkflowExecutionInfo> listWorkflowExecutionInfos = workflowExecutionInfos .getExecutionInfos(); for (int cnt = 0; cnt < listWorkflowExecutionInfos.size(); cnt++) { retValue.add(listWorkflowExecutionInfos.get(cnt).getExecution().getWorkflowId()); } nextPageToken = workflowExecutionInfos.getNextPageToken(); } while (nextPageToken != null); return retValue; }