org.kuali.rice.kew.engine.node
Class IteratedRequestActivationNode
java.lang.Object
org.kuali.rice.kew.engine.node.IteratedRequestActivationNode
- All Implemented Interfaces:
- Node, SimpleNode
- Direct Known Subclasses:
- KRAMetaRuleNode
public class IteratedRequestActivationNode
- extends Object
- implements SimpleNode
A node which will iteratively activate any requests pending on it. Subclasses are responsible for generating the requests
to be activated, and then delegating to superclass process(RouteContext, RouteHelper)
to activate
those requests.
This node can be used to serve multiple batches of requests, and can be re-entered multiple times. The algorithm it implements is:
- activate any existing requests (requests may have been generated by an external party)
- while request fulfillment criteria indicates that any pending requests have been satisfied
- generate new requests
- if no requests were generated, we are done, return and transition
- otherwise if requests were generated
- activate requests (depending on activation policy, serial or parallel, NOT ALL GENERATED REQUESTS MAY BE ACTIVATED AT THIS POINT)
- determine a request fulfillment criteria
- continue in loop
- otherwise if pending requests have not been satisfied, block until invoked again
This node transitions/completes when there are no remaining blocking action requests (i.e., no approval or
completion requests).
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Field Summary |
protected org.apache.log4j.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected final org.apache.log4j.Logger LOG
IteratedRequestActivationNode
public IteratedRequestActivationNode()
process
public SimpleResult process(RouteContext routeContext,
RouteHelper routeHelper)
throws Exception
- Specified by:
process
in interface SimpleNode
- Throws:
Exception
getRequestFulfillmentCriteria
protected IteratedRequestActivationNode.RequestFulfillmentCriteria getRequestFulfillmentCriteria(RouteContext routeContext)
- Template method that subclasses should override to indicate when activated requests have been fulfilled.
The default implementation is that all pending blocking requests must be fulfilled.
- Returns:
- a RequestFulfillmentCriteria that indicates when activated requests have been fulfilled.
generateNewRequests
protected boolean generateNewRequests(boolean initial,
RouteContext context,
RouteHelper routeHelper)
throws WorkflowException,
Exception
- Template method that subclasses should override to generates new requests
- Parameters:
initial
- whether this is the very first request generation, that is, the first generation in the first invocation of the node
- Returns:
- whether new requests were generated
- Throws:
Exception
WorkflowException
activateRequests
protected boolean activateRequests(RouteContext routeContext)
throws WorkflowException
- Activates any pending requests and returns whether there are outstanding blocking requests
- Parameters:
context
- the RouteContext
- Returns:
- whether there are outstanding blocking requests
- Throws:
WorkflowException
- if anything goes wrong...
saveActionRequest
protected void saveActionRequest(RouteContext context,
ActionRequestValue actionRequest)
Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.