It seems to me that you should write this as a plain old if/then/else/if... in Java (or any other language). Or is there something else in the way Drools evaluates rules over facts in working memory that makes it highly desirable to use rules?<br>
<br>This has been asked before, and more often than not there was a way to avoid a way of establishing the sequence of RHS execution by salience or whatever. <br><br>So, if you do need rules, you can assign decreasing salience values to all your rules. To terminate, either call the engine&#39;s halt() method, or retract the fact(s) triggering the rules. But note that all conditions will be evaluated before the first RHS is executed. To aoid this: see the 1st sentence.<br>
<br>-W<br><br><br><div class="gmail_quote">On 26 September 2011 06:54, Saurabh Pandey <span dir="ltr">&lt;<a href="mailto:meet.saurabhpandey@gmail.com">meet.saurabhpandey@gmail.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;">
In drools rules, all the LHS ie when conditions are executed at the start,<br>
then all there subsequent rhs ie then part executes, In my project i want to<br>
run it as a  simple if-else i.e<br>
When ... Then do.....<br>
When ... Then do......<br>
if this &quot;when&quot; is false then only go to the next when, and if its true then<br>
execute its &quot;then&quot; and then move ahead to the other &quot;when&quot;.<br>
i tried agenda-group, activation-group but these are not working for me.<br>
Can some one plz help me!<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Drools-all-lhs-execute-before-all-the-rhs-i-want-to-run-sequentially-tp3368215p3368215.html" target="_blank">http://drools.46999.n3.nabble.com/Drools-all-lhs-execute-before-all-the-rhs-i-want-to-run-sequentially-tp3368215p3368215.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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>