Identify the requirements for changing your data. For instance, what *exactly* <br>is the state of an Account fact x when it should be subject to<br>   x.setAccountStatus( &quot;PENDING&quot; );<br>Any value of accountStatus? All values *except* PENDING? null? ...?<br>
<br>Make sure to constrain Account() in this and any other rule by adding the<br>correct boolean expression between the parens.<br><br>modify( x ){ set...(...), set...(...) } is the preferred way of notifying the Drools<br>
Engine that a fact has changed and all rules potentially referring to this<br>fact need to be reconsidered; the fact&#39;s history is irrelevant. <br>x.set...(...); x.set...(...); update( x ); is essentially the same.<br>
<br>Using salience is (usually) the wrong approach, as is no-loop, which<br>will avoid only on-the-spot reactivation - you can still loop over two or<br>more rules.<br><br>-W<br><br><div class="gmail_quote">On 30 October 2012 17:39, kina06 <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">Yes I tried account : Account(accountStatus == &quot;NEW&quot;)<br>
<br>
In above posts it&#39;s mentioned that I have to use modify or update, when use<br>
that it fires rules recursively without stopping.<br>
<br>
Will it possible to test my code, I can provide the Account class code as<br>
well it&#39;s just two fields in it.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020581.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-tp4020550p4020581.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>
</blockquote></div><br>