In a drl file with xml fomat (drools 3.0.5)
the iteration can work with a for loop like this :
Put this in the rhs
Object[] objectc = serviceRequest.getArgs();
for (Iterator it = objectc .iterator();it.hasNext();) {
System.out.println(it.next);
}
vijay nooka wrote:
can any one help in iterating an arraylist holding finite no of objects,
each individual objects holds the details of the object..
for example Boxlist holding different box objects and individual box
object holds the detals of box color,box length and etc..please give me
the DSL syntax for iterating this box list...and syntax should support
the condition such that we should assert the boxlist object (i.e mylist
object as per the below conditons) in to working memory..
here BoxList is the class extends ArrayList
BoxList mylist=new BoxList();
mylist.add(new boxclass("red","10","20","5");
mylist.add(new boxclass("red","40","20","10");
mylist.add(new boxclass("red","50","40","20");
.
.
.
etc are added in to mylist
plz explan the syntax clearly as i had seen some syntax which is confusing
me....
thanks
vijay
--
View this message in context:
http://www.nabble.com/list-iteration-tf3375504.html#a9400588
Sent from the drools - user mailing list archive at
Nabble.com.