There are a couple of ways I know you can do this.
In wm 6.0.1 review wm.b2b.editn.batch:batchProcess for how to batch EDI documents into TN. This is new in 6.0.1. I have not used this procedure first because I had already developed the one mentioned below and it offered no advantage to switch from what I could tell.
The other way I have does is in my flow service I pre-sorted my application file by Trading Partner. I then append the mapped Transaction Sets (ST-SE) for a given partner into stringList. When the partner changes I wm.b2b.edi.util:addGroupEnvelope, the wm.b2b.edi.util:addICEnvelope, and post it to TN.
A word of caution is that wm.b2b.edi.util:addGroupEnvelope generates the Group Control number as a string when the EDI standards dictates that it be an integer. Because wm uses the data day of the month as part of its algorithm you will get a leading zero on days 1 thru 9 of the month which violates the standard. I copied the service and modified by adding invoking addInt and adding 0 to the control number to convert it to an integer to solved the problem.
Search the archives here as well as this topic has been discussed with lots of input from the real gurus in the group.
HTH
#edi#webMethods#Integration-Server-and-ESB