org.kuali.rice.ken.postprocessor.kew
Class NotificationPostProcessor

java.lang.Object
  extended by org.kuali.rice.ken.postprocessor.kew.NotificationPostProcessor
All Implemented Interfaces:
PostProcessorRemote

public class NotificationPostProcessor
extends Object
implements PostProcessorRemote

This class is the post processor that gets run when workflow state changes occur for the underlying core NotificationDocumentType that all notifications go into KEW as. This class is responsible for changing the state of the associated notification message delivery record after someone FYIs or ACKs their notification in the KEW Action List.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private static org.apache.log4j.Logger LOG
           
(package private)  NotificationMessageDeliveryService msgDeliverySvc
           
(package private)  NotificationService notificationService
           
 
Constructor Summary
NotificationPostProcessor()
          Constructs a NotificationPostProcessor instance.
 
Method Summary
 boolean afterProcess(AfterProcessEventDTO afterProcessEvent)
          The document has just completed processing by the Workflow engine.
 boolean beforeProcess(BeforeProcessEventDTO beforeProcessEvent)
          The document is about to be processed by the Workflow engine.
 boolean doActionTaken(ActionTakenEventDTO event)
          Need to intercept ACKNOWLEDGE or FYI actions taken on notification workflow documents and set the local state of the Notification to REMOVED as well.
 boolean doDeleteRouteHeader(DeleteEventDTO arg0)
          KEW is signaling that the document should be deleted.
 boolean doRouteLevelChange(DocumentRouteLevelChangeDTO arg0)
          The document has changed route level.
 boolean doRouteStatusChange(DocumentRouteStatusChangeDTO arg0)
          The document has changed route status.
 String[] getDocumentIdsToLock(DocumentLockingEventDTO documentLockingEvent)
          Executed prior to document locking in the workflow engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

notificationService

NotificationService notificationService

msgDeliverySvc

NotificationMessageDeliveryService msgDeliverySvc
Constructor Detail

NotificationPostProcessor

public NotificationPostProcessor()
Constructs a NotificationPostProcessor instance.

Method Detail

doActionTaken

public boolean doActionTaken(ActionTakenEventDTO event)
                      throws RemoteException
Need to intercept ACKNOWLEDGE or FYI actions taken on notification workflow documents and set the local state of the Notification to REMOVED as well.

Specified by:
doActionTaken in interface PostProcessorRemote
Returns:
Throws:
RemoteException
See Also:
PostProcessorRemote.doActionTaken(org.kuali.rice.kew.dto.ActionTakenEventDTO)

doDeleteRouteHeader

public boolean doDeleteRouteHeader(DeleteEventDTO arg0)
                            throws RemoteException
Description copied from interface: PostProcessorRemote
KEW is signaling that the document should be deleted. The application can reject this by returning false. If an Exception is thrown the docuemnt will go to exception routing. If a ResourceUnavailableException is thrown, the doc will be requeued and will try again later to delete the document.

Specified by:
doDeleteRouteHeader in interface PostProcessorRemote
Returns:
Throws:
RemoteException
See Also:
PostProcessorRemote.doDeleteRouteHeader(org.kuali.rice.kew.dto.DeleteEventDTO)

doRouteLevelChange

public boolean doRouteLevelChange(DocumentRouteLevelChangeDTO arg0)
                           throws RemoteException
Description copied from interface: PostProcessorRemote
The document has changed route level. The docEvent contains the information about the change. This method should do what ever is appropriate for various route level changes to a document. The method should return true if the change is correct and all application actions as a result of the change are successful. It should return false if the application considers this an incorrect change. The method can throw a ResourceUnavailableException in order to requeue the document and try again later.

Specified by:
doRouteLevelChange in interface PostProcessorRemote
Returns:
true if the status change is correct and application actions are successful
Throws:
RemoteException
See Also:
PostProcessorRemote.doRouteLevelChange(org.kuali.rice.kew.dto.DocumentRouteLevelChangeDTO)

doRouteStatusChange

public boolean doRouteStatusChange(DocumentRouteStatusChangeDTO arg0)
                            throws RemoteException
Description copied from interface: PostProcessorRemote
The document has changed route status. The docEvent contains the information about the change. This method should do what ever is appropriate for various route status changes to a document. The method should return true if the change is correct and all application actions as a result of the change are successful. It should return false if the application considers this an incorrect change. The method can throw a ResourceUnavailableException in order to requeue the document and try again later.

Specified by:
doRouteStatusChange in interface PostProcessorRemote
Returns:
true if the status change is correct and application actions are successful later if this exception is thrown
Throws:
RemoteException
See Also:
PostProcessorRemote.doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO)

beforeProcess

public boolean beforeProcess(BeforeProcessEventDTO beforeProcessEvent)
                      throws Exception
Description copied from interface: PostProcessorRemote
The document is about to be processed by the Workflow engine.

Specified by:
beforeProcess in interface PostProcessorRemote
Parameters:
beforeProcessEvent - - holder for data from the engine's process
Returns:
true if the method is successful, false otherwise
Throws:
Exception - A general Exception will put the document into Exception routing
See Also:
PostProcessorRemote.beforeProcess(org.kuali.rice.kew.dto.BeforeProcessEventDTO)

afterProcess

public boolean afterProcess(AfterProcessEventDTO afterProcessEvent)
                     throws Exception
Description copied from interface: PostProcessorRemote
The document has just completed processing by the Workflow engine.

Specified by:
afterProcess in interface PostProcessorRemote
Parameters:
afterProcessEvent - - holder for data from the engine's process including whether the engine was successful or not
Returns:
true if the method is successful, false otherwise
Throws:
Exception - A general Exception will put the document into Exception routing
See Also:
PostProcessorRemote.afterProcess(org.kuali.rice.kew.dto.AfterProcessEventDTO)

getDocumentIdsToLock

public String[] getDocumentIdsToLock(DocumentLockingEventDTO documentLockingEvent)
                              throws Exception
Description copied from interface: PostProcessorRemote
Executed prior to document locking in the workflow engine. This method returns an array of document ids to lock prior to execution of the document in the workflow engine. If the engine processing is going to result in updates to any other documents, they should be locked at the beginning of the engine processing transaction. This method facilitates that.

Note that, by default, the id of the document that is being processed by the engine is always locked. So there is no need to return that document id in the array of document ids to lock.

Specified by:
getDocumentIdsToLock in interface PostProcessorRemote
Returns:
an array of document ids to lock prior to execution of the workflow engine
Throws:
Exception
See Also:
PostProcessorRemote.getDocumentIdsToLock(org.kuali.rice.kew.dto.DocumentLockingEventDTO)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.