use of com.plumdo.flow.cmd.DeployModelCmd in project plumdo-work by wengwh.
the class ModelDeployResource method deployModel.
@RequestMapping(value = "/model/{modelId}/deploy", method = RequestMethod.POST, produces = "application/json", name = "模型部署")
@ResponseStatus(value = HttpStatus.CREATED)
@Transactional(propagation = Propagation.REQUIRED)
public ProcessDefinitionResponse deployModel(@PathVariable String modelId) {
Model model = getModelFromRequest(modelId);
Deployment deployment = managementService.executeCommand(new DeployModelCmd(model.getId()));
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult();
return restResponseFactory.createProcessDefinitionResponse(processDefinition);
}
Aggregations