[rules-users] How to update the working memory of a nested object attribute

Wishing Carebear wishing.carebear at gmail.com
Tue Jul 5 23:46:54 EDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110705/a7207890/attachment.html 


More information about the rules-users mailing list