mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11625: Exception occurs on server startup relating to FeedNotifier
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32492 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -316,8 +316,7 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
|
||||
@Override
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
// Only try and send the email if the actioned upon node reference still exists
|
||||
if (nodeService.exists(actionedUponNodeRef) == true)
|
||||
if (validNodeRefIfPresent(actionedUponNodeRef))
|
||||
{
|
||||
prepareAndSendEmail(ruleAction, actionedUponNodeRef);
|
||||
}
|
||||
@@ -329,13 +328,30 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true)
|
||||
if (validNodeRefIfPresent(actionedUponNodeRef))
|
||||
{
|
||||
prepareAndSendEmail(ruleAction, actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean validNodeRefIfPresent(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (actionedUponNodeRef == null)
|
||||
{
|
||||
// We must expect that null might be passed in (ALF-11625)
|
||||
// since the mail action might not relate to a specific nodeRef.
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only try and send the email if the actioned upon node reference still exists
|
||||
// (i.e. if one has been specified it must be valid)
|
||||
return nodeService.exists(actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean sendAfterCommit(Action action)
|
||||
{
|
||||
Boolean sendAfterCommit = (Boolean) action.getParameterValue(PARAM_SEND_AFTER_COMMIT);
|
||||
|
Reference in New Issue
Block a user