Bläddra i källkod

流程id生成规则优化

dudm 3 år sedan
förälder
incheckning
a3aa20f801

+ 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();