[rules-dev] new binding - what't its purpose?
Wolfgang Laun
wolfgang.laun at gmail.com
Wed May 25 11:08:52 EDT 2011
On 25 May 2011 16:42, Mark Proctor <mproctor at codehaus.org> wrote:
> On 25/05/2011 08:28, Wolfgang Laun wrote:
>
> rule exornot
> when
> Number( $iCount: intValue ) from accumulate ( Fact( x > 0 ), $c:
> count(1) )
> then
> System.out.println( "count = " + $c );
> end
>
> accumualte now supports multiple functinos - like min and max. As it now
> returns multiple results, the 'from' isn't appropriate. So we instead allow
> binding on the function directly. 'from' will still, for single functions it
> will behave as previously, for multiple functions I believe we throw an
> arror.
>
>
It would appear that you don't; the first function is returned via the
pattern up-front.
JIRA forthcoming, since results can't be used on the RHS.
-W
> Mark
>
>
> There's no way $c can be used in RHS code (5.3.0, current).
> Is this the intended behaviour? Where can it be used?
>
> -W
>
>
> _______________________________________________
> rules-dev mailing listrules-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110525/60729b23/attachment.html
More information about the rules-dev
mailing list