Processing multiple EDI ISA segments in a single file

Can you share the details of your processing rule?

Rob

i found the problem. When execeutimg from the devleoper providinga document ID the related document and document status are retrievable. But when the servive is invoked in the TN processing rule the relatedDoc count gives 0 meaning the relationship between the documents are not established when the processing rule gets executed only after the exceution does the relationship between them gets established. So its is not of much use if i try to find the status of the related transaction of a document while invoking using the processing rule. I just need a flag to indicate that the processing of the ISA in the file is over.

Is there some way by which i can query to find the end of the processing of all the transaction from the trading network database.

I am planning to append a dummy a ISA segment at the end with some set of EDi transaction data when i originally receive the data from the FTP folder. Use this transaction set to identify the end of the processing of a particular ISA envelopes from a single file and use as a flag to send notification for the close of the file.

Regards
Ravi

Rob,

I’ve been following this thread with great interest. Previously you stated:
>An example: 2 ISAs, each with one group (GS-GE), each >with one transaction set (ST-SE).
>
>In TN, there will be 3 X12 Envelope (one for the entire doc, >one each for the individual interchanges), 2 X12 Group and >2 X12 where is something like 4010 and is something like >850, 210, whatever.

Can I get TN to recognize the sender/receiver from the envelope that contains the entire doc and then pass that to the envelopeProcess.

My problem is if I have an envelope with multiple sets in it, let’s say 25. TN processes 25 individual sets each wrapped in an ISA. I have to ftp this data to our backend and I do not want to ftp 25 individual files but rather one file with 25 850 flat-file equivalents in it. My flow is modelled after the x12values flow in the EDISamples service. I am therefore looping on ISA but each ISA contains only one set.
How do I get around this to be able to send one file with the 25 sets in it?

Thanks.
Chris

You should be able to hook your processing rule to any of the envelopes that you want. If you don’t want to process at the TSET level out of TN, set things up to ignore those.

Rob,

But what about that 1st envelope that has all the other envelopes in it? It shows up as sender/receiver unknown. Can I do anything about that one?
The individual envelopes inside it are identified correctly and processed. And yes I did have to go back and turn off the rule on the TSets.

Chris

As I recall, the EDI for TN docs state that the all-encompassing envelope is a fake one, generated by the content-type handler presumably. “Its only purpose is to
enable you to recall which documents were sent to Trading Networks at one time.”

Thus I think you’ll need to handle the interchanges as individual batches–which is what interchanges are ostensibly for anyway.

Out of curiosity, what’s the driver behind sending multiple interchanges in a single doc?

I’m not trying send multiple interchanges in a single doc.
I’m trying to send multiple Tsets in one file to my back end.
If I execute the processing rule at the tset doc level I get one individual flat file per Tset. I trying to get multiple Tset per flat file.

Ah. Apologies for the confusion.

This is confusing. My first inclination was to say make sure your profiles are set up with the proper external IDs that are being sent in the ISA envelope. But then the TSets wouldn’t have the right sender/receiver identified either. I guess I’d need to see the file to see what you’re referring to.

Hi Rob,

I have it working now. I think the confusion came from me not clarifying that this is inbound EDI. I was trying create one application Flat File with all the 850s in it. Initially I had the rule at the Tset level but based on the looping that created indvidual application flat files.

I have not moved the rule to the Envelope level. You have also confirmed that there is nothing I can do about that one Envelope in TN that holds all the documents.

So for now all is well.

Thanks for your help!

There is something not right with the envelope level doc. The previous and current projects I’ve worked have no trouble recognizing the sender and receiver of the X12 Envelope doc type.

I’ve previously hooked a rule to the envelope (any sender, any receiver) to generate 997s.

Something isn’t configured properly if your X12 Envelope doc type is not extracting/identifying the sender/receiver properly.

Rob,

What should I be looking for. I ftping a file with 4 interchanges. What I get is 4 interchanges recognize and process successfully and a 5th with unknown sender/receiver. This 5th interchange contains the other 4 interchages in it.

Any ideas?

Thanks.

From previous posts:

I asked: “what’s the driver behind sending multiple interchanges in a single doc?”

You replied: “I’m not trying send multiple interchanges in a single doc.”

It sounds like my question was misleading. It should of been: “what’s the driver behind sending multiple interchanges in a single file?”

The 5th interchange is a bogus one. It’s generated by the EDI/TN handler simply to relate all the interchanges together. I think you have two options:

  • Process the fake envelope, separating each ISA-IEA set and de-enveloping yourself. You’ll want to make sure you use the segment delimiters to help determine when you’ve run into a new ISA. Simply searching for “ISA” is dangerous as it could appear in the data. You won’t be able to set a processing rule that uses sender/receiver as selection criteria as I don’t believe these are set for this generated envelope (as each enclosed ISA’s sender/receiver could be different, it can’t reasonably set these).

  • Process each interchange separately. You’ll be able to have unique processing rules based on sender/receiver if desired. You’ll lose the fact that all 4 came together in a single file. Whether this matters or not depends on what the ultimate destination of all the included tsets expects. If it absolutely needs to have all tsets from the file in one batch/doc, then you can’t do this approach.

So now that we’ve clarified, I’ll ask my curiosity question again: What’s the driver behind sending multiple interchanges in a single file?

Hi Rob, Chris

Hi i have solved this issue what chis is referning to. The solution is a simple one and it striked me at the last after trtying to figure out options using trading network internal data using wm.tn.view service.

I have a flow service that takes in a EDI file. All the EDI transactions are written to the same file. The file is closed at the end of all the transactions to a different folder.

The problem in this is there is no way to identify the end of processing of all the edi transactions in the EDI file from sap.

simplest solutionn i found after all the effort is to call the processing action rule in a sync manner when the ftp data is sent to the tn.

The processing rule is on the Tset so all the transaction processing completes in a sequencial manner. so when the end of processing is reached the control return back to the flow service taht actually subitte dthe edi data to the tn and the a indication document is published to close the file.

  1. ftp document
  2. bytetostring
    3.http( invoke wm.tn.receive)
  3. publish end of the transaction .

this approcah works very well.

Thanks and Regards
Ravi

Rob,

The reason for sending on file are for file management reasons and to reduce I/O. These flat files get archived on the back end.

I need to make something clear that I think has gotten lost in all the dialogue. My process works. My interchanges get processed correctly and passed on to the back end. I am in fact using a similar process to what Ravi mentioned in his last post.

  1. submitEDI receives the file from ftp and sends it to tn.receive via http.
  2. The docments get recognized and kicks of x12Process which does the bytesToString, envelopProcess, loops thru the Interchanges, concats mapped data to string
  3. ftp the concatenated string to the back-end.
    My concern here is the size of concatenated string. What is the max size?

I still have to add the FA process to this.

My only other concern is that one all-inclusive Interchange that sits there with unknkown sender/receiver. That’s it! It’s not causing a processing problem but from an Administrator’s point of view when viewing the Transaction Analysis they could forget and think that some data never got processed.

Comments?

i am new to webMethods.Any one could expalin what is pipeline and what operatins we can do on pipeline, i mean i have seen like IDataCursor,IDataUtil etc…So what does it mean.
Thank you in Advance.

Follow the webMethods Developer (any version) user guide for more and eloborate information.

If you dont have those specific docs download it from

http://advantage.webmethods.com site.

goodluck,

HTH.

webMethods 4.6 treats Records and RecordLists as separate things. There’s a wonderful Java service posted here that converts a record to a recordList (conditionally - if it’s a recordList, it leaves it alone)

[url=“wmusers.com”]wmusers.com is the thread with the magic service in it.

Good luck

Raymee,

Here’s a couple of suggestions:

  1. Have a look at the wmEDISamples pkg. The examples there specifically X12values will show you how to loop thru multiple ISAs
  2. Search this group for more on this topic. There’s a ton of info here.

Let’s us know if you still need help especially after looking at the samples.

HTH

The solution I am considering is alterating my template to include another “dummy segment” AAA that will have one field AAA01. In the template I will define a loop segment that will define the ISA as an array "ISA, ". In order for this to work I will need to manipulate the flat file data. I will need to replace every ISA| with AAA|01|ISA|. This way the ISA segment will appear as an array ISA/ISA[0] even if there is only one ISA segment. Do you see any problems with this solution?
Thanks

Raymee,

Did you look at the X12ToValues example in the EDISamples pkg.
In my own opinion anytime you have to start altering the the actual EDI data (ie. replacing the ISA) you asking for bigger issues down the road.