[rules-users] 'from accumulate' doesn't work on multiple columns?..

Olenin, Vladimir (MOH) Vladimir.Olenin at moh.gov.on.ca
Wed Mar 7 17:01:39 EST 2007


This is as a follow up for the previous question.... It looks like I made a
wrong assumption that 'accumulate' can work on multiple columns:

 

                        Integer ( intValue > 0) from accumulate (

                                    Record ( f1 == $f1, f2 < 10, $value1 :
value )

                                    Record ( f1 == $f1, f2 >= 10, $value2 :
value )

                                    Init ( int sum = 0; ),

                                    Action ( sum += $value1 - $value2 ),

                                    Result ( new Integer (sum) )

                        )

 

I'm getting an error ('then' is expected or smth like that at the point
where the second 'Record' is defined) and the only way to remove the error
is to declare one and only one Column constraint... So, it is not possible
then to use multiple columns in 'accumulate'? If not, then it would be even
more interesting to get some idea on how to approach the kind of problem I
mentioned in the previous post.....

 

Thanks,

 

Vlad

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070307/44872f28/attachment.html 


More information about the rules-users mailing list