sorry for the late answer.

Nikhil has pointed this out. If you change sth in the KB, new rules may match. Therefore it is always a good practice to use update() like described in the docs. If you don't want the rules fire again, there is also the attribute "no-loop" you should use: http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html/ch06s05.html#d0e2978

Note that this is information from a beginner, I've never used no-loop.

regards
Andy

On Feb 14, 2008, at 8:48 AM, Noc2 wrote:




Nikhil_dev wrote:

hi!!, Andy,
i didn't get wat do u mean by Shadowing any ways i am 4 days old to
Drools....so not much idea about it.
if u knw how to update()... pls let me knw in the action part
regards,
nikhil




hi there.
I am pretty new to drools as well, but i think i can give u an answer to you
update question.

In your case, you have the following:   $a : ApplyRuleBean()
Suppose that ApplyRuleBean's attribute childFare has a value of 100. (i dont
know any specifics of your code, so this is just theoretical).

In the Right Hand Part of your rules, you change the value from 100 to, lets say 200. Then you can use the keyword update(), like this: update($a). When u call update, you are letting drools know that a 'fact' (in this case $a ) has been modified, and you want drools to re-process this fact. In other words, the fact will be 'evaluated' again by all rules which apply on it.

I hope this was a bit clear. If not, feel free to ask. I ll try harder then
:).

regards,
Noc2
--
View this message in context: 
http://www.nabble.com/Arithmetic-operator-in-Condition-part-%28Argent-help.....%29-tp15430904p15475603.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users


----------------------------------------------------------------------
Dipl.-Ing.(FH) Andreas Langegger
Institute for Applied Knowledge Processing
Johannes Kepler University Linz
A-4040 Linz, Altenberger Straße 69
http://www.langegger.at


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to