Hello,

The rule below check which quote have a price above the average.
In this form the rule is working, but from the log files it seems that this rule is doing a cross join.

rule "above average value"
        dialect "mvel"
        when
Double( $average : doubleValue) from accumulate( Quote( $price : value ), average( $price ) )
                $quote : Quote(value > $average)
        then
System.out.println("Quote above average [" + $quote.id + "] value [" + $quote.value + "] average [" + $average + "]")
end

I could not get the correct syntax. I would like to write something like:

when
Quote(value > doubleValue) from accumulate( Quote( $price : value ), average( $price ) )

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

Reply via email to