@Path(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODETYPE)
@Produces(MediaType.TEXT_PLAIN)
public Response updateWorkflowNodeType(@FormParam("workflowInstanceId") String workflowInstanceId,
@FormParam("nodeId") String nodeId,
@FormParam("nodeType") String nodeType) {
AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
try {
WorkflowExecution workflowExecution = new WorkflowExecution(workflowInstanceId, workflowInstanceId);
WorkflowInstanceNode workflowInstanceNode = new WorkflowInstanceNode(workflowExecution, nodeId);
WorkflowNodeType workflowNodeType = new WorkflowNodeType();
workflowNodeType.setNodeType(WorkflowNodeType.getType(nodeType).getNodeType());
// workflowNodeType.setNodeType(nodeType);
airavataRegistry.updateWorkflowNodeType(workflowInstanceNode, workflowNodeType);
Response.ResponseBuilder builder = Response.status(Response.Status.OK);
builder.entity("Workflow instance node type updated successfully...");
return builder.build();
} catch (Throwable e) {
return WebAppUtil.reportInternalServerError(ResourcePathConstants.ProvenanceResourcePathConstants.UPDATE_WORKFLOWNODETYPE, e);