}
public static History getHistoryPage(String nextPageToken, AmazonSimpleWorkflow service, String domain,
WorkflowExecution workflowExecution) {
GetWorkflowExecutionHistoryRequest getHistoryRequest = new GetWorkflowExecutionHistoryRequest();
getHistoryRequest.setDomain(domain);
getHistoryRequest.setExecution(workflowExecution);
getHistoryRequest.setNextPageToken(nextPageToken);
History history = service.getWorkflowExecutionHistory(getHistoryRequest);
if (history == null) {
throw new IllegalArgumentException("unknown workflow execution: " + workflowExecution);
}