From 2b64bc4b8a24d693e1c7c13a973e527faeb16270 Mon Sep 17 00:00:00 2001 From: yitonglei Date: Mon, 6 Mar 2023 16:15:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=87=AA=E5=8A=A8=E5=B7=A5=E5=8D=95=E9=9D=9E?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=BB=BB=E5=8A=A1=E4=BF=9D=E5=AD=98=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/listener/ProcessEndListener.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/listener/ProcessEndListener.java b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/listener/ProcessEndListener.java index 184a6d7..ea837ea 100644 --- a/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/listener/ProcessEndListener.java +++ b/lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/listener/ProcessEndListener.java @@ -11,6 +11,7 @@ import org.springblade.plugin.workbench.service.IAutoStartModelService; import org.springblade.plugin.workbench.service.impl.AutoStartModelServiceImpl; import org.springframework.stereotype.Component; +import java.util.HashMap; import java.util.Map; /** @@ -28,19 +29,20 @@ public class ProcessEndListener implements ExecutionListener { String event = delegateExecution.getEventName(); String processInstanceId = delegateExecution.getProcessInstanceId(); Map variables = delegateExecution.getVariables(); - + Map variablesMap = new HashMap<>(); + variablesMap.putAll(variables); switch (event) { case "start" : IAutoStartModelService autoStartModelService = (IAutoStartModelService)SpringContextHolder.getBean(AutoStartModelServiceImpl.class); System.out.println("ProcessEndListener-start event-------------------"); //判断工作流的的重复模式 - if(Func.isNotEmpty(variables.get("chongfumoshi")) && !StringUtils.equals(RepeatEnum.不重复.getCode(),variables.get("chongfumoshi").toString())){ + if(Func.isNotEmpty(variablesMap.get("chongfumoshi")) && !StringUtils.equals(RepeatEnum.不重复.getCode(),variablesMap.get("chongfumoshi").toString())){ //保存任务信息使任务工单可以被自动创建 - autoStartModelService.saveStartProcess(processInstanceId,variables); + autoStartModelService.saveStartProcess(processInstanceId,variablesMap); //使任务可以自动开启,这里不用新建工单,因为TaskConfig会自动创建 // autoStartModelService.updateAutoStartModel(processInstanceId,variables); }else{//不重复任务 - autoStartModelService.newWorkOrder(processInstanceId,variables); + autoStartModelService.newWorkOrder(processInstanceId,variablesMap); } break;