Hi,
My rules update the nested object attributes :eligibilityScore which is used in another rule downstream.
Only the Client object is sent as fact, the nested object is derived using the from keyword (list of services)
rule "Rule 8 EligibilityRating"
agenda-group "EligibilityRating"
no-loop true
salience 5
//dialect "mvel"
when
$client : Client(type == "Preferred")
$policy : Service(productType == "Vehicle Insurance") from $client.service
then
System.out.println(" Rule 8 ER = type == preferred:"+ $policy.getId() + ": -50");
int eScore = $policy.getEligibilityScore() - 50;
$policy.setEligibilityScore(eScore); // how to let the downstream rule know that this atribute value is updated without letting this current rule go into infinite loop
end
Any suggestion is greatly appreciated