[rules-users] drools global variable problem
Saurabh
maheshwari.saurabh03 at gmail.com
Fri Feb 11 11:20:22 EST 2011
hi
I have got the answer of above question in drools documentation .
drools global variables are immutable .
now i have inserted this object into memory as control .
rule myrule 1
when
$ct: control ( $t : timeTo)
$m : Medicine(expiryDate < ($t - 60000))
then
retract($m)
end
but it takes more time then this rule myrule2 .functionality wise working
fine .
rule myrule 2
when
$m : Medicine (expiryDate <( System.currentTimemillis() -600000))
then
retract($m);
end
but i can not take time as System.currentTimemillis()
in myrule1 medicine fact type does the cartisian product with control . but
control is single and each time i update it .
So what am i doing wrong ? or somewhere i am conceptually wrong
Plz help me if u have any idea about this .
Regards
Saurabh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-global-variable-problem-tp2471922p2474661.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list