From 79228bd9475aeefad4753b946c8926759ce51e46 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 9 Apr 2023 10:22:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=B5=81=E7=A8=8B=E6=97=B6=EF=BC=8C=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=90=8D=E5=8F=AF=E8=83=BD=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/service/task/BpmProcessInstanceServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java index 68075b3d5..3b569d625 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java @@ -289,7 +289,12 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService } // 创建流程实例 - ProcessInstance instance = runtimeService.startProcessInstanceById(definition.getId(), businessKey, variables); + ProcessInstance instance = runtimeService.createProcessInstanceBuilder() + .processDefinitionId(definition.getId()) + .businessKey(businessKey) + .name(definition.getName().trim()) + .variables(variables) + .start(); // 设置流程名字 runtimeService.setProcessInstanceName(instance.getId(), definition.getName());