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  void applyPoliciesOnExit(List<ActionRequestValue> requestsGenerated, RouteContext routeContext)
          Applies policies that should get checked prior to transitioning out of this node.
protected  void detectRunawayProcess(RouteContext routeContext, int currentIteration)
           
protected  List<ActionRequestValue> generateRequests(RouteContext routeContext)
           
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  ParameterService getParameterService()
           
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 isSuppressingPolicyErrors(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 setSuppressPolicyErrors(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

generateRequests

protected List<ActionRequestValue> generateRequests(RouteContext routeContext)
                                             throws Exception
Throws:
Exception

applyPoliciesOnExit

protected void applyPoliciesOnExit(List<ActionRequestValue> requestsGenerated,
                                   RouteContext routeContext)
Applies policies that should get checked prior to transitioning out of this node. The default implementation of this method checks the "mandatory" policy.

Parameters:
requestsGenerated - the requests generated on the current iteration of the route module
routeContext - the current route context

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
Throws:
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.


detectRunawayProcess

protected void detectRunawayProcess(RouteContext routeContext,
                                    int currentIteration)
                             throws NumberFormatException
Throws:
NumberFormatException

isSuppressingPolicyErrors

public static boolean isSuppressingPolicyErrors(RouteContext routeContext)

setSuppressPolicyErrors

public static void setSuppressPolicyErrors(RouteContext routeContext)

getParameterService

protected ParameterService getParameterService()


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.