yes, you need to assert both objects, to get optimal results (in terms of
declarative rules, and performance).

HOWEVER, as you have asserted ObjectB, ObjectA is available to the rule
engine as a member of ObjectB (just not as a fact) - you can use eval() to
place additional constraints on the nested object.

BUT, it is better to assert them both - either from code outside - or by a
"bootstrap" rule which "explodes" the ObjectA out of ObjectB as a seperate
fact (this is a rule with no "when" part, and a higher salience so that it
always fires first).

Hope that answers it (and your question was pretty much my first question
when I started with JRules some time ago)

On 11/28/06, John <[EMAIL PROTECTED]> wrote:


I am a beginner of Drools Rule engine

Let us Say, I have two Objects say ObjectA and ObjectB.

ObjectA has fields like marks, average, total and
ObjectB has fields like studentname , address and also ObjectA as one of
ite
members in it.


Is it not enough , if I assert the ObjectB to the working memory to
execute the
rules on ObjectA.

Do i need to assert both objectA and ObjectB to the working memory to
execute
tules on
fields like studname and address (members of ObjectB)

Is there any drl file sample to visulaise the above said.

Please help.





---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to