Paul,
In your example bellow, you guessed right, it is the same as having a
drools 2.x rule with two parameters being one from class Object1 and one
from class Object2.
The asserting order is not relevant. The rules engine will try to match
all facts against all ObjectTypeNodes and find out which one matches.
Regards,
Edson
----- Original Message -----
From: "Paul Smith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 04, 2006 10:19 PM
Subject: [drools-user] Question about how rules determine whether they fire
or not
I'm trying to understand the differences between how Drools 3.0 decides if a
rule is to fire or not and how Drools 2 did it. In drools 2 part of the
decision was down to the <parameter> node in the drl xml that listed the
objects applicable for that rule. In drools 3 there isn't one. From what I
can gather it seems to be a case of what ojbects are evaluated in the 'when'
(LHS). Is this the case? If so is the order that you assert the objects into
working memory important? ie) does it have to correspond to the order that
you evaluate them in the rule eg)
rule "Country code must be entered"
when
Object1(attr1 == "1")
Object2(attr1 == "1")
then
System.out.println("do something");
end
must be asserted into working memory in the order Objec1, Object2 or is it
unimportant?
----------------------------------------------------------------------------
----
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/4/2006