Dave,

Yes, I was trying to delegate the iteration of the collection to rules
engine.  Given that all my rules current have an super class that helps with
some of the basics of asserting objects and sending application data, I will
just have to add another helper method that asserts all objects in a list
similiar in nature to how the Conway example does it.  This works for my
simple case.

A more complex example that I am working on, is I have two [or three] lists
and I need to compare the items in them based upon certain criteria and if
they match pull them off the agenda and add them to a "matched" list.  Then
after the simple pass of matching, I need a more complex one with the
remaining items where further rules are applied.  Any thoughts out there?

Thanks All!

Ron


On 3/20/06, Hamu, Dave <[EMAIL PROTECTED]> wrote:
>
> Oh yes... Alternately, you can have your application assert the
> individual facts, but I gather that you are trying to delegate all of
> the busy-work to the rules engine, which is the way that I have used
> Drools.
>
> - Dave
>
> -----Original Message-----
> From: Hamu, Dave [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 20, 2006 8:42 AM
> To: [email protected]
> Subject: RE: [drools-user] List Processing
>
> I believe that the answer is.... No.  You cannot do what you want the
> way that you want.  You do need to iterate and assert into memory.
> Truthfully, I have done this on several occasions and it really not that
> cumbersome.  You simply need to have a rule that performs the iterations
> and assertions.
>
> Best Regards,
>
> Dave
>
> -----Original Message-----
> From: Ronald R. DiFrango [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 20, 2006 8:39 AM
> To: Michael Neale
> Cc: [email protected]
> Subject: Re: [drools-user] List Processing
>
> Michael,
>
> I am looking for the most effective way to send a collection into Drools
> and have it execute the rules over all the elements in that collection.
> In the "Conway's Game Of Life", it appears to do this, but iterating
> over the collection and asserting those into memory before firing the
> rules.  It would be nice [and maybe you can, but I have not seen it] if
> I could send in the collection object and all rules would fire on all
> objects in the collection.
>
> The example for me that comes to mind is trying to determine if a User
> is in a given role.  I have a collection of roles that the user is a
> part of and I want to determine if they are a member of one specific one
> [Admin for example] and set a boolean flag that says yes they are.
>
> Ron
>
>
> On 3/20/06, Michael Neale <[EMAIL PROTECTED]> wrote:
> >
> > Not sure what you mean. Do you mean the fact that it iterates through
> > a collection and asserts the objects one at a time?
> >
> >  On 3/16/06, Ronald R. DiFrango <[EMAIL PROTECTED]> wrote:
> >
> > > All,
> >
> > Is the "Conway's Game Of Life Example" the best or only example of how
>
> > to process a list of objects that you need to evaluate?
> >
> > http://drools.org/Conway%27s+Game+Of+Life+Example <
> > http://drools.org/Conway%2527s+Game+Of+Life+Example>
> >
> > Thanks in advance,
> >
> > Ron
> >
> >
> >
> >
>

Reply via email to