From 2b841abaf8594a2eab72c28a5d1b872407f11428 Mon Sep 17 00:00:00 2001 From: Roy Wetherall Date: Thu, 14 Mar 2013 08:22:16 +0000 Subject: [PATCH] RM: Fix up reject notification so it successfully sends email, despite all the record information having been deleted from the node. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@48071 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../notification/RecordsManagementNotificationHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/notification/RecordsManagementNotificationHelper.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/notification/RecordsManagementNotificationHelper.java index 925239a349..65306483d4 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/notification/RecordsManagementNotificationHelper.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/notification/RecordsManagementNotificationHelper.java @@ -314,7 +314,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod { ParameterCheck.mandatory("record", record); - if (canSendRejectEmail(record) == true) + if (canSendRejectEmail(record, recordCreator) == true) { String site = siteService.getSite(record).getShortName(); String rejectReason = (String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON); @@ -331,7 +331,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod args.put("rejectDate", rejectDate); args.put("recordId", recordId); args.put("recordName", recordName); - + NotificationContext notificationContext = new NotificationContext(); notificationContext.setAsyncNotification(true); notificationContext.setIgnoreNotificationFailure(true); @@ -349,7 +349,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod * * @param record rejected record */ - private boolean canSendRejectEmail(NodeRef record) + private boolean canSendRejectEmail(NodeRef record, String recordCreator) { boolean result = true; @@ -361,7 +361,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod result = false; logger.warn(msg1 + "the site which should contain the node '" + record.toString() + "'" + msg2); } - if (StringUtils.isBlank((String) nodeService.getProperty(record, PROP_RECORD_ORIGINATING_USER_ID)) == true) + if (StringUtils.isBlank(recordCreator) == true) { result = false; logger.warn(msg1 + "the user, who created the record" + msg2);