[rules-users] OR in more than one level

manyasri.m manyasri.m at gmail.com
Fri Jun 20 10:40:59 EDT 2008


Hi Sergio,

i am also face same problem.condition is  empcontext value must be Y or N .I
am trying to like this,

rule "empContext" 
	when
		There is an EmpBean
		EmpBean empcontext value is Y or N		
	then
		Reject with response : "EmpBean empcontext value must be Y or N "
end
===================
[*][]There is an EmpBean$empBean:empContext()
[*][]EmpBean empcontext value is Y or N =
eval($empBean.getempContext().equals("Y")||
$empBean.getempContext().equals("N"))	
===============================
In this case rules are not fired.pls review this condition it's correct or
not.


Sergio Stateri wrote:
> 
>    Hi,
> 
>    How can I use OR in second level attributes ? (attributes that´re in a
> aggregate Class of a aggregate Class of main Class)
> 
> when
> 
> $trigger : ArrayList( size >= 1 )
>      from collect( PromotionShoppingCartLine( productItem.sku == "1" ||
> productItem.sku == "2" ) from
> $promotionShoppingCart.promotionShoppingCartLines )
> 
> 
> then
> .
> .
> 
> 
> I can´t use "productItem.sku" (sku attribute inside productItem attribute
> that´s inside PromotionShoppingCartLine class) if I´m using the || (OR),
> but
> if I use && (AND) all works fine.
> 
> 
>    thanks in advance,
> 
>    Sergio Stateri Jr.
>    stateri at gmail.com
> 
> 
> 
> -- 
> Sergio Stateri Jr.
> stateri at gmail.com
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://www.nabble.com/OR-in-more-than-one-level-tp18018697p18031012.html
Sent from the drools - user mailing list archive at Nabble.com.





More information about the rules-users mailing list