Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package org.kuali.rice.kew.routemodule.service.impl;

Kuali Rice Team (
     private static final Logger LOG = Logger.getLogger(RouteModuleServiceImpl.class);
     private BeanFactory beanFactory;
     private String rulesEngineRouteModuleId;
     private volatile RouteModule rulesEngineRouteModule;
         String routeMethodName = node.getRouteMethodName();
         .debug("Finding route module for routeMethodName="+routeMethodName+" at route level "+node.getRouteNodeName());
         RouteModule routeModule = null;
         // default to FlexRM module if the routeMethodName is null
         if (node.isRulesEngineNode()) {
             routeModule = getRulesEngineRouteModule();
         } else if (node.isPeopleFlowNode()) {
             routeModule = getPeopleFlowRouteModule();
         } else if (routeMethodName == null || node.isFlexRM()) {
             routeModule = getFlexRMRouteModule(routeMethodName);
         } else {
             routeModule = getRouteModule(routeMethodName);
         return routeModule;
     public RouteModule findRouteModule(ActionRequestValue actionRequestthrows ResourceUnavailableException {
     	if (!actionRequest.getResolveResponsibility()) {
     		return new RoleRouteModule();
         if (actionRequest.getNodeInstance() == null) {
             return null;
         return findRouteModule(actionRequest.getNodeInstance().getRouteNode());
     private RouteModule getRouteModule(String routeMethodNamethrows ResourceUnavailableException {
         if (routeMethodName == null) {
             return null;
         } else if ("".equals(routeMethodName.trim()) || ..equals(routeMethodName)) {
                 return null;
         Object routeModule = GlobalResourceLoader.getObject(new ObjectDefinition(routeMethodName));//SpringServiceLocator.getExtensionService().getRouteModule(routeMethodName);
         if (routeModule instanceof RouteModule) {
             return (RouteModule)routeModule;
         throw new WorkflowRuntimeException("Could not locate the Route Module with the given name: " + routeMethodName);
     private RouteModule getFlexRMRouteModule(String ruleTemplateName) {
         return new FlexRMAdapter();
     public void setPeopleFlowRouteModule(RouteModule peopleFlowRouteModule) {
         this. = peopleFlowRouteModule;
     public RouteModule getPeopleFlowRouteModule() {
         return ;
     public String getRulesEngineRouteModuleId() {
        return ;
    public void setRulesEngineRouteModuleId(String rulesEngineRouteModuleId) {
        this. = rulesEngineRouteModuleId;
    public void setBeanFactory(BeanFactory beanFactorythrows BeansException {
        this. = beanFactory;

Loaded lazily by id so as not to introduce a runtime dependency on KRMS when it is not in use.
    protected RouteModule getRulesEngineRouteModule() {
        if ( == null) {
            // this should initialize the route module in spring
        return ;
New to GrepCode? Check out our FAQ X