@Path(ResourcePathConstants.UserWFConstants.UPDATE_WORKFLOW)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_PLAIN)
public Response updateWorkflow(@FormParam("workflowName") String workflowName,
@FormParam("workflowGraphXml") String workflowGraphXml) {
AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
try {
airavataRegistry.updateWorkflow(workflowName, workflowGraphXml);
Response.ResponseBuilder builder = Response.status(Response.Status.OK);
builder.entity("Workflow updated successfully...");
return builder.build();
} catch (UserWorkflowAlreadyExistsException e) {
Response.ResponseBuilder builder = Response.status(Response.Status.BAD_REQUEST);