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

Raffi Khatchadourian khatchad at cse.ohio-state.edu
Sun Apr 27 10:02:04 EDT 2008


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



More information about the rules-users mailing list