<!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.16544" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Massi,</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Why do you want to use a ruleflow?
</FONT><FONT face=Arial size=2>If you simply remove the ruleflow-group
statements from your rule definitions, you will get your expected behaviour, as
rule_ab will execute first, updating your user fact, which will then trigger
rule_ba to execute, updating the user fact again, which will trigger rule_ba
again, etc.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm not sure where you see any parallelism here, as
it is always the first rule, then the second, then the first one again,
etc.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>But if you really want to know, you can create a
loop in a ruleflow by putting whatever you would like to see repeated in between
an XOR-join in front and an XOR-split at the end, and linking one of the
outgoing connections of the XOR-split back to the first join
:)</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=mmquelo@gmail.com href="mailto:mmquelo@gmail.com">mmquelo massi</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 List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 22, 2007 5:15
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] How to make a
"Loop-Ruleflow"????</DIV>
<DIV><BR></DIV>
<DIV></DIV>
<DIV>Hi everybody. </DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>I am trying to make a ruleflow that, once processed, causes the rule
engine to infinitely loop. </DIV>
<DIV>I have got a <EM>User</EM> Object in my object model. It has got a
<EM>getLogin()</EM> and <EM>setLogin(</EM>) methods. </DIV>
<DIV> </DIV>
<DIV>The login field stands for the "User name", so it is a String. </DIV>
<DIV> </DIV>
<DIV>First I insert an Object in the WM, with login==A.</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>Then I generate the following rule-flow-groups: </DIV>
<DIV> </DIV>
<DIV><EM>rule "rule_ab" </EM></DIV>
<DIV><EM> ruleflow-group "ab" </EM></DIV>
<DIV><EM> when </EM></DIV>
<DIV><EM> u:User( login == "A" )
</EM></DIV>
<DIV><EM> then </EM></DIV>
<DIV><EM> u.setLogin("B"); </EM></DIV>
<DIV><EM> System.out.println("a - > b");
</EM></DIV>
<DIV><EM> update(u); </EM></DIV>
<DIV><EM>end </EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>rule "rule_ba" </EM></DIV>
<DIV><EM> ruleflow-group "ba" </EM></DIV>
<DIV><EM> when </EM></DIV>
<DIV><EM> u:User( login == "B" )
</EM></DIV>
<DIV><EM> then </EM></DIV>
<DIV><EM> u.setLogin("A");
</EM></DIV>
<DIV><EM> System.out.println("b -
> a"); </EM></DIV>
<DIV><EM> update(u); </EM></DIV>
<DIV><EM>end </EM></DIV>
<DIV> </DIV>
<DIV>I'd like to define a ruleflow that gives me in output something like
this:</DIV>
<DIV> </DIV>
<DIV>
<DIV>a - > b</DIV>
<DIV>b - > a</DIV>
<DIV>a - > b</DIV>
<DIV>b - > a
<DIV>a - > b</DIV>
<DIV>b - > a</DIV>
<DIV>a - > b</DIV>
<DIV>b - > a
<DIV>a - > b</DIV>
<DIV>b - > a</DIV>
<DIV>a - > b</DIV>
<DIV>b - > a</DIV>
<DIV>.... looping...</DIV>
<DIV> </DIV>
<DIV>How can I do it?</DIV>
<DIV> </DIV>
<DIV>In other words I want those rules to be executed in parallel and I want
to define</DIV>
<DIV>this "parallelism" using the ruleflow graph, Is It Possible???</DIV>
<DIV> </DIV>
<DIV>Thank You Again!</DIV>
<DIV> </DIV>
<DIV>Massi.</DIV>
<DIV> </DIV>
<DIV>P.S.</DIV>
<DIV> </DIV>
<DIV>Ah.... I solved that matter with the
rule.package...</DIV></DIV></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>