Przeglądaj źródła

fix 修复 listenerVariable.getVariable() 获取null问题

疯狂的狮子Li 6 miesięcy temu
rodzic
commit
dac447b76f

+ 3 - 0
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/listener/WorkflowGlobalListener.java

@@ -74,6 +74,9 @@ public class WorkflowGlobalListener implements GlobalListener {
         String ext = listenerVariable.getNode().getExt();
         if (StringUtils.isNotBlank(ext)) {
             Map<String, Object> variable = listenerVariable.getVariable();
+            if (CollUtil.isNotEmpty(variable)) {
+                variable = new HashMap<>();
+            }
             NodeExtVo nodeExt = nodeExtService.parseNodeExt(ext, variable);
             Set<String> copyList = nodeExt.getCopySettings();
             if (CollUtil.isNotEmpty(copyList)) {