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())) {