public static WorkflowExecutionInfo describeWorkflowInstance(AmazonSimpleWorkflow service, String domain,
WorkflowExecution workflowExecution) {
DescribeWorkflowExecutionRequest describeRequest = new DescribeWorkflowExecutionRequest();
describeRequest.setDomain(domain);
describeRequest.setExecution(workflowExecution);
WorkflowExecutionDetail executionDetail = service.describeWorkflowExecution(describeRequest);
WorkflowExecutionInfo instanceMetadata = executionDetail.getExecutionInfo();
return instanceMetadata;
}