What you need to understand is that rules evaluation and rules execution happen in different times. Whenever you insert/update(modify)/retract a fact, all the rules that could potentially match are evaluated by Drools. A rule having its conditions satisfied generates an ACTIVATION (but the THEN part is not yet executed). All the ACTIVATIONS are put together in something called the AGENDA.<div>

When you call fireAllRules() an algorithm (that takes into account the salience of the rules) gets ONE activation from the AGENDA and executes it (the THEN part gets executed). If the execution didn&#39;t insert/modify/retract any fact, then another ACTIVATION is selected and executed until the AGENDA is empty. If an ACTIVATION causes the insertion/modification/retraction of a fact, then the rules are evaluated again possibly generating new ACTIVATIONS or cancelling existing ones.</div>

<div><br></div><div>All this should be explained in drools documentation:</div><div>Drools Introduction: <a href="http://docs.jboss.org/drools/release/5.5.0.CR1/droolsjbpm-introduction-docs/html_single/index.html">http://docs.jboss.org/drools/release/5.5.0.CR1/droolsjbpm-introduction-docs/html_single/index.html</a> </div>

<div>Drools Expert: <a href="http://docs.jboss.org/drools/release/5.5.0.CR1/drools-expert-docs/html_single/index.html">http://docs.jboss.org/drools/release/5.5.0.CR1/drools-expert-docs/html_single/index.html</a></div><div>

<br></div><div>I&#39;m not in favor of answering Drools related questions arriving directly to my inbox. This is the last email I&#39;m going to reply to.</div><div><br></div><div>Best Regards,  <br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>

<br>Esteban Aliverti<br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Tue, Oct 30, 2012 at 5:26 PM,  <span dir="ltr">&lt;<a href="mailto:reachkn6@gmail.com" target="_blank">reachkn6@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<a href="http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-td4020550.html" target="_blank">http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-td4020550.html</a><br>


<br>
Esteban, you seem to understand how Drools Rules work, I&#39;m trying to understand how a field value changed in &#39;then&#39;/consequence be retained so next rule can see it.<br>
<br>
Posted above is a link for my question, can you help me fix it. Share any links that helps me understand how to do it right, I have written about 100 rules, to my surprise this basic fact that one field changed in rule 1 is not visible in rule2, I couldn&#39;t test earlier as my data wasn&#39;t good enough.<br>


<br>
Any help is greatly appreciated.<br>
</blockquote></div><br></div>