private void addWorkflow(Workflow workflow, String workflowAsString, String owner)
throws WorkflowAlreadyExistsException, AiravataAPIInvocationException {
try {
getClient().getRegistryClient().addWorkflow(workflow.getName(), workflowAsString);
} catch (UserWorkflowAlreadyExistsException e) {
throw new WorkflowAlreadyExistsException("Workflow " +
workflow.getName()
+ " already exists in the system.", e);
} catch (RegistryException e) {
throw new AiravataAPIInvocationException("An internal error occurred while adding workflow " +
workflow.getName(), e);