[rules-users] "contains" operator for collections as facts?

Edson Tirelli tirelli at post.com
Sun Apr 27 18:49:04 EDT 2008


   Use the self reference field "this":

List( this contains "something" )

   []s
   Edson


2008/4/27 Raffi Khatchadourian <khatchad at cse.ohio-state.edu>:

> Hi. I understand that the "contains" operator works as follows (from the
> drools manual):
>
>  'contains' is used to check if a field's Collection or array contains
> > the specified value.
> >
>
> However, what if the fact itself is a collection and I want to know
> whether or not that collect contains an item? For example, say I had an
> ArrayList instance inserted as a fact in the rulebase and in one of my
> queries my predicate is to express that that ArrayList instance contains
> a certain object. Any ideas? Thanks!
>
> Raffi
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080427/15d524b7/attachment.html 


More information about the rules-users mailing list