<html><body bgcolor="#FFFFFF"><div>Would be really nice to see more contributions in the documentation side. That's true. And also it's a good way to learn!&nbsp;<br><br><div>- CTO @ <a href="http://www.plugtree.com"><a href="http://www.plugtree.com">http://www.plugtree.com</a></a></div><div>- MyJourney @ <a href="http://salaboy.wordpress.com"><a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a></a></div><div>- Co-Founder @ <a href="http://www.jbug.com.ar"><a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a></a></div>- Mauricio "Salaboy" Salatino -</div><div><br>On 26/08/2010, at 13:51, Raphael Duarte Paiva &lt;<a href="mailto:raphaeldpaiva@gmail.com">raphaeldpaiva@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>I totally agree with Wolfgang here.<br><br><div class="gmail_quote">On Thu, Aug 26, 2010 at 11:21, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com"><a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a></a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am surprised, all the more so because (cf. Expert):<br><br> &nbsp;"Each rule has a salience attribute that can be assigned an integer <i><b>number</b></i>,"<br>
<br>This does not event remotely indicate that you can use an <i><b>expression</b></i> involving bound variables.<br>
<br>If it isn't documented, nobody will use it. Being in front of the when part where the bindings occur, it is counter-intuitive to other bound variable references, and so I didn't even try.<br><br>However: good to know, and thanks!<br>
<font color="#888888">
<br>-W</font><div><div></div><div class="h5"><br><br><br>On 26 August 2010 15:21, Edson Tirelli &lt;<a href="mailto:tirelli@post.com" target="_blank"><a href="mailto:tirelli@post.com">tirelli@post.com</a></a>&gt; wrote:<br>&gt; &nbsp;&nbsp; &nbsp;Wolfgang,<br>&gt; &nbsp;&nbsp; &nbsp;Not sure I understand what you mean, but Drools supports dynamic<br>

&gt; salience:<br>&gt; rule "fire in rank order 1,2,..."<br>&gt; &nbsp;&nbsp; &nbsp; &nbsp;salience( -$rank )<br>&gt; when<br>&gt; &nbsp; &nbsp; &nbsp; Element( $rank : rank,... )<br>&gt; &nbsp;&nbsp; &nbsp; &nbsp;...<br>&gt; then<br>&gt; &nbsp;&nbsp; &nbsp; ...<br>&gt; end<br>&gt; &nbsp;&nbsp; &nbsp;Edson<br>

&gt;<br>&gt; 2010/8/26 Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank"><a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a></a>&gt;<br>&gt;&gt;<br>&gt;&gt; Just FYI, but who knows ;-)<br>&gt;&gt;<br>&gt;&gt; Our proprietary vintage RBS has a feature is (admittedly) rarely used<br>

&gt;&gt; but could come in handy, every now and then.<br>&gt;&gt;<br>&gt;&gt; Given this class<br>&gt;&gt;<br>&gt;&gt; &nbsp; class Element {<br>&gt;&gt; &nbsp; &nbsp; &nbsp; int rank; // rank &gt; 0<br>&gt;&gt; &nbsp; }<br>&gt;&gt;<br>&gt;&gt; and to fire a rule in ascending rank order, you can write (using<br>

&gt;&gt; modified Drools syntax)<br>&gt;&gt;<br>&gt;&gt; rule "fire in rank order 1,2,..."<br>&gt;&gt; when<br>&gt;&gt; &nbsp; &nbsp; &nbsp; Element( $rank : rank,... )<br>&gt;&gt; &nbsp; &nbsp; &nbsp; // ...<br>&gt;&gt; salience -$rank &nbsp; &nbsp;### &lt;=<br>

&gt;&gt; then<br>&gt;&gt; &nbsp; &nbsp; &nbsp;// ...<br>&gt;&gt; end<br>&gt;&gt;<br>&gt;&gt; The dynamically set salience does all the work. (Of course, you can<br>&gt;&gt; achieve the same order<br>&gt;&gt; in Drools easily enough.)<br>

&gt;&gt;<br>&gt;&gt; This is possible since salience is a value that must be carried over<br>&gt;&gt; into the activation.<br>&gt;&gt; There is at least one other rule attribute that shares this property,<br>&gt;&gt; but I'm not sure<br>

&gt;&gt; whether anything useful can be done with dynamic agenda groups.<br>&gt;&gt;<br>&gt;&gt; Cheers<br>&gt;&gt; -W<br>&gt;&gt; _______________________________________________<br>&gt;&gt; rules-dev mailing list<br>&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank"><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a></a><br>

&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a></a><br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; &nbsp; Edson Tirelli<br>&gt; &nbsp; JBoss Drools Core Development<br>

&gt; &nbsp; JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank"><a href="http://www.jboss.com">www.jboss.com</a></a><br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-dev mailing list<br>&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank"><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a></a><br>

&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a></a><br>&gt;<br>&gt;<br><br>
</div></div><br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org"><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a></a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank"><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a></a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Abraços<br>Raphael Duarte Paiva<br>Graduando em Ciência da Computação<br><br>"For millions of years, mankind lived just like the animals. Then something happened which unleashed the power of our imagination. We learned to talk [...]" - Stephen Hawking, 1993<br>

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-dev mailing list</span><br><span><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a></span><br></div></blockquote></body></html>