I have document list containing list of 70 items. I need to loop through this document, create separate lists
of each 30 items. Inside the loop I have count variable which was initialized to 1 before the beginning of the loop.
Based on the count, I have sequence with appendToStringList service in it.
appendToStringList has input: toList, fromList and fromItem.
Mapped:
fromItem to document’s item number from input side
toList to List1.
Repeated the above for all the lists (List2, List3)
But after I completed the loop, I have:
List1: 0-49
List2: 0-70 ===> I only need items from 50-70
If I drop the tolist from second appendToStringList while adding items to List2, then List1 contains only one item,
that is 49th item.
===================
Here is the psuedo code:
count = 1
Loop:
Branch count
If count => 1 and count < 50
Add item number to List1
appendToStringList
If count => 50 and count < 100
Add item number to List2
appendToStringList
If count => 100 and count < 150
Add item number to List2
appendToStringList
By the end of the loop, I need:
List1:
item1 through item49
List2:
item50 through item99
…
I hope I am clear. Thank you for your help.
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods