webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Processing multiple EDI ISA segments in a single file

webMethods Community Member

webMethods Community MemberMon December 02, 2002 04:36 PM

  • 1.  Processing multiple EDI ISA segments in a single file

    Posted Wed November 20, 2002 05:30 PM

    Hello All:

    I do have a scenario where multiple EDI ISA segments are stored in a single file in VAN.

    Let us consider for example, different inbounds EDI transactions are embedded in a single file, if i do a actual processing using http client to sent the document to wm.tn.receive service, I am not able to process it.

    But if there is only one inbound EDI transaction in the file, then i am able to process the document.

    Has somebody come across this situation and please advice regarding the same

    thanks,
    Ravi


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 20, 2002 05:34 PM

    Hi,
    This totally depends on how you process the EDI file. When you create the EDI record all you have to do is to loop over /Values/ISA and create your own record structure as you need and process it.
    We are doing it here successfully.
    Hope this helps.
    Thanks


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 3.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 20, 2002 06:20 PM

    I know that TN expects all ISA id’s in the interchanges to be linked to the user ID you are signing on with via the profile of the ID your using to send data to tn.receive. If any ISA id’s are not in the profile, they will receive an error. There are two ways around this that I know of, one is to use an ID that has TNAdministrator access (Not good if you are allowing
    partners to access from across the internet, they may have access to Administer your TN) or as Rob Eamon pointed out to me the other day, this Ezine article supplies another alternative…

    [url=“wmusers.com”]wmusers.com


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 4.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon November 25, 2002 06:16 PM

    Thanks for the help ,

    I have done a work around i have explained the steps below. Please provide your feedback whether it is a proper mechanism.

    • Get Edi file from FTP server
    • convert the byte –> string using bytestoString flow
    • Created a custom java servive to parse the string to string array using “ISA*” as delimiter
    • Loop through the String array
    • submit the inarray string value to the Trading networks using wm.tn.receive through wmpublic.client.http

    would like to know everyones feedback on this.

    Regards
    Ravi


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon November 25, 2002 07:07 PM

    Points to be aware of:

    • This will not support large documents, since the entire file is loaded into memory at once.
    • Using “ISA*” as the literal will not support documents that use other field delimiters.
    • Searching for ISA assumes that ISA will not appear in the data, which might be inaccurate.
    • Invoking wm.tn:receive through pub.client:http is an unecessary extra step. Name the string edidata in the pipeline and call wm.tn:receive directly.

    That last bullet may actually get you past the security restrictions as security is handled differently for local invokes. Try loading your file, assign it to a pipeline var named edidata, then invoke wm.tn:receive, passing edidata to the node parameter.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 6.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue November 26, 2002 05:07 AM

    Rob ,

    Do you suggest a alternative for this approach for handling the large document for this scenario.

    Will the wm.tn.reciev work without the Content-Type value set to “application/EDIstream”

    Regards
    ravi


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue November 26, 2002 06:43 AM

    The large document handling docs describe how to deal with large documents.

    Naming the pipeline var edidata will do the right processing. If you invoke tn:receive, there is no content-type to worry about–there is no http interaction.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue November 26, 2002 07:10 AM

    Rob,

    I understood the details regarding the submit to the wm.tn.receive .

    Regarding the Large document handling:

    The Large document handling would be efficient when the transaction set handled by TN is very large to be handled.

    But i think in this scenario. The Entire file from FTP is split into invidual transcations and fed to the wm.tn.receive service.(Individual EDI trasactions identified as ISA segments). we can implement the large document handling for each of the EDI transaction submitted to the TN.

    Like if multiple 204,856, are there in the file. Then each 204 and 856 are seperated and submitted to the TN using wm.tn.recieve. Then for each of these large document handling can be setup.

    How can we handle the file before submission to the TN. I have done a seperation using delimiter(ISA*). Is there a efficient way to handle large file containing EDI ISA before dividing and submitting to TN.

    Reagrds


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 9.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 27, 2002 05:46 AM

    Couple of items:

    wm.tn:receive can indeed handle multiple interchanges (ISA-IEA pairs) in a single submission. The documentation describes how it is handled.

    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.

    I did a simple test service to verify the behavior:

    getFile
    …filename=e:/mydir/multiISA.txt
    …loadAs=bytes
    bytesToString
    …bytes=body/bytes from getFile
    …map output string to pipeline var named edidata
    receive
    …node=edidata

    The docs were logged in TN as expected.

    However, if I pass the same string as the post body to wm.tn:receive via a pub.client:http call, only the first interchange is processed. Not a Good Thing.

    Also, the example doesn’t handle large docs–the entire file is loaded into memory. The only technique I could uncover that looked like it would work, causing the data to go through the wM content handlers that would support large docs, was to invoke wm.tn:receive via an http call.

    So I tried a variety of settings for the pub.client:http call with no success. Here’s the contents of the service I was fiddling with:

    pub.file:getFile
    …filename=e:\mydir\myfile\multiISA.txt
    …loadAs=stream
    pub.client:http
    …url=http://localhost:5555/invoke/wm.tn/receive
    …method=post
    …loadAs=bytes (note this is for the response, not the post)
    …data/stream=body/stream from getFile
    …auth/type=basic
    …auth/user=
    …auth/pass=
    …headers/Content-type=application/EDIstream
    pub.string:bytesToString
    …bytes=body/bytes (which now has the response)
    …encoding=UTF-8

    The result is a 403 Service Error. The response string is empty.

    The user/pass I used was an administrator account, so none of the restrictions of the logged in user vs. the doc sender apply.

    Anyone have any thoughts on what to try next? Can any wM person jump in with some insight?


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 10.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 27, 2002 08:27 AM

    Great Rob,

    It works for me. I am able to process multiple EDI Documnet from a single file. That was a great help. The TN firts identifies the documnet as X12 envelope as you specified:

    I have done the following and i am able to retrieve the segregated transaction from the single file(i am having my file i a FTP location)

    1. FTP
    2. MAP the content from FTP to edidata variable
    3. wm.tn.receive (Map the edidata to the receive service input “node” )

    In the TN i have imported the documnet type 850 and added a processing rule to narrow down on 850.

    In the processing action i have added the service action to perform.

    The Flow service i invoked was flow1 with the following input

    1. ByteToString to convert the Byte array to a string
    2. smtp service to send each idenified ISA transaction

    for a single file having 12 transactions send in one shot to the wm.tn.receive. The documnet got identified as X12 Envelope and the processing rule for 850 fired and i got 12 mails containg the different transactions.

    Thanks a lot.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 11.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 27, 2002 08:26 PM

    After further twiddling, here’s some more information. The key element is the content-type, of which application/edistream has some special considerations.

    I believe that the description of content-type in section “The EDI Content Handler and EDI Content Types” in Chapter 7 of the EDI Module: Trading Networks Component guide is wrong. This section appears to be a simple a copy of “The EDI Content Handler” section in Chapter 3 of the EDI Module: Core Component guide with minor edits.

    The EDI guide describes application/edistream as a way to use memory efficiently. Perfect. The EDI for TN guide doesn’t add that using application/edistream when submitting to wm.tn:receive 1) doesn’t work; 2) isn’t necessary. Using application/edistream is only necessary when using the EDI Core Component by itself.

    I offer the following evidence to support the claim.

    Doing this:

    pub.file:getFile
    …filename=e:\mydir\myfile\multiISA.txt
    …loadAs=stream
    pub.client:http
    …url=http://localhost:5555/invoke/wm.tn/receive
    …method=post
    …loadAs=bytes (note this is for the response, not the post)
    …data/stream=body/stream from getFile
    …auth/type=basic
    …auth/user=[user]
    …auth/pass=[pass]
    …headers/Content-type=application/EDI
    pub.string:bytesToString
    …bytes=body/bytes (which now has the response)
    …encoding=UTF-8

    works just fine. Note that the content type is application/EDI, not application/EDIstream as it was in the previous post. I haven’t configured the large doc handling stuff yet but that’s next on the agenda.

    The content handlers for application/edi, application/x12, et. al. all put “edidata” var into the pipeline. For all but application/edistream, edidata is a String. So http/ftp clients simply set the content-type to one of the EDI content handler-supported types and viola, edidata shows up in the pipeline. wm.tn:receive supports this.

    If the content-type is application/edistream, edidata is not a String but is a java.io.InputStream object. wm.tn:receive does not support this and errors out.

    So how can EDI documents with content-type of application/edistream be passed to wm.tn:receive? My best guess is that they can’t. Nor do they need to be. Using the “normal” content-types, the TN large doc handling ought to kick in just fine.

    If someone needs to send a content-type of application/edistream, one needs to write a “front-end” service to simply redirect the edidata input stream to the pub.client:http data/stream. A simple service named receiveX12Stream does this easily:

    pub.client:http
    …url=http://localhost:5555/invoke/wm.tn/receive
    …method=post
    …loadAs=bytes (note this is for the response, not the post)
    …data/stream=edidata
    …auth/type=basic
    …auth/user=[user]
    …auth/pass=[pass]
    …headers/Content-type=application/EDI

    So application/edistream submitters would invoke not wm.tn:receive but this receiveX12Stream service instead, which re-types the content and passes it on. Of course one can add in some checks to make sure the content-type is right and do the right thing. Ultimately, wm.tn:receive needs to be able to accept InputStream objects.

    Sorry for the lengthy post. Hopefully this helps someone. It helped me!! :wink:


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 27, 2002 08:32 PM

    Ravi: So if you ever need to support large docs, do your getFile, loadAs stream, and invoke wm.tn:receive via pub.client:http with the content-type set to application/edi. That will give you large doc handling (if TN has been configured to do so).


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed November 27, 2002 08:42 PM

    Rob,

    I discovered what you’re referring to a few months back. I hinted at it when I responded to Sonam’s Ezine but I thought it was me. I spent alot of time trying to get tn.receive to accept the ftp EDI file directly.

    My solution was exactly what you said. I created a service SubmitEDI that has an http in it with the content type set to Application/EDIStream. I map the input object edidata to data/string.

    Chris


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 14.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu November 28, 2002 02:15 AM

    Rob,
    Thats what i am planning to do, set up the trading networks to do large document handling and simply submit the doc to the TN to handle using wm.tn.receive without the http service.

    The Ft
    p serviice get will get file and map the content to edidata and passit directly to wm.tn.receive. I am not going to use the wm.clinet.http for this.

    Regards
    Ravi


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 15.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu November 28, 2002 04:49 AM

    From my testing, you have to go through the http service to do the submission to wm.tn:receive. If you load the file as bytes, you load the entire thing. Since wm.tn:receive can’t accept a stream object directly, you have to go through the pub.client:http service, which will get the content handlers involved and will get the TN large doc handling facilities engaged. My earlier comment that you don’t have to go through http is only if you don’t need large doc handling.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 16.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu November 28, 2002 06:01 PM

    Rob,

    I am able to do the processing i will use http for large document handling as you suggested.

    While processing i found a interesting factor (Interesting and new to me ) While Submitting a EDI ISA envelope with multiple ST SE segments. The TN segregates the SE-ST paisr as individual transaction with ISA envelope around each.

    If there are 10 ST /SE pairs in a ISA envelope then according to my processing rule for the EDI document the processing service gets invoked 10 times. This is fine as it treats each one as seperate transaction

    I am going to proceess this EDI trasaction in a Flow service and publish to the EAI via WMenterprise. The EAI will treat this as individual transaction(each ST and SE pair). Is there a way by which the trnsactions in a ISA be processed together.

    I understant that it is possible to track them using the GS groupid . Is there any way developer/ TN has a functionality to help this.

    Regards
    Ravi


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 17.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 02, 2002 04:06 PM

    Right, TN does the de-enveloping for you all the way down to the transaction set (tset) level. If you want to process all tsets in a group, then hook your processing rule to the group envelope instead of the tset. The challenge here is that you’ll then need to determine which tset you have (810, 201, whatever) and invoke the proper mapping service yourself. A little bit more work but doable using the EDI core services to help.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 18.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 02, 2002 04:24 PM

    Rob,

    I have to write multiple transaction set of the same transaction to a file.

    EDIdata => FileAdapter

    I am doing this using the tset itself but trying to figure out the end of the processing of all the transactions using the wm.tn.view to retrieve the related documents of the particular transaction. Cross verify the related transaction for System status =“Done” or “Done /W Errors” . If all the transaction set have been processed then the flag is set to indicate the end of processing all the transaction and the file is closed.

    Regards
    Ravi


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 19.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 02, 2002 04:36 PM

    Please keep us posted on the results.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 20.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 02, 2002 06:39 PM

    I have written a following flow service to handle the document procesing status and it works in the developer tool.

    input : bizdoc–> internalid

    1. wm.tn.doc:view (get the related docs)

    find the ISA envelope using the doc:view to find all the ISA sets of a file.

    After getting all the ISA enveloep id pass through doc.view to retrieve the the Groupid and then the transaction document using the document internal id i find the systemstatus of the document if it is anyone of the status other then DONE/ DONE W/Errors then i set the processing flag to true else set it to false.

    But Rob i am facing a problem if i exceute the service from the devleoper then it works if i execute the same service as a processing rule thriugh TN it does not execute.

    Is there any ACl restriction when invoking as service.

    Regards
    Ravi


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 21.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 02, 2002 08:20 PM

    Can you share the details of your processing rule?


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 22.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue December 03, 2002 03:27 PM

    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


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 23.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 04:36 PM

    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


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 24.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 06:47 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 25.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 07:17 PM

    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


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 26.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 08:23 PM

    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?


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 27.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 08:51 PM

    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.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 28.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon December 09, 2002 09:18 PM

    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.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 29.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue December 10, 2002 07:02 PM

    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!


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 30.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue December 10, 2002 08:31 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 31.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed December 11, 2002 03:00 PM

    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.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 32.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed December 11, 2002 05:14 PM

    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?


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 33.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed December 11, 2002 05:56 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 34.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed December 11, 2002 08:00 PM

    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?


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 35.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu April 24, 2003 04:28 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 36.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu April 24, 2003 06:04 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 37.  RE: Processing multiple EDI ISA segments in a single file

    Posted Fri June 27, 2003 09:08 PM

    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


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 38.  RE: Processing multiple EDI ISA segments in a single file

    Posted Fri June 27, 2003 10:27 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 39.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon June 30, 2003 03:01 PM

    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


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 40.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon June 30, 2003 03:34 PM

    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.


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 41.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon June 30, 2003 03:57 PM

    Hi Chris,
    I tried to run it but the template is not there and I get no return values. I am not sure how it is going to work if there is only one ISA segment? That was my problem, my ISA segment was a record if there was only one instance of it in the file. If there was multiple it worked as expected.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 42.  RE: Processing multiple EDI ISA segments in a single file

    Posted Mon June 30, 2003 05:38 PM

    Ramyee,

    I’m assuming this is inbound EDI. if so are you using TN? I’m not understanding your need for the template on the EDI file. If you have TN your rule should be at the Envelope level. Then only one ISA at a time is passed to your service.

    Maybe you could provide a little more detail as to the approach you’re taking.


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 43.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue July 01, 2003 12:23 PM

    Chris, You are correct this is an inbound po. I am using TN but version 4.6 does not have any capabilities to accept flat files. I am processing these files via the edi adapter. My procedure reads as follows: I am getting files from the customer’s server via ftp. I then loop on these files and convert them to idata objects. Afterwards I route them to TN where they are recognized and processed.
    Because the file I am retrieving from the customers server can have multiple envelopes (due to appends), I need to loop off of the ISA as well as the ST’s per ISA.
    Hope this help clarify my situation.
    Thanks


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 44.  RE: Processing multiple EDI ISA segments in a single file

    Posted Tue July 01, 2003 06:54 PM

    Raymee,

    Please review the X12ToValues service in the wmEDISample package.
    Also review this link it answer your question.
    [url=“wmusers.com”]wmusers.com
    You are doing more work than you need to. Let TN do the work for you.

    When TN receives a file with multiple ISAs in it. TN will post one document with the sender/receiver as unknown. Then it will post the individual ISA envelopes with the correct sender/receiver . For example if you you receive a file with 3 ISAs in it. TN will post 4 files to TN 1 for the entire file and 3 for the individual envelopes.

    Good Luck!


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 45.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed August 20, 2003 10:40 PM

    Hi Rob,
    I am having problems when working with 2 ISA’s segments within one post to TN. TN behaves correctly and splits the document out correctly but when the service executes (which is attached to the X12 Envelope) the first ISA processes but the second does not. The service that executes has the following subset of commands:
    connectToDB
    startTransaction

    commit or rollback
    clearTransaction
    close

    The error that I am receiving via the throw error states
    "Already in Transaction "
    How can this be if the service is executing by envelope. In my example there are 2 distinct ISA…IEA per post.

    What also has me confused is this only happens when I do a http client post. If I use the ftp to server and pass file onto wm.tn.receive it seems to work.
    Any help will be appreciated.
    Thanks


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 46.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed August 20, 2003 11:25 PM

    My only guess is that the first time through the service that the transaction is in fact not cleared.

    This is just a shot in the dark–You might try configuring the processing rule to run asynch.


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 47.  RE: Processing multiple EDI ISA segments in a single file

    Posted Thu August 21, 2003 09:52 PM

    Hi Rob,
    For some reason it appears as if WM is treating the seperate service executions as the same thread.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 48.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed October 22, 2003 01:34 PM

    Hi All,

    I am working on a TRADACOMS ORDERS message. Its a mapping from the
    TRADACOMS format to User defined Application Format.

    What I found in the input file provided to me was that it had the
    following sections i.e ORDHDR, then the ORDERS, then the ORDTLR. But
    when I went through the TRADACOMS specifications I found that these
    are three different message sets. But the input file supplied to me
    has all the three messages together.

    How do I code this map? I am using GENTRAN Server and Application
    Integration for mapping. So when I build a new map I am selecting
    ORDERS but what about the ORDHDR and ORDTLR messages that is also
    included in the input file? How do I translate that? Do I have to
    create three separate maps? Or is there any way to process three
    message sets at one time.

    Please advise as this is the first time I am working on TRADACOMS.

    Thanks,
    Nirajess


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 49.  RE: Processing multiple EDI ISA segments in a single file

    Posted Wed January 28, 2004 02:56 PM

    Hello all,
    can you explain me how to create a EDI document for an exiting text document.
    also how can we apply the flat file schemas, while preparing the EDI document.
    If possible explain me in steps.
    If any one have the clear picture for that explain me.
    by
    G.Lokanadh


    #edi
    #Integration-Server-and-ESB
    #webMethods