public static Pair<String, String> invoker(String userName,
String password, String workflowAsAString,
Pair<String, String>[] inputs,
Workflow workflow) throws IOException, GSSException {
WorkflowClient wfClient = null;
WorkflowContext context = null;
String topic = UUID.randomUUID().toString();
context = new GPELWorkflowContext(topic, userName, password);
wfClient = new GPELWorkflowClient(context, workflow);
wfClient.init();
try {
System.out.println(workflow.getGPELTemplateID());
context.prepare(wfClient, workflow);
} catch (GSSException e) {
throw new RuntimeException(e);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
return wfClient.invoke(inputs);
}