Changed PublishEventProcessor so that it correctly updates the Publishing Status on the PublishingEvent node.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29042 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-14 15:41:11 +00:00
parent bfa8a8c4ff
commit 6bbd3b1684
2 changed files with 14 additions and 2 deletions

View File

@@ -65,10 +65,12 @@ public class PublishingEventProcessor
public void processEventNode(NodeRef eventNode)
{
ParameterCheck.mandatory("actionedUponNodeRef", eventNode);
ParameterCheck.mandatory("eventNode", eventNode);
try
{
behaviourFilter.disableAllBehaviours();
String inProgressStatus = PublishingEvent.Status.IN_PROGRESS.name();
nodeService.setProperty(eventNode, PublishingModel.PROP_PUBLISHING_EVENT_STATUS, inProgressStatus);
PublishingEvent event = eventHelper.getPublishingEvent(eventNode);
NodeRef environment = eventHelper.getEnvironmentNodeForPublishingEvent(eventNode);
String channelName = event.getChannelName();
@@ -81,6 +83,8 @@ public class PublishingEventProcessor
{
publishEvent(channel, event);
updateStatus(channel, environment, event.getStatusUpdate());
String completedStatus = PublishingEvent.Status.COMPLETE.name();
nodeService.setProperty(eventNode, PublishingModel.PROP_PUBLISHING_EVENT_STATUS, completedStatus);
}
}
finally