none
Issues processing EDI documents with Trailing Separators in BizTalk 2010

    Question

  • Hi All,

    I am working on an EDI application using BizTalk 2010 and facing issues processing EDI X12 850’s having trailing separators. One of the transactions has the N1Loop1 section with N4 as follows.

    N4*XYZ*IA*51301*~

    When I process this using the EDI Receive pipeline, I get the following error.

    Error: 1 (Segment level error)

                    SegmentID: N4

                    Position in TS: 9

                    6: Segment has trailing delimiter(s) at component or sub-component level

    So to get rid of this error I made the Trailing Separator Policy as Optional and unchecked the ‘Create empty XML tags if trailing separators allowed’ in the Agreement for that relationship. Below is the screenshot.

    Now when I process the same file after making the above changes. I get the following error.

    Error: 1 (Miscellaneous error)

                    5: X12_00401_850\N1Loop1\N4\ The 'N404' element has an invalid value according to its data type.

    I checked the generated xml and this is what I saw.

          <ns0:N4>
            <N401>XYZ</N401>
            <N402>IA</N402>
            <N403>51301</N403>
            <N404 />
          </ns0:N4>


    Apparently an empty N404 node is created even after unchecking the ‘Create empty XML tags if trailing separators allowed’ option. I was hoping that unchecking the ‘Create empty XML tags if trailing separators allowed’ option would work but seems like it does not. I even tried changing the AllowTrailingDelimiters to True in the EDI Receive pipeline properties but that didn’t work either. Changing the X12 Fallback setting didn’t work.

    How do I avoid creating this empty N404 node so that I don’t get any validation errors? Changing the EdiDataValidation property to False in the receive pipeline properties does not seem like a valid option as it would affect other data validations.

    Has anyone faced this before? Am I missing something?

    Any information on this would be highly appreciated.

    Regards,

    Hrishi 

    Tuesday, April 17, 2012 2:33 PM

Answers

  • It worked fine on BizTalk 2010 box as well with the below screen shot settings.

    One difference I see between your and mine setting is that I have not selected any Transaction Type in the ST01 drop down box. When I added a new row and selected Transaction Type as 850, I ran into the same issue as you are running. That is surprising. Can you remove the 850 row to use only default and see if it works. I think possibly it could be a bug when we select transaction type in the drop down box.


    Atin Agarwal

    • Marked as answer by Hrishi 31 Thursday, April 26, 2012 9:14 PM
    Thursday, April 26, 2012 7:16 PM

All replies

  • The first thing I would try is restarting all of your BizTalk host instances to make sure any cached artifacts are reconstructed.

    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Tuesday, April 17, 2012 2:45 PM
  • Hi David,

    Thanks for replying.

    Have tried that too, but didn't work.

    Regards,

    Hrishi


    hrishikesh

    Tuesday, April 17, 2012 2:56 PM
  • First thing will be to apply the latest service pack / cumulative update for BizTalk to make sure we are not running into any known bug.

    For BizTalk 2010, I see the latest is CU4. http://support.microsoft.com/kb/2555976. Apply the lastest CU pack and see if you get the same result.


    Atin Agarwal

    Tuesday, April 24, 2012 7:55 AM
  • Hi Atin,

    Thanks for the reply.

    I downloaded and applied the CU4 for BizTalk 2010 and still get the same error. Now I am thinking of writing a custom pipeline component before the 'EDI disassembler' which would take care of these trailing delimiters before it reaches the EDI disassembler.

    Thanks,

    Hrishi


    hrishikesh

    Tuesday, April 24, 2012 4:53 PM
  • Is it possible for you to post your edi message here? I would like to process it on a Biztalk 2009 server and see the result.

    Atin Agarwal

    Tuesday, April 24, 2012 6:23 PM
  • Hi Atin,

    I used your blog to send you an email. Have sent the sample file to that email id. Should I send it to some other email id? Please do let me know. My email id is hrishikesh.r.mhatre@gmail.com.

    Thanks for helping.

    Regards,

    Hrishi


    hrishikesh

    Tuesday, April 24, 2012 8:22 PM
  • I processed your edi file with the below party configuration on BizTalk 2009 box.

    It got successfully processed without generating the empty <N404 />node.


    Atin Agarwal

    Wednesday, April 25, 2012 6:18 AM
  • Hi Atin,

    Do you have BizTalk 2010? Can you please try that on 2010. The screenshot that you have pasted. I have done something similar on 2010 still it fails. Can you please check if that works on BizTalk 2010, just to confirm that I am not missing something.

    Regards,

    Hrishi


    hrishikesh

    Wednesday, April 25, 2012 2:35 PM
  • It worked fine on BizTalk 2010 box as well with the below screen shot settings.

    One difference I see between your and mine setting is that I have not selected any Transaction Type in the ST01 drop down box. When I added a new row and selected Transaction Type as 850, I ran into the same issue as you are running. That is surprising. Can you remove the 850 row to use only default and see if it works. I think possibly it could be a bug when we select transaction type in the drop down box.


    Atin Agarwal

    • Marked as answer by Hrishi 31 Thursday, April 26, 2012 9:14 PM
    Thursday, April 26, 2012 7:16 PM
  • Hi Atin,

    Thanks a lot for trying that.

    Yes you are right. It works fine when I dont select any Transaction Type(ST01) on the Validation page and use the default.
    I even tried having both the default and the 850 row (screenshot below), but when I refresh and see the configurations
    again. The default row goes off and the 850 row becomes the default row. It wont let you keep the default row like the Local Host Settings section.

    I think the only drawback to this would be we will have to use the same validation settings for all the Transaction Types that we receive from the trading partner. But we should be good with that. 

    Thanks again for all your help.

    Regards,

    Hrishi


    hrishikesh

    Thursday, April 26, 2012 9:13 PM
  • Thats really strange. But nice to know that.
    Thursday, April 26, 2012 9:22 PM