When creating an outbound EDI document with multiple ST segments, you can use the wm.b2b.edi:convertToString to create a string which will fill in the ST and SE segment counters.
If you then use the wm.b2b.edi.util:addICEnvelope, it will add the GS/GE and ISA header to the edi string, however the GE segment counter does not reflect the number of ST segments.
Does anyone have a good solution for handling multiple ST segments?
Actually GE/GE01 counter will take place automatically depends upon number of ST segemnts under that Group by using the addICEnvelope Service.May be something is messing up in the code.Check the envelope validation with envelopeProcess service.
And for example you can check this logic in the WmEDISamples package of XMLToEDI mapping.
In 6.1 there was a bug, GE counter is generated incorrectly, usually off by one! There is a fix available from tech support. The 6.1 EDI fixes are not listed on Advantage for some unknown reasons. If I remember correctly it’s fix 52 or some other high number.
Chris that fix is only for SE segments, not GE… Just applied it and it still does not generate the correct # of transaction sets in the GE segment…
From readme
1-Q3WAC: The service wm.b2b.edi:convertToString creates the segment
counts in the UNT and SE segments with a value one greater than the
actual segment count. This fix will allow the service to create the
segment counts with the correct value.
I have an issue with multiple ST segments. I am using WM 7.1.2.
I am retrieving data from AS400 database and one source wM service publishes canonical with all these info from the table. this canonical is subscribed by an EDI service which sends data to TN, to where it sends to partner.
as there were multiple records in AS400 db table, number of canonicals got published and as many number of EDI docs getting sent to partner.
Now partner wants all the ST segments (i.e. all the data from db) in a single EDI document and send them.
i can do this by making canonical document as a document list and loop on it inside the EDI service, but my point is, if someother partner comes again for someother document (let us take 810 or 850) and ask us to send multiple ST’s in a single EDI, i cant go and modify all canonicals like this.
So, i want to know is there a way to accomplish this from developer or TN.
hope i am clear in my question.
You’ll want to take a look at the batching facilities provided by the TN for EDI components. For each published document you’ll translate to an EDI doc and then queue it in TN. Then periodically you’ll have a batch process that gathers all the waiting EDI transaction sets into a single group and interchange envelope pair.
Refer to the docs for an overview and details. If you have additional questions/concerns from that, please post them.
As Rob suggested above that batching/Public Queues (under Tools/Registry section) is the good option to consider instead of having changed all your Canonical structures.
Thanks reamon and rmg.
I read through the Batch process and i followed the steps to do that by creating a public queue and the processing rule for that.
Belo is what I understood:
when the EDI document submitted to TN, it will be batched to the public queue with the use of processing rule i created.
the scheduler will be invoked as per the scheduled time.
then depending upon the inputs to the public queue, the bacthed EDI data will be submitted to TN, and from there it will be submitted to partner.
But
is there a place where i can check the batched EDI document, like where this batched EDI will be stored by TN.
what is the use of creating a EDITPA here. how this will impact this batch processing
Also, please correct me if i am wrong anywhere and if i understood something or everything wrong.
The resulting EDI document will be stored in TN. The EDI docs describe how you can identify the batched EDI document in the transaction analysis.
I don’t recall if the EDITPA is used during batching. I think it may be used for delimiters but I don’t recall. It is definitely used when the batched document is submitted to TN for recognition and processing. You’ll want the EDITPA to be configured to split the doc as desired (to the group if you want FA support).
Where the EDITPA is more useful is when you’re creating the individual transaction sets. Your services should read the proper EDITPA and use the settings there when converting your document to the EDI string.
is there a place where i can check the batched EDI document, like where this batched EDI will be stored by TN.
I think you want to see batched EDI document which is going on background (queued) before it shows up in TransactionAnalysis?
Probably you can check via service level using WmTN services queuing folder svcs and also check the particular transaction TN Activity Log it shows the entire steps that does internally.
I did implemented this batch process and it is working fine. i didnt use any TPA here, but will go thru the pdf’s again for its importance.
why i have asked where to check the batched EDI doc before submitting to TN is, i remember in large document handling in 7.1, webMethods saves the large document in a folder in our hard disk and process it.
so, just want to know if this is the same process used in EDI batch processing.
Anyways, thanks verymuch for your help. my problem got a solution.