I am building my app's rules from decision tables using Drools 4.0.7.
At one point, I expect a particular rule to fire but it never does. The rule originally
was constrained to the presence of a POJO to store the results of the rule's
evaluation that is as yet not evaluated and a POJO that containing the data to be
evaluated. While trying to diagnose why it never fires, I have reduced the constraints to
the presence of the POJO results container. It still doesn't fire.
Excerpts from the initialization and evaluation decision tables (compiled to DRL):
# Construct DecisionPoint container to hold results of evaluation
#From row number: 53
rule "Init Plus 5V PS Overtemp"
salience 65484
no-loop true
ruleflow-group "Initialize Testpoint Groups"
when
then
subtestName = "Fault Sum";
ruleName = "Plus 5V PS Overtemp";
serviceProvider.create("DecisionPoint",ruleName);
dsl.addDebugString("row called " + "IN_52");
end
# Record that +5V PS Overtemp condition exists in DecisionPoint object
#From row number: 26
rule "Plus 5V PS Overtemp Set"
salience 65510
no-loop true
ruleflow-group "PS Overtemp"
when
outputDecision: DecisionPoint(name == "Plus 5V PS Overtemp")
then
subtestName = "Fault Sum";
ruleName = "Plus 5V PS Overtemp";
ID = "PASSED";
modifyRetract(outputDecision);
outputDecision.setEvaluation(ruleName, ID);
modifyInsert(outputDecision);
dsl.addDebugString("row called " + "DE_26");
end
Enabling listeners for working memory updates and ruleflow transitions, I see that the
container is built and added to memory but is not found when the PS Overtemp ruleflow
group is activated.
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper
contineStatefulRunWithMoreInputs
INFO: in continue stateful run (obj). class
com.lmco.orts.equipmentFDFI.controller.rules.data.DecisionPoint Plus 5V PS Overtemp
EV_NOT_EVAL
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.data.DecisionPoint
getPassed
INFO: [Plus 5V PS Overtemp] passed == false
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$2
objectInserted
INFO: ~~~~~~~~~~~~~workingmemory Inserted: DecisionPoint: [Plus 5V PS Overtemp]
EV_NOT_EVAL
row called IN_52
...
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupActivated
INFO: RFG Activated: PS Overtemp
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupDeactivated
INFO: RFG Deactivated: OT Fault Sum
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupActivated
INFO: RFG Activated: Report Fault Sum Faults
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupDeactivated
INFO: RFG Deactivated: PS Overtemp
It is probably something obvious, but I am so close to it that I can't see the forest
for the trees.
J. Matthew Wicks
(856) 359-1115
Show replies by date
I found the problem. There was a duplicate rule name in another decision table.
When multiple decision tables or drl files are used, unique rule names must be specified
because default rule names are likely generate duplicate names. Whenever a duplicate rule
name occurs, the latter replaces the former.
________________________________
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Wicks, J Matthew
Sent: Monday, September 28, 2009 4:17 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Expected rule not firing.
I am building my app's rules from decision tables using Drools 4.0.7.
At one point, I expect a particular rule to fire but it never does. The rule originally
was constrained to the presence of a POJO to store the results of the rule's
evaluation that is as yet not evaluated and a POJO that containing the data to be
evaluated. While trying to diagnose why it never fires, I have reduced the constraints to
the presence of the POJO results container. It still doesn't fire.
Excerpts from the initialization and evaluation decision tables (compiled to DRL):
# Construct DecisionPoint container to hold results of evaluation
#From row number: 53
rule "Init Plus 5V PS Overtemp"
salience 65484
no-loop true
ruleflow-group "Initialize Testpoint Groups"
when
then
subtestName = "Fault Sum";
ruleName = "Plus 5V PS Overtemp";
serviceProvider.create("DecisionPoint",ruleName);
dsl.addDebugString("row called " + "IN_52");
end
# Record that +5V PS Overtemp condition exists in DecisionPoint object
#From row number: 26
rule "Plus 5V PS Overtemp Set"
salience 65510
no-loop true
ruleflow-group "PS Overtemp"
when
outputDecision: DecisionPoint(name == "Plus 5V PS Overtemp")
then
subtestName = "Fault Sum";
ruleName = "Plus 5V PS Overtemp";
ID = "PASSED";
modifyRetract(outputDecision);
outputDecision.setEvaluation(ruleName, ID);
modifyInsert(outputDecision);
dsl.addDebugString("row called " + "DE_26");
end
Enabling listeners for working memory updates and ruleflow transitions, I see that the
container is built and added to memory but is not found when the PS Overtemp ruleflow
group is activated.
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper
contineStatefulRunWithMoreInputs
INFO: in continue stateful run (obj). class
com.lmco.orts.equipmentFDFI.controller.rules.data.DecisionPoint Plus 5V PS Overtemp
EV_NOT_EVAL
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.data.DecisionPoint
getPassed
INFO: [Plus 5V PS Overtemp] passed == false
Sep 28, 2009 1:52:49 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$2
objectInserted
INFO: ~~~~~~~~~~~~~workingmemory Inserted: DecisionPoint: [Plus 5V PS Overtemp]
EV_NOT_EVAL
row called IN_52
...
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupActivated
INFO: RFG Activated: PS Overtemp
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupDeactivated
INFO: RFG Deactivated: OT Fault Sum
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupActivated
INFO: RFG Activated: Report Fault Sum Faults
Sep 28, 2009 1:52:57 PM com.lmco.orts.equipmentFDFI.controller.rules.engine.RulesHelper$1
ruleFlowGroupDeactivated
INFO: RFG Deactivated: PS Overtemp
It is probably something obvious, but I am so close to it that I can't see the forest
for the trees.
J. Matthew Wicks
(856) 359-1115