[rules-users] Caching results in temperory variables

Manav manav7574 at yahoo.com
Thu Aug 12 11:31:12 EDT 2010


Hi, 

I am using the version 5.x of drools and i have a scenario where i want to hold 
the result of 

a test in one rule to a temperory variable . This result will then be used in 
another rule that will be fired 

later in the sequence . 

For ex :

salience 100
when
    User (language.keySet contains "Japanese", $j_score : language["Japanese"])
then
    // do something 
end

salience 50
when
    User (language.keySet contains "French", $f_score : language["French"])
then
    // do something 
end

salience 25
when 
    eval (($j_score + $f_score) > 4)
then
    // update the same to db
end

Is this possible in Drools 5.x ? 

Regards,
Manav


      




More information about the rules-users mailing list