I am surprised, all the more so because (cf. Expert):<br><br>  &quot;Each rule has a salience attribute that can be assigned an integer <i><b>number</b></i>,&quot;<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&#39;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&#39;t even try.<br><br>However: good to know, and thanks!<br>
<br>-W<br><br><br>On 26 August 2010 15:21, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt; wrote:<br>&gt;     Wolfgang,<br>&gt;     Not sure I understand what you mean, but Drools supports dynamic<br>
&gt; salience:<br>&gt; rule &quot;fire in rank order 1,2,...&quot;<br>&gt;       salience( -$rank )<br>&gt; when<br>&gt;       Element( $rank : rank,... )<br>&gt;       ...<br>&gt; then<br>&gt;      ...<br>&gt; end<br>&gt;     Edson<br>
&gt;<br>&gt; 2010/8/26 Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</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;   class Element {<br>&gt;&gt;       int rank; // rank &gt; 0<br>&gt;&gt;   }<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 &quot;fire in rank order 1,2,...&quot;<br>&gt;&gt; when<br>&gt;&gt;       Element( $rank : rank,... )<br>&gt;&gt;       // ...<br>&gt;&gt; salience -$rank    ### &lt;=<br>
&gt;&gt; then<br>&gt;&gt;      // ...<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&#39;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">rules-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt;   Edson Tirelli<br>&gt;   JBoss Drools Core Development<br>
&gt;   JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-dev mailing list<br>&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>&gt;<br>&gt;<br><br>