none
EDI Validation/Exception Handling RRS feed

  • Question

  • Hi,

    I'm trying to determine the best way to handle EDI data errors.  When an EDI data validation error occurs, I would like to write the error information to a file.  I can see the following information in the event viewer, which I am assuming is the XLANGMessage generated when the exception is thrown:

    Error: 1 (Field level error)
     SegmentID: W07
     Position in TS: 12
     Data Element ID: W0702
     Position in Segment: 2
     Data Value: EACH
     7: Invalid code value

    Error: 2 (Field level error)
     SegmentID: W13
     Position in TS: 13
     Data Element ID: W1302
     Position in Segment: 2
     Data Value: EACH
     7: Invalid code value

    Error: 3 (Field level error)
     SegmentID: W07
     Position in TS: 14
     Data Element ID: W0702
     Position in Segment: 2
     Data Value: EACH
     7: Invalid code value

    I have an orchestration that subscribes to the failed EDI messages, but how can I access the error information above in my orchestration?

    Thanks,

    • Moved by Ben Cline1Moderator Monday, January 3, 2011 6:42 PM Related to EDI (From:BizTalk Server General)
    Tuesday, December 28, 2010 5:16 PM

Answers

  • Oops, you are using Xml disassembler. You can still use RIP with XmlReceive too.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 4, 2011 9:54 PM
    Moderator

All replies

  • These all look like schema validation errors which are probably occuring before your orchestration receives the message.

    i think you would need to route the failed message and read the Error context properties in order to output the errors to disk. Here is a link on the Error context properties: http://msdn.microsoft.com/en-us/library/aa578516(BTS.20).aspx

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, January 3, 2011 6:47 PM
    Moderator
  • Thanks Ben, yes I think that is what's happening.  I've gone back and forth on whether to execute the map in the receive pipeline or in the orchestration, trying to figure out which is the best way to handle data errors.  Right now I have it in the receive pipeline.  The map translates from flat file to EDI.  For EDI validation errors, it is working well.  The outbound EDI message fails in the send pipeline, then I subscribe to the Error context properties in my orchestration and I forward that information to an output file so that the data errors can be researched.  The problem I'm having right now is on the inbound schema side for the flat file.  I have the XML Disassembler set to 'Validate document structure.'  If there is a data error in the flat file, however, I'm not getting the Error context properties in my orchestration, presumably because the error occured in the disassembly phase, so no Error message is created.  So--is there a way to catch the exception that was thrown in the receive piepline? 

    Tuesday, January 4, 2011 7:00 PM
  • In the FlatFileDisassemble pipeline component, you specify to use Recoverable Interchange Processing (RIP). With RIP, when there are errors it will not fail in the pipeline but get into the orchestration (in part).

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 4, 2011 9:51 PM
    Moderator
  • Oops, you are using Xml disassembler. You can still use RIP with XmlReceive too.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, January 4, 2011 9:54 PM
    Moderator