Coverage Report - org.kuali.rice.kew.framework.support.krms.RulesEngineExecutor
 
Classes in this File Line Coverage Branch Coverage Complexity
RulesEngineExecutor
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.framework.support.krms;
 17  
 
 18  
 import org.kuali.rice.kew.engine.RouteContext;
 19  
 import org.kuali.rice.krms.api.engine.Engine;
 20  
 import org.kuali.rice.krms.api.engine.EngineResults;
 21  
 
 22  
 /**
 23  
  * Serves as an interface to execution of a rules engine during execution of the workflow engine.  Applications that
 24  
  * wish to integrate with KRMS from the workflow engine should implement an executor and make it available to the
 25  
  * workflow engine in one of two ways:
 26  
  *
 27  
  * <ol>
 28  
  *     <li>Register an extension with KEW (by ingesting a file containing a &lt;ruleAttribute&gt; mapping a name to the
 29  
  *     implementation class for the RulesEngineExecutor.  This name can then be referenced within the route node definition.</li>
 30  
  *     <li>Simply reference the fully-qualified class name of the RulesEngineExecutor implementation class inside of
 31  
  *     the route node definition</li>
 32  
  * </ol>
 33  
  *
 34  
  * <p>In the first case, the route node definition would look similar to the following:</p>
 35  
  *
 36  
  * <pre>
 37  
  * {@code
 38  
  * <requests name="MyRulesBasedNode">
 39  
  *   <rulesEngine executor="MyRulesEngineExecutor"/>
 40  
  * </requests>
 41  
  * }
 42  
  * </pre>
 43  
  *
 44  
  * <p>The above assumes that an extension/rule attribute has been defined with the name of "MyRulesEngineExecutor".</p>
 45  
  *
 46  
  * <p>Alternatively, the fully-qualified class name can be specified directly as follows:</p>
 47  
  *
 48  
  * <pre>
 49  
  * {@code
 50  
  * <requests name="MyRulesBasedNode">
 51  
  *   <rulesEngine executorClass="MyRulesEngineExecutor"/>
 52  
  * </requests>
 53  
  * }
 54  
  * </pre>
 55  
  *
 56  
  * <p>TODO - this interface should really be part of the framework module, but depends on RouteContext which is currently
 57  
  * part of the impl module.</p>
 58  
  *
 59  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 60  
  */
 61  
 public interface RulesEngineExecutor {
 62  
 
 63  
     EngineResults execute(RouteContext routeContext, Engine engine);
 64  
 
 65  
 }