[rules-users] Intersecting two collections in LHS

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jun 23 04:48:15 EDT 2011


Try this
http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html
in combination with
http://members.inode.at/w.laun/drools/SubsetOfEvaluatorsDefinition.java

Feedback (to me personally) would be appreciated.
-W


2011/6/23 Hezi Stern <hezis at delegatecom.com>

> I have in the working memory all possible sentences that can be presented
> to the user ( class Sentence() ).****
>
> Each sentence holds a collection (String collection) called descriptor that
> describe the sentence.****
>
> ** **
>
> Based on  various rules I populate a collection called messageFilter which
> will be used to select the appropriate sentence.****
>
> The proper sentence is one that all its descriptors match the one in the
> messageFilters****
>
> ** **
>
> What I would like is something of the sort:****
>
> ** **
>
> $sentences:       ArrayList() ****
>
> *from* *collect* (Sentence(descriptor *contains* messageFilter)****
>
>
> ****
>
> as messageFilter is a collection, this is not a valid code.****
>
> What would be the proper method to implement it.****
>
> ** **
>
> I am using drools 5.1.1 but am willing to upgrade to 5.2 if required.****
>
> ** **
>
> Thanks,****
>
> Hezi****
>
> ** **
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110623/e8635a73/attachment.html 


More information about the rules-users mailing list