|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.rules.AbleInferenceEngine
com.ibm.able.rules.AblePolicyEngine
This class provides the inferencing algorithm for processing a set of rules in a ruleblock using policy evaluation.
The AblePolicyEngine processes AbleAssertionRules and AblePolicyRules and ignores all others.
The major processing method is infer() which is called by the AbleRuleSet bean as part of the normal bean process() method.
Instances of this class are not directly constructed by the user but are dynamically created by the AbleRuleBlock init() method.
AbleRuleSet,
AbleRuleBlock,
AbleAssertionRule,
AblePolicyRule,
Serialized Form| Nested Class Summary | |
|---|---|
class |
AblePolicyEngine.EligibleRuleListEntry_
This class is used to cache a rule with its current business value (priority) and an instance of this class becomes an element in a list of rules that are eligible to fire. |
| Field Summary |
|---|
| Fields inherited from class com.ibm.able.rules.AbleInferenceEngine |
|---|
myDebugLevel, myRuleBlock, myRuleSet, myRulesFiredCount, myTracer, myWorkingMemory |
| Constructor Summary | |
|---|---|
AblePolicyEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer)
Create a new policy inference engine. |
|
AblePolicyEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer,
AbleRuleBlock theRuleBlock)
Create a new policy inference engine. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getControlParameter(java.lang.String theControlParameter)
Gets the value of the specified control parameter. |
void |
infer(AbleRuleBlock theRuleBlock)
Fires one rule in the specified ruleblock using policy rule inferencing. |
boolean |
isRuleBlockValid(AbleRuleBlock theRuleBlock)
Determines whether the specified ruleblock is "executable" by examining the rule types and rule object configurations. |
protected void |
logEligibleRuleList(java.util.Vector theEligibleRuleList)
Writes the contents of the eligible rule list (triggered rules) to the Inference trace log. |
void |
setControlParameter(java.lang.String theControlParameter,
java.lang.Object theValue)
Sets the value of the specified control parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AblePolicyEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer)
theRuleSet - A ruleset whose rules are to be used for inferencing
by this inference engine.
theTracer - A tracer object to which this inference engine can log
information. This may be null, in which case no
information is logged.
public AblePolicyEngine(AbleRuleSet theRuleSet,
AbleLogger theTracer,
AbleRuleBlock theRuleBlock)
theRuleSet - A ruleset whose context is used for inferencing
by this inference engine.
theTracer - A tracer object to which this inference engine can log
information. This may be null, in which case no
information is logged.
theRuleBlock - A ruleblock whose rules are to be used for inferencing
by this inference engine.
| Method Detail |
public void setControlParameter(java.lang.String theControlParameter,
java.lang.Object theValue)
throws AbleDataException
setControlParameter in class AbleInferenceEnginetheControlParameter - The name of the control parameter to set. This engine
accepts no control parameters.
theValue - The value to be assigned to the specified control
parameter.
AbleDataException - If the specified control parameter is not supported by
this engine.
public java.lang.Object getControlParameter(java.lang.String theControlParameter)
throws AbleDataException
getControlParameter in class AbleInferenceEnginetheControlParameter - The name of the control parameter to get. This engine
accepts no names.
AbleDataException - If the specified control parameter is not supported by
this engine.public boolean isRuleBlockValid(AbleRuleBlock theRuleBlock)
This engine can process only "policy" rules; therefore, the specified ruleblock is invalid if any of the following are present:
isRuleBlockValid in class AbleInferenceEnginetheRuleBlock - The rule block to be validated for use with this
engine.
public void infer(AbleRuleBlock theRuleBlock)
throws AbleDataException
The infer() method is called by the AbleRuleSet process() method as part of the overall ruleset bean processing sequence.
The order of processing is as follows:
infer in class AbleInferenceEnginetheRuleBlock - The ruleblock to be processed.
AbleDataException - When any error occurs.protected void logEligibleRuleList(java.util.Vector theEligibleRuleList)
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||