public EndpointResponse removeJob(RemoveJobRequest request) { try { jobDao.remove(request.getJobId()); return EndpointHelper.createResponse(EndpointResponse.class, request); } catch (Exception e) { return EndpointHelper.createErrorResponse(EndpointResponse.class, request, e); } }
public EndpointResponse removeWorkflow(RemoveWorkflowRequest request) { try { workflowDao.remove(request.getWorkflowId()); for (Job j : jobDao.findJobs(request.getWorkflowId(), null)) { jobDao.remove(j.get_id()); } return EndpointHelper.createResponse(EndpointResponse.class, request); } catch (Exception e) { return EndpointHelper.createErrorResponse(EndpointResponse.class, request, e); } }