locked
Error Handling into EDI Disassembler RRS feed

  • Question

  • Hi

    I have an issue where I need to catch the exception that happen into Receive Pipeline more specific in EDI Disasembler. and send the Error Description and the body of  EDI File (flat file) to another orchestration.

    I tried with one Send port that is suscribed to the Receive port and applied the filter BTS.AckReceivePortName == ReceivePort but this option only catch the Xml with NACK and there I get the Error Descrption. Then...

    I tried other option Activating Enable Routing for Failed Messages in ReceivePort and into Send Port I filter by ErrorReport.ReceivePortName == ReceivePort but this option only catch the original copy from EDI File

    then I tried to combine them both options but doesnt work....

    anyone have any idea?

     

    thanks in advanced

    • Moved by Ben Cline1 Monday, November 30, 2009 5:06 AM Related to EDI (From:BizTalk Server General)
    Wednesday, November 25, 2009 4:07 PM

Answers


  •   Hi Danny,

       Try setting the filter in Send port to:

      ErrorReport.FailureCode Exists
      ErrorReport.ErrorType Exists
      BTS.ReceivePortName = EDI_RecvPortName

      Let me know.

      Thanks,
      SHR
    • Marked as answer by Andrew_Zhu Thursday, December 3, 2009 7:07 AM
    Monday, November 30, 2009 8:47 PM
  • HI,

    This functionality is not achievable and you need to implement out of the box such as custom .net component. Since you are not having orchestration I would suggest you to create an archiving component and which archives the message. There itself you need to call custom exception handler which should be able to club the message and the exception message altogether.

    Regards
    Vishnu
    Vishnu
    • Marked as answer by DannyOcean Tuesday, December 15, 2009 3:49 PM
    Friday, November 27, 2009 10:59 AM

All replies

  • when you use enable routing option, error description will be in the message context so in orchestration you can log those values from message properties.
    here is the list of properties which get promoted for error message
    http://msdn.microsoft.com/en-us/library/aa578516(BTS.20).aspx
    KiranMP
    Wednesday, November 25, 2009 4:59 PM
  • thanks Kiran, let me processing it...
    but if the error occurs into Receive pipeline not even reach the orchestration doesnt it? because the EDI File (flat file) not achieve to convert into xml inside the EDI disassembler and this one cant match with the schema of orchestration... and because of this the orch is suspended right?

    Wednesday, November 25, 2009 10:10 PM
  • Hi Danny,
    You are right. The error in pipeline. Pipeline is part of the "port instance" ("Messaging Instance"). Because the port cannot "produce" amessage the activate subscription for orch cannot work. You've got the suspended message instance not the orch instance.
    You mentioned you "catch the Xml with NACK and there I get the Error Descrption". It is not clear what else do you need.
    Please, give more details what you want.

    Thanks,
    Leonid Ganeline [BizTalk MVP] My BizTalk blog
    Wednesday, November 25, 2009 10:48 PM
  • Hi Leonid,
    Basically I need to catch the error that occurs inside EDI Disassembler and send it to final user (technical user) s/he fix the error and process again the file. the requirment is send the error with format some like this:



    <FileEdi>
    ISA*04*SW426     *00*          *02*MCS            *02*KCS            *091119*0933*U*00401*000000184*0*P*:~
    GS*RW*MCS*KCS*20091119*0933*184*X*005050RAIL~
    ST*426*0184~
    ZR*R*CLC*9780*933855*20090407**KCS**OR~
    DTM*196*20090408*004653*CT~
    BX*00*R*PP*01477432*DQE*L*B*S~
    BNX*A**S~
    N9*BM*01477432**20090407~
    </FileEdi>
    <ErrorDescription>
    Error: 1 (Field level error)
    	SegmentID: BX
    	Position in TS: 4
    	Data Element ID: BX02
    	Position in Segment: 2
    	Data Value: 
    </ErrorDescription>


    what I mentioned in the first post is that I suscribed a SendPort to the ReceivePort(with the pipeline) and into the SendPort was filtered by BTS.AckReceivePortName == ReceivePort.  Then, when the error occurs the SendPort receive the xml of NACK some like this:



    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP:Body><SOAP:Fault><faultcode>Microsoft BizTalk Server Negative Acknowledgment </faultcode><faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring><faultactor>C:\TMP\ISS\IN\*.txt</faultactor><detail><ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"><NAckID>{D5739313-7CEC-4236-B41C-CE458AAEAA1D}</NAckID><ErrorCode>0xc0c016a1</ErrorCode><ErrorCategory>0</ErrorCategory><ErrorDescription>An output message of the component "Unknown " in receive pipeline "KCS.ISS.Biztalk.Pipelines.Rcv_EDIMessage, KCS.ISS.Biztalk.Pipelines, Version=1.0.0.3, Culture=neutral, PublicKeyToken=bb1ddb691bd7a381" is suspended due to the following error: 
         Error encountered during parsing. The X12 transaction set with id '0184' contained in functional group with id '184', in interchange with id '000000184', with sender id 'MCS            ', receiver id 'KCS            ' is being suspended with following errors:
    Error: 1 (Field level error)
    	SegmentID: BX
    	Position in TS: 4
    	Data Element ID: BX02
    	Position in Segment: 2
    	Data Value: 
    	1: Mandatory data element missing
    
    .
     The sequence number of the suspended message is 1. </ErrorDescription></ns0:NACK></detail></SOAP:Fault></SOAP:Body></SOAP:Envelope>


    and inside I get the ErrorDescription. It is almost what I want, but still I need the Income Message, txt or xml dont matter.

    Is there a filter in SendPort that helps to do that or another way?

    thanks in advanced

    Thursday, November 26, 2009 12:05 AM
  • well you should develop orchestration to accept flatfiles by creating untyped messages I am also having same schenario where in if incoming flatfile is in incorrect format I send email to the partner about error and the file biztalk has received
    KiranMP
    Thursday, November 26, 2009 10:32 AM
  • HI,

    This functionality is not achievable and you need to implement out of the box such as custom .net component. Since you are not having orchestration I would suggest you to create an archiving component and which archives the message. There itself you need to call custom exception handler which should be able to club the message and the exception message altogether.

    Regards
    Vishnu
    Vishnu
    • Marked as answer by DannyOcean Tuesday, December 15, 2009 3:49 PM
    Friday, November 27, 2009 10:59 AM

  •   Hi Danny,

       Try setting the filter in Send port to:

      ErrorReport.FailureCode Exists
      ErrorReport.ErrorType Exists
      BTS.ReceivePortName = EDI_RecvPortName

      Let me know.

      Thanks,
      SHR
    • Marked as answer by Andrew_Zhu Thursday, December 3, 2009 7:07 AM
    Monday, November 30, 2009 8:47 PM
  • If you need XML form of your input file, then you can get it.  I just created send port(Error port) with XML transmit and with filter errortype exists. I manually change EDI file to error out and drop in EDI receive port, which has edi receive pipeline.

    The error port caught this error message and sent out the original message as XML message. Obviously, it cannot as EDI file since it failed to transform.

    I think you can achieve this my using orchestration as well and there you can read errordescription property for error message.

    THanks!
    Devaraj

    Saturday, December 12, 2009 2:24 AM
  • I needed a special hotfix to get this functionality....

    Have a look at this thread : http://social.msdn.microsoft.com/Forums/en-US/biztalkediandas2/thread/6618b79a-99fe-4183-9f11-b11837ca08f4

    It fixed it for me.....
    Well0549 Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread
    Tuesday, December 15, 2009 12:10 PM