Setting Transaction Type Order (Envelope, Group or Transaction)

Hi all,

I was wondering if there is an option to set the ORDER in which the trasactions (Envelope, Group, Transaction) are routed from TN to IS. I noticed that when the split option is set in EDITPA, transactions are being routed in a random order.

I would like to give you the issue in detail. We have a design in place where the documents are received from partners to TN and these are routed to IS gateway service. Split option in EDITPA is set to Transaction. In the IS gateway service, based on the type of transaction (Envelope, Group, or Transaction) there is a custom developed process in which the data in inserted into the custom tables. Inorder to properly insert the data into custom tables, we need to have the transaction types that gets routed from TN to IS to be in order. So, was wondering if there is any option where we can control the order of transaction types (Envelope, Group, Transaction in that order) that gets submitted from TN.

All your suggestions or hints will be greatly appreciated.

Thanks.

Take a look at this item from Advantage: [url]https://advantage.webmethods.com/advantage?targChanId=kb_home&oid=1612482469[/url]

HTH,

Tim

Thanks Tim.

I feel that will really help us resolve the problem. I was checking the wmUsers forum and the advantage forum and I didnt happen to check that…may be it was an oversight. Anyways, i appreciate your prompt response.

The process outlined is funky but interesting (and we shouldn’t have to do that–validation of the interchange ought to happen first so that all groups/tx sets know the validation status). Thanks for the link Tim!

Tim/allwmUsers,

I went thru the process outlined on the advantage site, but i see a problem in that either. It was mentioned to change the user status to “Valid” and reroute the document using wm.tn:reroute. (plz check the reference at the bottom of this post)

If I wasnt wrong, document in here means a Transaction (ex: X12 4010 850). But inorder to use the “wm.tn:reroute” service, it should be provided with the “InternalId” that is generated by TN and is captured in the “bizDocEnvelope” document which could be retrieved only when that transaction (ex: X12 4010 850) is routed from TN to IS.

I wasnt sure if there is any other way to fetch the “InternalID” of a individual transaction while processing Envelope. Please advice me on this.

<<Ref: Advantage site
“If envelope is valid then you can loop over the list of envelopeDocuments (ie each transaction) changing the user status to “Valid” and then reroute the document (using wm.tn:reroute). The 1st rule defined above should now be triggered and only now will the individual - validated - transactions be processed”

Thanks

“list of envelopeDocuments (ie each transaction)” and you can use “envelopeDocuments” instead of “editn_env” variable.

what i understood from above is in your IS gateway service the input will be envelopeDocuments (list that will have ORDERS transaction see if this has InternalId wrapped like in bizdocEnvelope) instead using editn_env var.Is this works???

Sorry if i point in wrong way…

HTH,
RMG

rmg,

I dont see the InternalId wrapped in the list of envelopeDocuments unless i wasnt mistaken and i am using “wm.b2b.edi.envelopeProcess” to validate the Envelope. Do you think there is any service that i can use to fetch the InternalId from the “envelopeDocuments” or is there any service that will validate the envelope?

Please advice.

Thanks

May be “envelopeDocuments” nothing but envelopeProcess service…yes this validates Envelope for any compliance errors etc…Can you extract InternalId comes in bizdocEnvelope from pipeline??

HTH,
RMG

It’s funky, it shouldn’t be necessary, but it does work. You’ll find the internal IDs of the individual transaction documents in /envelopeDocuments/groupDocuments/transactionDocuments/docID. I didn’t look into what the envelopeProcess service is doing, but it’s possible you would need to put a wrapper around it to extract the IDs you need before calling it. It can be a little tricky to have one bizdoc in the pipeline while you’re performing operations on others. HTH,

Tim

RMG,
We can extract the InternalID from bizDocEnvelope but it contains only one InternalID (i.e., the TN ID for the document routed from TN to IS…it might be Envelope, Group or Transaction but one at a time)

Tim,

I tried the different options and to my understanding, the envelopeProcess validates the string edidata and returns a document “Values” which contains 'ISA–GS–ST" and i dont think these values contain the InternalID since they are fields generated from the edidata. Please check the “envelopeProcess” when you get a chance and correct me if am doing anything wrong.

Please clarify if i miss something in here and am glad for your prompt responses. I really appreciate your time and help.

Thanks.

When TN invokes your service from a rule while processing an envelope, it will place a Bizdoc and several other variables and documents in the pipeline. One of these is ‘envelopeDocuments’. Based on a quick survey of the envelopeProcess service, it looks like your custom service should extract the content of the Bizdoc, pass it to envelopeProcess, check the outputs and, if satisfactory, loop over the transactionDocuments underneath envelopeDocuments to change the status and reroute them. As I said, if envelopeProcess is doing something unexpected to affect the pipeline contents, you may want to have your service map the doc IDs to a string list to preserve them before calling it.

Tim

wm_TN,

You can probably locate the transaction bizDoc’s by invoking wm.tn.createDocumentQuery and wm.tn.documentQuery as you are looping through the bizDocEnvelope. Everything you need (group ID, document ID, sender, receiver, etc.) should be available in the EDI transaction.

There is a risk of multiple bizDoc’s with the same sender/receiver/group/doc ID’s, so you will want to make sure the documentQuery criteria are specific enough to return only the transaction you are interested in.

Tim, RMG and tillmanm,

Thanks for all your solutions. Will try to work around and will post if i encounter any more issues.

Appreciate all your help.