[rules-users] Re: Better way to use And and Or

rules-users at lists.jboss.org rules-users at lists.jboss.org
Mon Jan 8 15:35:40 EST 2007


   Not yet.
   This feature is already implemented, but trunk is yet going under 
refactory. So you may start to test/use it, but be aware that there may 
be problems yet to solve.
 
   []s
   Edson

PS: Please use the "users" list for this kind of questions. I'm already 
replying to it.


rules-dev at lists.jboss.org wrote:

>which is the next version. Is it aalready out?
>
>
>drools - dev mailing list wrote:
>  
>
>>   Hi,
>>
>>   In Drools 3.0, having the RCVRCOUNTRY and SNDRCOUNTRY as attributes 
>>of the same bean, there is no better way of doing than:
>>
>>when
>>
>>m:   ( (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "US", AMOUNT
>>    
>>
>>"3000")) ||
>> (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "UK", AMOUNT >
>>"3000")) ||
>> (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "CAN", AMOUNT >
>>"3000")) ||
>> (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "US", AMOUNT >
>>"3000")) ||
>> (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "UK", AMOUNT >
>>"3000")) ||
>> (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "CAN", AMOUNT >
>>"3000")) )
>>
>>then
>>
>>end
>>
>>   In next version you can do:
>>
>>when
>>  m: TransactionBean( RCVRCOUNTRY == "IRAQ" |== "IRAN", SNDRCOUNTRY == 
>>"US" |== "CAN" |== "UK" )
>>then
>>end
>>
>>   []s
>>   Edson
>>
>>
>>
>>rules-dev at lists.jboss.org wrote:
>>
>>    
>>
>>>Hi, 
>>>I am using Drools 3.0
>>>For below rule 
>>>
>>>RCVRCOUNTRY == IRAQ,IRAN 
>>>SNDRCOUNTRY == US,CAN,UK 
>>>AMOUNT > 3000 
>>>i have to compile the drl with this 
>>>
>>>m:   (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "US", AMOUNT >
>>>"3000")) 
>>>m: (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "UK", AMOUNT >
>>>"3000")) 
>>>m: (TransactionBean(RCVRCOUNTRY == "IRAQ", SNDRCOUNTRY == "CAN", AMOUNT >
>>>"3000")) 
>>>m: (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "US", AMOUNT >
>>>"3000")) 
>>>m: (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "UK", AMOUNT >
>>>"3000")) 
>>>m: (TransactionBean(RCVRCOUNTRY == "IRAN", SNDRCOUNTRY == "CAN", AMOUNT >
>>>"3000")) 
>>>
>>>Is there any other easier / better way to express this as a valid DRL?
>>>      
>>>
>using
>  
>
>>>|
>>>
>>> 
>>>
>>>      
>>>
>>-- 
>> Edson Tirelli
>> Software Engineer - JBoss Rules Core Developer
>> Office: +55 11 3124-6000
>> Mobile: +55 11 9218-4151
>> JBoss, a division of Red Hat @ www.jboss.com
>>
>>
>>_______________________________________________
>>rules-dev mailing list
>>rules-dev at lists.jboss.org
>>https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>>    
>>
>
>  
>


-- 
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3124-6000
 Mobile: +55 11 9218-4151
 JBoss, a division of Red Hat @ www.jboss.com





More information about the rules-users mailing list