org.kuali.rice.krms.framework.engine
Class ProviderBasedEngine

java.lang.Object
  extended by org.kuali.rice.krms.framework.engine.ProviderBasedEngine
All Implemented Interfaces:
Engine

public class ProviderBasedEngine
extends Object
implements Engine

An implementation of Engine

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
ProviderBasedEngine()
           
 
Method Summary
protected  ExecutionEnvironment establishExecutionEnvironment(SelectionCriteria selectionCriteria, Map<Term,Object> facts, ExecutionOptions executionOptions)
          Return a BasicExecutionEnvironment using the given parameters
 EngineResults execute(SelectionCriteria selectionCriteria, Facts facts, ExecutionOptions executionOptions)
          Initiates execution of the rules engine.
 EngineResults execute(SelectionCriteria selectionCriteria, Map<String,Object> facts, ExecutionOptions executionOptions)
          Initiates execution of the rules engine.
protected  Context selectContext(SelectionCriteria selectionCriteria, Map<Term,Object> facts, ExecutionOptions executionOptions)
          Load a Context from the contextProvider using the given parameters
 void setContextProvider(ContextProvider contextProvider)
          Set the ContextProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderBasedEngine

public ProviderBasedEngine()
Method Detail

execute

public EngineResults execute(SelectionCriteria selectionCriteria,
                             Map<String,Object> facts,
                             ExecutionOptions executionOptions)
Description copied from interface: Engine
Initiates execution of the rules engine.

Specified by:
execute in interface Engine
Parameters:
selectionCriteria - informs the engine of the SelectionCriteria to use for selection of contexts and agendas
facts - the facts that the rule engine can use during execution. Since this signature does not pass in Terms, all terms are defined with only a name, and term parameters can not be specified.
executionOptions - defines various ExecutionOptions that instruct the rules engine on how to perform it's execution
Returns:
the results of engine execution

execute

public EngineResults execute(SelectionCriteria selectionCriteria,
                             Facts facts,
                             ExecutionOptions executionOptions)
Description copied from interface: Engine
Initiates execution of the rules engine.

Specified by:
execute in interface Engine
Parameters:
selectionCriteria - informs the engine of the SelectionCriteria to use for selection of contexts and agendas
facts - the facts that the rule engine can use during execution
executionOptions - defines various ExecutionOptions that instruct the rules engine on how to perform it's execution
Returns:
EngineResults the results of engine execution

establishExecutionEnvironment

protected ExecutionEnvironment establishExecutionEnvironment(SelectionCriteria selectionCriteria,
                                                             Map<Term,Object> facts,
                                                             ExecutionOptions executionOptions)
Return a BasicExecutionEnvironment using the given parameters

Parameters:
selectionCriteria - SelectionCriteria
facts -
executionOptions - ExecutionOptions
Returns:
ExecutionEnvironment created with the given parameters

selectContext

protected Context selectContext(SelectionCriteria selectionCriteria,
                                Map<Term,Object> facts,
                                ExecutionOptions executionOptions)
Load a Context from the contextProvider using the given parameters

Parameters:
selectionCriteria -
facts -
executionOptions -
Returns:
Context
Throws:
IllegalStateException - if the contextProvider is null;
See Also:
loadContext

setContextProvider

public void setContextProvider(ContextProvider contextProvider)
Set the ContextProvider

Parameters:
contextProvider - to loadContext from.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.