here is the documentation<br><br><a href="http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html_single/index.html#d0e2978">http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html_single/index.html#d0e2978</a><br><br>
<div class="gmail_quote">On Fri, Jan 23, 2009 at 12:50 PM, Dan Seaver <span dir="ltr">&lt;<a href="mailto:dan.seaver@ge.com">dan.seaver@ge.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Sounds like a very good idea. If you go forward with this, I&#39;d love to see<br>
your method for solving the following type of problem:<br>
<br>
I need to update a particular object without causing the rule to re-fire.<br>
<br>
Say I have two classes, Stack and Board. I need to choose the Stack to put<br>
each Board, so one of these sorting rulles would look like this:<br>
<br>
when<br>
 &nbsp; board : Board (thickness == 1)<br>
 &nbsp; stack : Stack (location == &quot;A&quot;)<br>
then<br>
 &nbsp; board.setStack(stack);<br>
 &nbsp; update(board);<br>
end<br>
<br>
The problem is the update statement puts the rule back in the Agenda to be<br>
fired again, thus an infinite loop. My solution in general has been to use a<br>
Collection to track boards that have been processed, but it seems to be alot<br>
of overhead. I&#39;m not pleased by my solution.<br>
<br>
when<br>
 &nbsp; board : Board (thickness == 1)<br>
 &nbsp; stack : Stack (location == &quot;A&quot;)<br>
 &nbsp; processed : NamedCollection(name == &quot;BoardsSorted&quot;, collection not<br>
contains board)<br>
then<br>
 &nbsp; board.setStack(stack);<br>
 &nbsp; update(board);<br>
 &nbsp; processed.add(board);<br>
 &nbsp; update(processed);<br>
end<br>
<br>
Also, the NamedCollection needs to be created, which I&#39;m doing within the<br>
ruleset, which adds a somewhat meaningless to Business Analysts rule. Though<br>
I could create the NamedCollection in Java and add it to WorkingMemory prior<br>
to firing the rules, I&#39;d like the rulesets to take care of themselves.<br>
<br>
My actual problem set is laced with many solutions that need to update<br>
objects. Even if the object is not directly related to the rule criteria, a<br>
map to the object needs to be created in the RHS so the LHS has a reference<br>
to the object being updated, thus posing the same problem as above.<br>
<br>
Your insights would be greatly appreciated.<br>
<br>
<br>
Mark Proctor wrote:<br>
&gt;<br>
&gt; I&#39;m going to try an informal experiment for the 4th of February at 5PM<br>
&gt; GMT (Date/Time subject to change), we will run an online Drools Clinic<br>
&gt; in the form of a Webinar. So the idea here isn&#39;t of a 60 minute<br>
&gt; presentation, but really more of a 60 minute interactive Q&amp;A where we<br>
&gt; will use the desktop to assist in some explanations talking through code<br>
&gt; or examples. What do people think?<br>
&gt;<br>
&gt; Ideally we would have a set of pre-determined questions, with some adhoc<br>
&gt; ones on the day too. Feel free to start listing your Qs here. I want to<br>
&gt; avoid &quot;What&#39;s &nbsp;WorkingMemory&quot; type questions, but other than that,<br>
&gt; anything is game. Also if anyone has anything cool they would like to<br>
&gt; discuss about how they have used Drools, or just general interesting AI<br>
&gt; ideas, then that&#39;s fine too - happy for this just to turn into a fun<br>
&gt; geek chat too.<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/Drools-Community-Clinic-Feb-4th-5PM-GMT-tp21623144p21629458.html" target="_blank">http://www.nabble.com/Drools-Community-Clinic-Feb-4th-5PM-GMT-tp21623144p21629458.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>