bob mcwhirter
Mon, 14 Jan 2002 04:24:25 -0800
Right.
drools currently does create 2 different nodes in the rete network;
one for each condition.
Some extra intelligence could be added to consolidate those conditions
which are simply different flavors of the same fact (ie, negated and
not negated).
-bob
On Mon, 14 Jan 2002, Stuart Schmukler wrote:
> Dobromir,
>
> I think that the best way to construct rule2 would
> be:
>
> <rule name="rule2">
> <param type="String">s</param>
> <when>
> <cond>( ! s.equalsIgnoreCase("dobromir") )</cond>
> </when>
> <then>
> pr.println("Don't know what to say!");
> retractObject( s );
> </then>
> </rule>
>
> The idea is to contruct conditions that the engine can
> see are the same or nearly the same to create a RETE network
> that evaluates terms of conditions the minimum number of times.
>
> I am not sure the the DROOL engine is up to the task.
>
>
> Stuart
>
>
>
>
> ---- On Mon, 14 Jan 2002, Dobromir Karamelsky ([EMAIL PROTECTED]) wrote:
>
> > Is there any way to have a set of rules like this one:
> >
> > <rule name="rule1">
> > <param type="String">s</param>
> > <when>
> > <cond>s.equalsIgnoreCase("dobromir")</cond>
> > </when>
> > <then>
> > pr.println("Hi dobromir");
> > retractObject( s );
> > </then>
> > </rule>
> >
> > <rule name="rule2">
> > <param type="String">s</param>
> > <when>
> > <cond> s_not_match_rule1 </cond>
> > </when>
> > <then>
> > pr.println("Don't know what to say!");
> > retractObject( s );
> > </then>
> > </rule>
> >
> > I mean how I can use rule names in <when></when> part of rule
> > definition? Is it possible or I didn't understand the whole rule/facts
> > concept?
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE video emails in Yahoo! Mail!
> > http://promo.yahoo.com/videomail/
> >
> > _______________________________________________
> > drools-interest mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/drools-interest
> >
> >
>
>
> _______________________________________________
> drools-interest mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/drools-interest
>
_______________________________________________
drools-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/drools-interest