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
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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users