[rules-users] Multiple bindings with the same type

Wolfgang Laun wolfgang.laun at gmail.com
Wed Dec 8 14:37:12 EST 2010


Any order has to come from attributes in your facts and must be ascertained
by constraints. With these two patterns and two ArrayList objects the rule
fires with A1/A1, A1/A2, A2/A1, A2/A2.
-W

2010/12/8 Robert Miyashiro <robert at mercedsystems.com>

>  Let’s say there’s a rule with multiple bindings of the same type
> evaluated in a stateless session.  For example:
>
> rule
> when
>     $list1 : ArrayList()
>     $list2 : ArrayList()
> then
>     ...
> end
>
> Now, I have 2 ArrayList objects to insert into the session, A1 and A2.  How
> can I make sure that A1 gets bound to $list1, and A2 gets bound to $list2?
>  Obviously, I can’t just insert A1 first followed by A2 and expect that to
> work.  Is there some kind of evaluation mode or setting that will make
> Drools pay attention to the order in which objects are inserted into the
> session?
>
>
> _______________________________________________
> 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/20101208/a7fdb506/attachment.html 


More information about the rules-users mailing list