org.kuali.rice.krms.api.engine
Interface ExecutionEnvironment

All Known Implementing Classes:
BasicExecutionEnvironment

public interface ExecutionEnvironment

The ExecutionEnvironment manages contextual information which is made available to different components of the rules engine during execution. Facts can be retrieved from and published to the environment. It also provides a reference to the EngineResults or tracking engine activity and returning values back to the client of the rules engine.

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

Method Summary
 void addTermResolver(TermResolver<?> termResolver)
           
 EngineResults getEngineResults()
           
 ExecutionOptions getExecutionOptions()
           
 Map<Term,Object> getFacts()
          Returns an immutable Map of facts available within this environment.
 SelectionCriteria getSelectionCriteria()
          Returns the selection criteria that was used to initialize the environment.
 Set<Term> getTermsForCaller(Object caller)
           
 boolean publishFact(Term factName, Object factValue)
          Publishes a new fact
<T> T
resolveTerm(Term term, Object caller)
           
 

Method Detail

getSelectionCriteria

SelectionCriteria getSelectionCriteria()
Returns the selection criteria that was used to initialize the environment.

Returns:
the selection criteria for this environment

getFacts

Map<Term,Object> getFacts()
Returns an immutable Map of facts available within this environment.

Returns:
the facts in this environment

publishFact

boolean publishFact(Term factName,
                    Object factValue)
Publishes a new fact

Parameters:
factName - name of the fact to publish
factValue - value of the fact to publish // TODO: we don't support updating facts, refactor this method
Returns:
true if an existing fact was updated, false if this was a new fact

addTermResolver

void addTermResolver(TermResolver<?> termResolver)

resolveTerm

<T> T resolveTerm(Term term,
                  Object caller)
              throws TermResolutionException
Throws:
TermResolutionException

getTermsForCaller

Set<Term> getTermsForCaller(Object caller)

getExecutionOptions

ExecutionOptions getExecutionOptions()

getEngineResults

EngineResults getEngineResults()


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