[rules-users] Ordering of collected elements

sjoo822 sean.joo at gmail.com
Thu Jun 3 12:28:06 EDT 2010


Hi,

I have a rule with the condition that looks like below:

when
     item : Item()
     list : ArrayList(size > 0) from collect ( SubItem( type == "X" ) from 
item.getSubItemList())


When I execute this rule, it seems to me that the order of elements in the
collected list is not the same as they were in the subItemList of the item. 
Is there a simple way to ensure the same ordering in both original list and
the collected list without using accumulate or sorted list?
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Ordering-of-collected-elements-tp868051p868051.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list