From 6b1b19c151213a6f07446bb62bbd0f4caa7f2d80 Mon Sep 17 00:00:00 2001 From: wangli <274027703@qq.com> Date: Tue, 12 Dec 2023 20:04:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E6=9B=B4=E6=96=B0=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E6=A8=A1=E6=9D=BF=E5=8F=96=E6=B6=88=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/utils/BpmnJsonConverterUtil.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/common/utils/BpmnJsonConverterUtil.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/common/utils/BpmnJsonConverterUtil.java index 6f8d2861d..94c04758a 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/common/utils/BpmnJsonConverterUtil.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/common/utils/BpmnJsonConverterUtil.java @@ -317,14 +317,16 @@ public final class BpmnJsonConverterUtil { noticeConfigElement.setName(CONFIG_NOTICE); // 通知消息模板配置 - ExtensionElement noticeMessage = new ExtensionElement(); - noticeMessage.setName(TEMPLATE_NOTICE_MESSAGE_ID); - ExtensionAttribute noticeMessageAttribute = new ExtensionAttribute(); - noticeMessageAttribute.setName(ELEMENT_ATTRIBUTE_VALUE); - noticeMessageAttribute.setValue(noticeConf.getNotice().getNoticeMessageId()); - noticeMessage.addAttribute(noticeMessageAttribute); - noticeMessage.setElementText(noticeConf.getNotice().getViewJson()); - noticeConfigElement.addChildElement(noticeMessage); + if (Objects.nonNull(noticeConf.getNotice())) { + ExtensionElement noticeMessage = new ExtensionElement(); + noticeMessage.setName(TEMPLATE_NOTICE_MESSAGE_ID); + ExtensionAttribute noticeMessageAttribute = new ExtensionAttribute(); + noticeMessageAttribute.setName(ELEMENT_ATTRIBUTE_VALUE); + noticeMessageAttribute.setValue(noticeConf.getNotice().getNoticeMessageId()); + noticeMessage.addAttribute(noticeMessageAttribute); + noticeMessage.setElementText(noticeConf.getNotice().getViewJson()); + noticeConfigElement.addChildElement(noticeMessage); + } // 代办消息模板配置 if (Objects.nonNull(noticeConf.getPending())) {