org.kuali.rice.kew.engine.node
Class RequestsNode

java.lang.Object
  extended by org.kuali.rice.kew.engine.node.RequestActivationNodeBase
      extended by org.kuali.rice.kew.engine.node.RequestActivationNode
          extended by org.kuali.rice.kew.engine.node.RequestsNode
All Implemented Interfaces:
Node, SimpleNode
Direct Known Subclasses:
RoleNode

public class RequestsNode
extends RequestActivationNode

A node which generates ActionRequestValue objects from a RouteModule.

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

Nested Class Summary
protected  class RequestsNode.FinalApproverContext
           
 
Field Summary
protected static String SUPPRESS_POLICY_ERRORS_KEY
           
 
Constructor Summary
RequestsNode()
           
 
Method Summary
protected  Object getKey(RouteNodeInstance nodeInstance)
          The method will get a key value which can be used for comparison purposes.
 List<ActionRequestValue> getNewActionRequests(RouteContext context)
           
protected  RouteModule getRouteModule(RouteContext context)
          Returns the RouteModule which should handle generating requests for this RequestsNode.
protected  boolean isPastFinalApprover(DocumentRouteHeaderValue document, RouteNodeInstance nodeInstance)
          Checks if the document has past the final approver node by walking backward through the previous node instances.
protected  void isPastFinalApprover(List previousNodeInstances, RequestsNode.FinalApproverContext context, Set revokedNodeInstanceIds)
           
static boolean isSupressingPolicyErrors(RouteContext routeContext)
           
 SimpleResult process(RouteContext routeContext, RouteHelper routeHelper)
           
protected  boolean processCustom(RouteContext routeContext, RouteHelper routeHelper)
          Used by subclasses to replace the functioning of the process method.
static void setSupressPolicyErrors(RouteContext routeContext)
           
protected  void verifyFinalApprovalRequest(DocumentRouteHeaderValue document, List<ActionRequestValue> requests, RouteNodeInstance nodeInstance, RouteContext routeContext)
          Verifies the state of the action requests when a final approval action is involved.
 
Methods inherited from class org.kuali.rice.kew.engine.node.RequestActivationNode
activateRequest, activateRequests, activateRequestsCustom, logProcessingMessage, saveActionRequest, saveDocument, shouldTransition
 
Methods inherited from class org.kuali.rice.kew.engine.node.RequestActivationNodeBase
notify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPRESS_POLICY_ERRORS_KEY

protected static final String SUPPRESS_POLICY_ERRORS_KEY
See Also:
Constant Field Values
Constructor Detail

RequestsNode

public RequestsNode()
Method Detail

process

public final SimpleResult process(RouteContext routeContext,
                                  RouteHelper routeHelper)
                           throws Exception
Specified by:
process in interface SimpleNode
Overrides:
process in class RequestActivationNode
Throws:
Exception

processCustom

protected boolean processCustom(RouteContext routeContext,
                                RouteHelper routeHelper)
                         throws Exception
Used by subclasses to replace the functioning of the process method.

Returns:
true if custom processing was performed and the base implementation in process(RouteContext, RouteHelper) should be skipped.
Throws:
Exception

verifyFinalApprovalRequest

protected void verifyFinalApprovalRequest(DocumentRouteHeaderValue document,
                                          List<ActionRequestValue> requests,
                                          RouteNodeInstance nodeInstance,
                                          RouteContext routeContext)
                                   throws RouteManagerException
Verifies the state of the action requests when a final approval action is involved. Throws a RouteManagerException if actions were not generated correctly.

Throws:
RouteManagerException

getNewActionRequests

public List<ActionRequestValue> getNewActionRequests(RouteContext context)
                                              throws Exception
Parameters:
routeLevel - Route level for which the action requests will be generated
routeHeader - route header for which the action requests are generated
saveFlag - if true the new action requests will be saved, if false they are not written to the db
Returns:
List of ActionRequests - NOTE they are only written to DB if saveFlag is set
Throws:
org.kuali.rice.kew.exception.WorkflowException
org.kuali.rice.kew.exception.ResourceUnavailableException
Exception

getRouteModule

protected RouteModule getRouteModule(RouteContext context)
                              throws Exception
Returns the RouteModule which should handle generating requests for this RequestsNode.

Throws:
Exception

isPastFinalApprover

protected boolean isPastFinalApprover(DocumentRouteHeaderValue document,
                                      RouteNodeInstance nodeInstance)
Checks if the document has past the final approver node by walking backward through the previous node instances. Ignores any previous nodes that have been "revoked".


isPastFinalApprover

protected void isPastFinalApprover(List previousNodeInstances,
                                   RequestsNode.FinalApproverContext context,
                                   Set revokedNodeInstanceIds)

getKey

protected Object getKey(RouteNodeInstance nodeInstance)
The method will get a key value which can be used for comparison purposes. If the node instance has a primary key value, it will be returned. However, if the node instance has not been saved to the database (i.e. during a simulation) this method will return the node instance passed in.


isSupressingPolicyErrors

public static boolean isSupressingPolicyErrors(RouteContext routeContext)

setSupressPolicyErrors

public static void setSupressPolicyErrors(RouteContext routeContext)


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