Kris,
Thanks for your response and attention to the matter. I really like the Drools ruleflow
feature, and I think a resolution to this issue would make it more useful. Even if it is
the more simple matching OR-split - OR-join constructs, I think that would go a long way.
Thanks Again,
-Hans
-------------- Original message --------------
From: "Kris Verlaenen" <kris.verlaenen(a)cs.kuleuven.be>
Hans,
The behaviour you are witnessing is indeed expected behaviour. The problem is that we
currently do not have a matching OR-join construct, so it is indeed difficult to model
behaviour like you want to. The reason is that is it a very difficult problem to create a
generic OR join, i.e. a join that waits until all incoming connections either have been
completed or were not triggered. In the example you are using it would still be pretty
straighforward, however it becomes very difficult if you take random splitting and joining
after the or-join into account, incomplete or joins and even unstructured looping.
I will add a n-of-m join type, meaning the join will wait until n of its incoming
connections has been triggered. Since this n could be read from a variable, it allows you
to do any kind of complex joining, but the process designer should make sure to update the
n variable itself so it matches the correct number of incoming connections to wait for.
An alternative would be to provide matching OR-split - OR-join constructs, as those
aren't difficult to support either, but not quite as powerful (we do implement this in
our BPEL prototype but there it is much easier as BPEL is a structured process language).
You could also replace your OR construct by an XOR followed by AND splits, but that would
probably make the process a lot more difficult to read.
Kris
----- Original Message -----
From: ringsah(a)comcast.net
To: rules-users(a)lists.jboss.org
Sent: Wednesday, November 19, 2008 3:59 PM
Subject: [rules-users] Ruleflow "OR" Split Nodes
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users