Sending EDI to TN

I’m looking for some guidance in sending EDI documents to TN 6.01. Should EDI docs be sent in EDI format or should they be transformed to XML and submitted that way? When I transform an EDI 850, TN throws an exception stating the envelope does not exist. I feel like I’m missing some trick here. The EDI documentation says to extract the needed data from the byte string and use it to determine the documents type and attributes. Is that really how it works?

I have serveral more questions, but lets see where this goes first. Thanks for your help.

Jim Palmer

EDI(eg:X12/EDIFACT) Documents should be sent in EDI format(mandatory).

It seems you are sending out EDI X12 850 as outbound transaction.

Steps to follow:

I believe you have the final 850 (IDATA values)with mapped data .Once you have IDATA values these services should be invoked before pushing it to TN:

1.wm.b2b.edi:convertToString(it creates ST transactionSet)2.wm.b2b.edi.util:addICEnvelope (it will add ISAEnvelope)
3.wm.b2b.edi.util:addGroupEnvelope(it will add GSEnvelope)

At the end the edi string must have (ISA,GS,ST,SE,IEA).

And finally route this final string using or to TN.

Hope you got it clear.If not some body will chim on it.

Sorry,Forgot to mention in my previous post:

pls make sure the final edi 850 document string have the appropriate delimiters,generally used delimiters are($,~,},+,{,*,>,')etc…

Pls specify these delimiters shown below,

Delimiters for example:

Set these in converToString service

And also fill it in wm.b2b.edi.util:addICEnvelope,wm.b2b.edi.util:addGroupEnvelope services
(in delimiters field section)

If you don’t set up delimiters,edi document will be messed up and TN will end up with Exceptions and won’t recognizing the document.


Actually, I’m receiving an EDI 850 from a VAN. I need to receive it in TN. I’ve seen posts where they talk about getting the outer envelope as a received documents. That would be what I expected when I received the EDI . The EDI I’m receiving has multiple 850’s inside. I’m not sure how to handle that either.

OOps,i assumed you are sending edi 850 via TN to outside world according to your message.

Review the docs for the WmEDIforTN package. TN will do the de-enveloping for you. You set up rules for the interchange, group and transaction sets. Normally, your rule for the interchange will be to invoke a service to create and send a 997. Group envelopes can usually be ignored. For each transaction set, your rule will invoke a service. This service will be invoked for each individual transaction set (1 at a time). Your service then just does a bizdocToRecord and then you’re set for mapping from that record to whatever you need.



When can one find information about names to be used for delimiters, and the values needed for ISA/EDIFACT?

Check the user guides for WmEDI and WmEDIforTN.

Take a look of EDI_Module_Core_Component_Users_Guide.pdf

you will find this Advantagesite/Bookshelf/webMethods eStandards/webMmethods EDI Module.

or in wmEDI package/Doc


I have reviewed the EDI for TN documents but I haven’t gotten much farther. I’ll start at the beginning.

I am receiving EDI through the getFile service as a stream. I specify the SenderID, ReceiverID, and the DoctypeName and I then I call routeFlatFile. When I review the results I see an error which reads: >>>BasicData:EntryTimestamp=2003-08-15 14:43:27.06,EntryType=2,EntryClass=Processing,BriefMessage=Routing rule 850 selected,FullMessage=null,RelatedDocID=0ag08400us3emk6a0000002s,RelatedPartnerID=null,RelatedInstanceID=null,RelatedStepID=null,B2BUser=null<<<

The routing rule is selected and called but when I run bizDocTorecord I get the following error returned : An error occurred invoking the processing service jimp.test:process3M850 for this document. The original error was [ISS.0086.9091] Parameters xmldata, $filestream and $filedata are all missing. One of these must not be null.

Did I miss something? I have the default TPA setup and all the doc types are seen in the TN console. The default TPA splitOption is set to transaction but I only see one document. I also don’t see any Envelope entries.

I’m not familiar with routeFlatFile (haven’t used 6 yet) but TN normally requires that EDI data var in the pipeline be named edidata, whether it is a string or a stream. You might give that a shot.

I tried both the string and stream and still get the same missing parameter error. Is anybody else receiving EDI in TN? If so, what are your basic steps to get the data in? The gateway service I’m using is almost the same as the sample. Do I need more?

We’re using it extensively (TN is our core component, acting as a document broker). We have no issues when we have a string var named edidata in the pipeline when invoking or


First thing, have you loaded the EDI Doc types into TN?
If this is inbound EDI then make sure you have pur Sender/Receiver pair for your partner is setup in TN as an External Id Type. So 01~123456789
should be setup as an External UID Type of DUNS with the value 123456789 and that goes for you Receiver ID as well

Then verify that you have the appropriate Trading Partner Agreement specifying the correct direction flow of the document.


oops forgot
you need a rule to point to your service set usually at the Envelope level. in your service the input should be contentStream and you will invoke streamToBytes and byteToString and you should know have your document. After you have the EDI Doc types loaded you can view the schema in the WmEDIforTN packager under the EDIFFSchema.X12.V4010:T850
Edit the schema and on the Flat File Structure tab click on the blue document icon to create the 850 document structure which will be named T850DT.
You may need to load EDI ID types if you have qualifiers like phone or pas code.
The loading for the EDI doc types and EDI ID types are done from the wmEDIforTN home page.

You could use this to validate the documents.

I have the EDI Doc Types loaded. I see all the Doc Types needed. I see the X12 4010 850 and the X12 Envelope Doc Types.

When I execute routeFlatFile, I pass in TN_Parms of SenderID, ReceiverID, DoctypeName. When I send in the canned doc type “X12 4010 850”, TN recognizes the doc type but not the Sender and ReceiverID. When I use the same Sender and Receiver ID’s but use a FlatFileSchema Doc Type I created and set the parsing option to refer to the EDIFFSchema.X12.V4010:T850. The results are different. TN recognizes the Sender, Receiver and the Doc Type. But I get an error when I being my rules processing. The bizDocToRecord service fails.

Is there another way to receive the data?

I added the X12 Envelope processing rule but that doc type is never recognized.

I used for finding the Sender/Receiver profiles in edidata and it created the X12 Envelope, X12 Group and X12 4010 850 in TN. Is there anyway I can submit the edidata with any option such that I get only X12 Envelope entry in my TN transaction Analysis.

Thanks for your help

you have to force with EDI TPA (in TN6.0)to process ISA level,so that you will see only X12 envelope entry in transaction analysis view.



I thinking your problem has to do with routeFlatFile. In 6.01 there are similar services in the wmEDI package and the wmFlatFiles package but they behave differently. ie. convertToString in the wmEDI packager works on EDI files but not flat files and similarly for convertToString in the wmFlatFile package.

I would re-read the wmEDI manual and get away from using routeFlatFile.
Review the sample in the wmEDISamples package. If you follow that example you can’t go wrong.

Good Luck!

Is this EDI TPA feature available in TN4.6 (or similar) as we’re not upgraded to 6.0 yet???