Class RulesEngineRouteModule
java.lang.Object
org.kuali.rice.kew.impl.support.krms.RulesEngineRouteModule
- All Implemented Interfaces:
RouteModule
An implementation of a
RouteModule which executes the KRMS rules engine using the configured
RulesEngineExecutor. It then interprets those results and processes them, which may include instantiating
and delegating to another RouteModule. Currently, this implementation only supports PeopleFlow results returned from
KRMS and passes those off to the PeopleFlowRouteModule.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.kuali.rice.krms.api.engine.EngineResultsexecuteRulesEngine(RouteContext context, org.kuali.rice.krms.api.engine.Engine rulesEngine) findActionRequests(RouteContext context) Generate action requests for the given RouteContext.org.kuali.rice.kew.api.extension.ExtensionRepositoryServiceprotected org.kuali.rice.krms.api.engine.EnginebooleanisMoreRequestsAvailable(RouteContext context) Returns true if this RouteModule has more requests available which it can generate.protected RulesEngineExecutorloadRulesEngineExecutor(RouteContext context) protected voidprocessEngineResults(RouteContext context, org.kuali.rice.krms.api.engine.EngineResults engineResults) resolveResponsibilityId(String responsibilityId) The route module will re-resolve the given responsibilityId and return an object that contains the key to either a user, group, or role.voidsetExtensionRepositoryService(org.kuali.rice.kew.api.extension.ExtensionRepositoryService extensionRepositoryService) voidsetPeopleFlowRouteModule(PeopleFlowRouteModule peopleFlowRouteModule) voidsetRouteNodeService(RouteNodeService routeNodeService)
-
Constructor Details
-
RulesEngineRouteModule
public RulesEngineRouteModule()
-
-
Method Details
-
findActionRequests
Description copied from interface:RouteModuleGenerate action requests for the given RouteContext.The list of requests returned should only contain root action requests (those with no parent).
- Specified by:
findActionRequestsin interfaceRouteModule- Returns:
- A List of the generated ActionRequestValue objects.
- Throws:
Exception
-
resolveResponsibilityId
public ResponsibleParty resolveResponsibilityId(String responsibilityId) throws org.kuali.rice.kew.api.exception.WorkflowException Description copied from interface:RouteModuleThe route module will re-resolve the given responsibilityId and return an object that contains the key to either a user, group, or role. The original responsibility associated with the given id will then be swapped with the new ResponsibleParty when routing is resolved.This method is intended to allow for the calling code to be able to "switch-out" one responsibility for another (in the case of a change to an assigned reponsibility).
Returning null from this method will indicate that the original responsibile party should remain unchanged. This is typically the recommended default for implementation of this method and covers most use cases.
- Specified by:
resolveResponsibilityIdin interfaceRouteModule- Parameters:
responsibilityId- the id of the responsibility to be resolved- Returns:
- the responsibility party with which to replace the original responsibility, or null if the responsibility should remain unchanged.
- Throws:
org.kuali.rice.kew.api.exception.WorkflowException
-
isMoreRequestsAvailable
Description copied from interface:RouteModuleReturns true if this RouteModule has more requests available which it can generate. This method will only be called after the first set of action requests returned by the first invocation of findActionRequests have been fully activated. If this method returns true, findActionRequests will be invoked again and those requests will all be activated before the cycle continues until this method returns false;- Specified by:
isMoreRequestsAvailablein interfaceRouteModule- Parameters:
context- the route context- Returns:
- true if this route module has more requests it can generate, false otherwise
-
executeRulesEngine
protected org.kuali.rice.krms.api.engine.EngineResults executeRulesEngine(RouteContext context, org.kuali.rice.krms.api.engine.Engine rulesEngine) -
processEngineResults
protected void processEngineResults(RouteContext context, org.kuali.rice.krms.api.engine.EngineResults engineResults) -
loadRulesEngineExecutor
-
getRulesEngine
protected org.kuali.rice.krms.api.engine.Engine getRulesEngine() -
getPeopleFlowRouteModule
-
setPeopleFlowRouteModule
-
getExtensionRepositoryService
public org.kuali.rice.kew.api.extension.ExtensionRepositoryService getExtensionRepositoryService() -
setExtensionRepositoryService
public void setExtensionRepositoryService(org.kuali.rice.kew.api.extension.ExtensionRepositoryService extensionRepositoryService) -
getRouteNodeService
-
setRouteNodeService
-