| | |
| | | return AjaxResult.success("导入成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改原来部署的流程,不再以新版本部署") |
| | | @Log(title = "修改原来部署的流程,不再以新版本部署", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody FlowSaveXmlVo vo) { |
| | | InputStream in = null; |
| | | try { |
| | | in = new ByteArrayInputStream(vo.getXml().getBytes(StandardCharsets.UTF_8)); |
| | | flowDefinitionService.updateProcess(vo.getDeploymentId(), vo.getName(), vo.getCategory(), in); |
| | | } catch (Exception e) { |
| | | log.error("导入失败:", e); |
| | | return AjaxResult.error(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | if (in != null) { |
| | | in.close(); |
| | | } |
| | | } catch (IOException e) { |
| | | log.error("关闭输入流出错", e); |
| | | } |
| | | } |
| | | |
| | | return AjaxResult.success("导入成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "发起流程") |
| | | @Log(title = "发起流程", businessType = BusinessType.INSERT) |
| | | @PostMapping("/start/{procDefId}") |