public interface SteppingRuleEngine extends EngineWithWorkingMemory, RunningEngineWithWorkingMemory, RuleEngine
SteppingRuleEngine is a rule engine that can execute rules one by one.
You create a SteppingRuleEngine instance using an
RuleEngineDefinition instance.
The first rule should be executed using executeFirstRule.
Then, the engine data or the working memory may be changed. The next rule can be executed
using stepOneRule
RuleEngine| Modifier and Type | Method and Description |
|---|---|
RuleEngineOutput |
executeFirstRule(RuleEngineInput input)
Executes the first eligible rule.
|
boolean |
isAgendaEmpty()
Indicate if the agenda is empty after the engine execution .
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the value of a specific parameter and update the engine data (see
RunningEngineWithWorkingMemory.updateData(). |
RuleEngineOutput |
stepOneRule()
Executes the next eligible rule.
|
getWorkingMemory, insert, retract, retractAll, update, updateData, updateGenerator, updateGenerators, updateGeneratorsElementnote, stopcreateRuleEngineInput, createRuleEngineInput, execute, getDefinitionexecutecreateInput, createInput, execute, execute, getState, note, resetaddObserver, addObserver, getAllObservers, getSupportedObserverClasses, removeAllObservers, removeObserver, removeObservergetNumberOfServices, getService, getServiceByName, getServiceClassesRuleEngineOutput executeFirstRule(RuleEngineInput input) throws EngineExecutionException, EngineInvalidStateException, java.lang.IllegalArgumentException
EngineExecutionException - raised when an exception occurs during a condition test
evaluation or a rule action execution.EngineInvalidStateException - raised when the the internal state of the engine is not
compatible with the call of this method.java.lang.IllegalArgumentException - raised when the input parameter is not valid.input - A rule engine input.RuleEngineOutput stepOneRule() throws EngineExecutionException, EngineInvalidStateException
executeFirstRule(RuleEngineInput).EngineExecutionException - raised when an exception occurs during a condition test
evaluation or a rule action execution.EngineInvalidStateException - raised when the the internal state of the engine is not
compatible with the call of this method. after
executeFirstRule(RuleEngineInput).boolean isAgendaEmpty()
void setParameter(java.lang.String name,
java.lang.Object value)
throws EngineExecutionException,
EngineInvalidStateException
RunningEngineWithWorkingMemory.updateData().java.lang.IllegalArgumentException - if there is no parameter with the given nameEngineExecutionExceptionEngineInvalidStateExceptionname - The key of the parameter to be updated.value - The new value of the field.© Copyright IBM Corp. 1987, 2017