diff --git a/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java b/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java index bb6e30234..5ca7cb65d 100644 --- a/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java +++ b/contentworkflow-plugin/src/main/java/com/agiletec/plugins/jpcontentworkflow/aps/system/services/notifier/WorkflowNotifierManager.java @@ -113,7 +113,10 @@ public void listenContentSaving(ProceedingJoinPoint pjp, Object content) { String contentId = currentContent.getId(); if (null != contentId) { Content previousContent = this.getContentManager().loadContent(contentId, false); - if (previousContent.getStatus().equals(currentContent.getStatus())) { + // previousContent is null when the content is being created with a caller-supplied id + // (e.g. a bundle install that preserves content ids): there is no prior work copy to + // compare against, so it IS a status change — keep notify = true rather than NPE. + if (previousContent != null && previousContent.getStatus().equals(currentContent.getStatus())) { notify = false; } }