public Workflow getWorkflow(String workflowTemplateId)
throws InvalidRequestException, AiravataClientException,
AiravataSystemException, TException {
try {
org.apache.airavata.workflow.model.wf.Workflow w = getAiravataAPI().getWorkflowManager().getWorkflow(workflowTemplateId);
Workflow workflow = new Workflow();
workflow.setTemplateId(workflowTemplateId);
workflow.setGraph(XMLUtil.xmlElementToString(w.toXML()));
workflow.setName(w.getName());
return workflow;
} catch (AiravataAPIInvocationException e) {
String msg = "Error in retrieving the workflow "+workflowTemplateId+".";
log.error(msg, e);
AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);