[rules-users] rule fires while condition is false

Jared Davis sunray at davisprogramming.com
Thu May 6 11:23:13 EDT 2010



Shai wrote:
> 
> --snip--
> I then do some more things and insert the value of NetRepayment value to 
> the EnrichedApplication, I re insert it to the workspace and then I run 
> the rules.
> It seems that drools did not re evaluate the EnrichedApplication again 
> and thus the value of NetRepayement as fas as it was concerned was 0.
> --snip--
> 

For the rules engine to re-evaluate objects, you need to tell it when they
change. Even though the NetRepayment fact was updated in the engine, there
is no link defined in the rules engine between it and the
EnrichedApplication.  I'm assuming the calculation method
getNetRepaymentAmountAbilityIncludingLiabilities() uses this value.

Perhaps it would be worth investigating moving the method implementation to
a rule. If not, ensure that all object/variables used in the method do not
change once the EnrichedApplication is inserted. 


-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/rule-fires-while-condition-is-false-tp780685p781431.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list