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

Reply via email to