To make it easier to follow, I have included the rules as well as some images in the
message body. Here are the rules:
rule "Fact A Branch"
ruleflow-group "Fact A Branch"
when
FactA()
then
System.out.println("Fact A Branch");
end
rule "Fact B Branch"
ruleflow-group "Fact B Branch"
when
FactB()
then
System.out.println("Fact B Branch");
end
Here is a picture of the ruleflow:
Here is a picture of the rules trace when only FactA is inserted, and the join node is
type "AND" - notice the ruleflow is never completed (also, when the ruleflow is
run, the Action node is never executed):
Here is a picture of the rules trace when both FactA and FactB are inserted, and the join
node is type "XOR" - notice the Fact A Branch rule activation is never
executed:
TIA,
-Hans
-------------- Original message --------------
From: ringsah(a)comcast.net
I am having a problem with the ruleflow in Drools 4.0.7. I have the following simple
ruleflow with a split node with a type of "OR" with two outgoing connections,
each going to a different ruleflow group (image of ruleflow attached).
The problem I am having is with the join node, into which the two ruleflow groups connect
back in. If I use a join node type of "AND", then it works okay unless only one
branch is executed. Then the action, which simply prints "Action node" to the
console, never gets executed.
If I use a join node type of "XOR", then it works okay unless both branches are
executed. Then it appears that both branches are executed, because the action get executed
twice. However, the rules from the ruleflow group in only one of the branches end up
getting fired.
I have attached a zip file containing an extremely simple eclipse test project that
illustrates the problem.
Thanks in Advance,
-Hans
Show replies by date