RULES:
--------
rule "11"
no-loop true
ruleflow-group "second-rulesgroup"
when
myObj: Test()
eval(true)
then
System.out.println(myObj.getIntField());
end
rule "12"
no-loop true
ruleflow-group "second-rulesgroup"
when
myObj: Test(intField==12345)
then
System.out.println(myObj.getIntField());
myObj.setStringField("rule_12");
end
rule "13"
no-loop true
ruleflow-group "first-rulesgroup"
when
myObj: Test(intField==0)
then
myObj.setIntField(12345);
update(myObj);
System.out.println("Done with rule 13 "+myObj.getIntField());
end
RULE_FLOW:
---------
<?xml version="1.0" encoding="UTF-8"?>
<process
xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process
drools-processes-5.0.xsd"
type="RuleFlow" name="TestFlow" id="TestFlow"
package-name="abc.def.xyz"
<header
</header
<nodes
<start id="1"
name="Start" x="100" y="100" width="48"
height="48" /
<ruleSet id="3"
name="Second" x="402" y="102" width="118"
height="40"
ruleFlowGroup="second-rulesgroup" /
<end id="4" name="End" x="584" y="98"
width="80" height="40" /
<ruleSet id="5" name="First" x="227" y="174"
width="121" height="40"
ruleFlowGroup="first-rulesgroup" /
<actionNode id="6" name="Action" x="431"
y="217" width="80" height="40"
<action type="expression"
dialect="mvel"
>System.out.println("here");</action
</actionNode
</nodes
<connections
<connection
from="6" to="3" /
<connection from="3" to="4" /
<connection from="1" to="5" /
<connection from="5" to="6" /
</connections
</process
Test:
-----
public class Test {
private Integer intField;
private String stringField;
public Integer getIntField() {
return intField;
}
public void setIntField(Integer intField) {
this.intField = intField;
}
public String getStringField() {
return stringField;
}
public void setStringField(String stringField) {
this.stringField = stringField;
}
}
My input Fact:
--------------
Test myObj = new Test();
myObj.setIntField(0);
When I use the following things work fine. I can see all output messages in
order.
final StatefulKnowledgeSession ksession = kb.newStatefulKnowledgeSession();
//Where kb is the knowledgebase built using the above assets
Output Messages:
-----------------
Done with rule 13 12345
here
12345
12345
When I use the following it exits without any errors, but, output messages
are not as expected!
final StatefulKnowledgeSession ksession =
JPAKnowledgeService.newStatefulKnowledgeSession(kb, null, env);
Output Messages:
-------------------
Done with rule 13 12345
I am exhausted trying to figure out what is going wrong... Don't know where
to debug! Let me know if more information is needed. I am using Hibernate,
Spring, BTM transaction Manager.
I stumbled across "JBRULES-2718" and thought maybe this is something
similar? I am using 5.1.0
Thank you!
--
View this message in context:
http://drools.46999.n3.nabble.com/Ruleflow-exits-before-reaching-END-node...
Sent from the Drools: User forum mailing list archive at
Nabble.com.