look at hte Shopping Example, I use sum() there, but the concept is the same:

rule "determine 10% discount if total purcahses is over 100" no-loop true when
       $c : Customer()
$i : Double(doubleValue > 100) from accumulate ( Purchase( customer == $c, $price : product.price ), sum( $price ) )
   then
         $c.setDiscount( 10 );
insertLogical( new Discount($c, 10) ); end

Mark
[EMAIL PROTECTED] wrote:
Does anybody have a good example about using count()?
------------------------------------------------------------------------

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to