<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hans,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ringsah@comcast.net
href="mailto:ringsah@comcast.net">ringsah@comcast.net</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, November 19, 2008 3:59
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] Ruleflow "OR"
Split Nodes</DIV>
<DIV><BR></DIV>
<P><FONT face=Verdana size=2>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).<BR><BR><FONT size=2></P></FONT>
<P>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.<BR><BR>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.<BR><BR>I have attached a zip file containing an
extremely simple eclipse test project that illustrates the
problem.<BR><BR>Thanks in Advance,<BR>-Hans<BR></P></FONT>
<DIV> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>rules-users mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>