Extracting the delimiters from the edi

Hi,

I’m getting a bizdoc variable from the TN and mapping some data from the bizdoc to an internal format document.can anyone tell me how to get the delimiters from the original EDI doc?

Thanks in advance…

ramesh

could anyone help me on this issue?

ramesh

ramesh,

Is the edidata string available? Can you describe the process flow or provide an example?

Dave

Dave,

The Edi doc is sent to the TN and the processing rule executes a service.i specified the input specification as wm.tn.rec:ProcessingService which has the bizdoc variable,sender summary and the receiver summary.now i want to pass the EDI doc delimiters to the internal format document.

ramesh

I’m doing this from memory so I may be off a bit.
The specification should be wm.tn.rec.bizDoc.
See this thread [url=“wmusers.com”]wmusers.com
You will then find a number of idata objects in the pipeline.
One will be ICValues which will have the structure of your EDI document ISA to IEA. In there will be structure call @delimiters which will hold the delimiter values.

HTH

Chris,

There is no ICValues object in the pipeline when EDI doc is passed to the TN, and there is no variable in the bizdoc envelope where in i can get the delimiters.

ramesh.

Did you change the specification?

chris,

i’m still using the wm.tn.rec:ProcessingService specification.
Can you tell me which field holds the delimiters?
ramesh.

The delimiters are not identified in the bizdoc. After calling bizdocToRecord boundNode/ST/@delimiters holds the delimiters.

Rob,

when i call the bizdocToRecord service,i pass in the bizdoc variable as input and i am getting an empty boundNode document.there is nothing underneath it.can u tell me how to do it?

Thanks
ramesh

Use the Wm EDI documentation to double check that all the setup for establishing EDI document types within IS have been successfully completed.

Rob,

I have got the delimiters by parsing the EDI string using the substring function, but now i have to get the Transaction type,version and standard of the EDI doc.can you tell me how to get them without using the bizdocToRecord service?

ramesh

You shouldn’t parse the EDI string yourself. You should focus on getting bizdocToRecord working, which does the parsing. Make sure you’re using the bizdocToRecord service that is in the WmEDIforTN package, not the standard TN bizdocToRecord.

Rob

I am using the bizdocToRecord service from the WmEDIforTN package,even then it is throwing the following exception:

com.wm.ff.parse.StorageException: [FFP.0015.0005] Specified an invalid schema EDIFFSchema.X12.V4010:T%transactionName%, is not a Flat File Schema.

and when i see the EDIFFSchema folder, the schema exists.
and when we call the bizdocToRecord service, we never specify the schema.if i am not wrong, it actually matches the schema when it comes from the TN
I know that we should’nt parse the EDI string to get the delimiters but there is no other solution i could find.and one more problem is i want to get the transactionName,version and standard.

Can you tell me how to do this or any other solution to get this done.

Thanks
ramesh

Ramesh,

When you do the envelopeProcess on edidata string you will see the delimiters record in the pipeline,so extract the required delimiters from the pipeline.

HTH,
RMG

wm.b2b.editn:bizdocToRecord will give you all of those details.

The wm.b2b.editn:bizdocToRecord service is a flow service, so you can look at exactly what it is doing.

The error you’re seeing:
com.wm.ff.parse.StorageException: [FFP.0015.0005] Specified an invalid schema EDIFFSchema.X12.V4010:T%transactionName%, is not a Flat File Schema.

indicates that “transactionName” doesn’t exist in the pipeline. The second step of the service determines the “standard”, “version” and “transactionName” of the document using the TN document type name. bizdoc/DocType/TypeName holds the TN doc type name. As an example, a doc type of “X12 4010 810” will return standard=X12, version=4010 and transactionName=810.

The pub.flatFile:convertToValues step uses these variables to define the ffSchema input using “EDIFFSchema.%standard%.V%version%:T%transactionName%” and variable substitution.

What’s odd is that standard and version are clearly substituted, but transaction name is not. I’m not sure what would cause that behavior. Best bet is to set things up so you can step through this service to see the value of bizdoc/DocType/TypeName, what getDetailFromTypeName returns, and so on.

HTH

RMG: since Ramesh is using TN and EDI for TN, there is no need to use the envelopeProcess. Deenveloping occurs under the covers. bizdocToRecord is the service Ramesh needs and once things are set up to get that working, all the data desired will be available in the pipeline.

In my experience, the parsing error occurs when invoking bizdocToRecord at the group level, rather than at the transaction level. If you invoke it in a processing rule for, say the X12 4010 850, rather than the X12 Group or Envelope, then, as Rob says, all the needed data should be available in the pipeline.

ramesh,
Let me back you up a second so I can get a handle on some of the basics of your setup. The key I saw in your post is the error you just identified indicating that bizdocToRecord could not identify the transaction name.

Is the X12 doctype that you are translating setup completely in TN. In other words go to the doctypes and see if this document is listed there and in an active/enabled status an example would be X12 4010 850. Make sure it is enabled.

Next save and restore your pipeline and check the bizdoc and let me know what is in the element bizdoc/DocType/TypeName. TypeName is used in the service wm.b2b.editn:getDetailFromTypeName where the transactionName is determined.

The last thing I am looking for is EDIFFSchema.X12.V4010:T850 do you see a schema similar to this example for the document you are translating in the WmEDIforTN package?
Thanks,
Dawn

Rob,

I totally understand that he is routing the edi via TN,but since he is not able to pass thru the bizdocToRecord service,i told alternative method for extracting delimiters etc…may be he is missing something as users mentioned above.Ramesh pls make sure as Dawn mentioned above incase debugging the pipeline info helps.

HTH,
RMG