Identify the requirements for changing your data. For instance, what *exactly*
is the state of an Account fact x when it should be subject to
x.setAccountStatus( "PENDING" );
Any value of accountStatus? All values *except* PENDING? null? ...?
Make sure to constrain Account() in this and any other rule by adding the
correct boolean expression between the parens.
modify( x ){ set...(...), set...(...) } is the preferred way of notifying the Drools
Engine that a fact has changed and all rules potentially referring to this
fact need to be reconsidered; the fact's history is irrelevant.
x.set...(...); x.set...(...); update( x ); is essentially the same.
Using salience is (usually) the wrong approach, as is no-loop, which
will avoid only on-the-spot reactivation - you can still loop over two or
more rules.
-W
Yes I tried account : Account(accountStatus == "NEW")
In above posts it's mentioned that I have to use modify or update, when use
that it fires rules recursively without stopping.
Will it possible to test my code, I can provide the Account class code as
well it's just two fields in it.
--
View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020581.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users