[rules-users] Collection & Emptyness

Steven Williams stevearoonie at gmail.com
Wed Apr 23 04:03:15 EDT 2008


use sousVenues.empty == true

On Wed, Apr 23, 2008 at 5:32 PM, vdelbart <delbart.v at mipih.fr> wrote:

>
> Hi,
>
> I have an object 'VenueGlobal' with a property 'sousVenues' who is a List
> of
> SousVenue. I try to test the emptyness of this list in on sentence but i
> don't know why it doesn't work :
>
> I try this :
>
> VenueGlobal( sousVenues == null || sousVenues.empty )
>
> but I have this error :
>
> org.drools.rule.InvalidRulePackage: [11,53]: unknown:11:53 Unexpected
> token
> ')'
>        at org.drools.rule.Package.checkValidity(Package.java:424)
>
> I try this :
>
> VenueGlobal( sousVenues == null || sousVenues.size == 0 )
>
> but I have this error :
>
> Caused by: org.mvel.PropertyAccessException: unable to resolve property:
> size
>        at
>
> org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:382)
>
>
> I don't know what the solution ?
>
>
> regards,
>
> V.
>
>
> --
> View this message in context:
> http://www.nabble.com/Collection---Emptyness-tp16833060p16833060.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
steven.williams at objectconsulting.com.au
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080423/981534a3/attachment.html 


More information about the rules-users mailing list