@RequestMapping( value = "/{topologyId}/workflows/{workflowName}/steps/{stepId}/swap", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public RestResponse<Workflow> swap( @PathVariable String topologyId, @PathVariable String workflowName, @PathVariable String stepId, @RequestParam String targetId) { Topology topology = topologyServiceCore.getMandatoryTopology(topologyId); topologyService.checkEditionAuthorizations(topology); topologyService.throwsErrorIfReleased(topology); Workflow wf = workflowBuilderService.swapSteps(topology, workflowName, stepId, targetId); alienDAO.save(topology); return RestResponseBuilder.<Workflow>builder().data(wf).build(); }