Multiple ST/SE transaction in single Envelope.

Hi Experts,
I am getting multiple transaction in a single envelope as an input. Our Organisation is not using TN. I am using Service wm.b2b.edi:envelopeProcess as initial service for parsing the envelope part. After looping ISA,GS and ST part i am using wm.b2b.edi.util:getEDIstring service which will process UnDefData and then i am using wm.b2b.edi:convertToValues for parsing the ST/SE transaction. But the output of getEDIstring service is coming with something different. In the ST segment i am getting BGN part also with “\r” delimiter which should come in the next line (ST^142^0001\rBGN^00^478354145^20161125^102839^ET). Due to this BGN part is not coming in the Doc type and it is getting error since its a mandatory part. After digging into getEDIstring i got to know that it is adding Header part and trailer part with the Delimiter and in the delimiter its coming “\r” as record, “^” coming as field and “|” as subfield. I did not put any delimiter and it came by default during pasing. I have run the Schema directly with the same input and that time everything is coming as expected.

Please help me out how to process so that parsing should not fail.

Thanks in advance.


After the envelopeProcess step outputs Values you should be implicitly map Values to the getEDIstring service and still you get UnDefData?

Also can you make sure your edidata/file have the delimiters as appropriate or can you change to the standard record delimiter as ~ (tilde) and try to process the file and see the results?

Let us know how it goes.