String workflowId = args[1];
workflowExecution.setWorkflowId(workflowId);
String runId = args[2];
workflowExecution.setRunId(runId);
GenericWorkflowClientExternal client = new GenericWorkflowClientExternalImpl(swfService, domain);
String state = client.getWorkflowState(workflowExecution);
System.out.println("Current state of " + workflowExecution + ":");
System.out.println(state);
}