View Javadoc

1   /**
2    * Copyright 2005-2013 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.krms.api.engine;
17  
18  import java.util.Map;
19  
20  /**
21   * An Engine executes using the given {@link SelectionCriteria}, @{link Facts}, and {@link ExecutionOptions} returning {@link EngineResults}
22   * 
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public interface Engine {
26  
27  	/**
28  	 * Initiates execution of the rules engine.
29  	 * 
30  	 * @param selectionCriteria informs the engine of the {@link SelectionCriteria} to use for selection of contexts and agendas
31  	 * @param facts the facts that the rule engine can use during execution
32  	 * @param executionOptions defines various {@link ExecutionOptions} that instruct the rules engine on how to perform it's execution
33  	 * 
34  	 * @return {@link EngineResults} the results of engine execution
35  	 */
36  	EngineResults execute(SelectionCriteria selectionCriteria, Facts facts, ExecutionOptions executionOptions);
37  
38      /**
39       * Initiates execution of the rules engine.
40       *
41       * @param selectionCriteria informs the engine of the {@link SelectionCriteria} to use for selection of contexts and agendas
42       * @param facts the facts that the rule engine can use during execution.  Since this signature does not pass in
43       * {@link Term}s, all terms are defined with only a name, and term parameters can not be specified.
44       * @param executionOptions defines various {@link ExecutionOptions} that instruct the rules engine on how to perform it's execution
45       *
46       * @return the results of engine execution
47       */
48      EngineResults execute(SelectionCriteria selectionCriteria, Map<String, Object> facts, ExecutionOptions executionOptions);
49  
50  }