浏览代码

流程id生成规则优化

dudm 3 年之前
父节点
当前提交
a3aa20f801
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      flowable/src/main/java/com/huyi/flowable/controller/ApiController.java

+ 1 - 1
flowable/src/main/java/com/huyi/flowable/controller/ApiController.java

@@ -306,7 +306,7 @@ public class ApiController {
                 File file = new File(filePath);
                 System.out.println("源文件是否存在:" + file.exists());
                 //流程id
-                String flowKey = UUID.randomUUID().toString().replaceAll("-", "");
+                String flowKey = "process_".concat(UUID.randomUUID().toString().replaceAll("-", ""));
                 System.out.println("流程的key:" + flowKey);
                 ProcessDefinition processDefinition;
                 processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionKey(flowKey).singleResult();