Search code examples
biztalkedibiztalk-2020

BizTalk EDI - sending body of rejected transaction sets to port


We have an upstream application that will generate at times functionally invalid transaction sets.

I'm trying to push the message bodies of the failed transactions from the interchange and associated 999s to a send port or some other logging mechanism, while forwarding the valid transaction sets to downstream mapping process.

Any ideas on accomplishing this would be helpful.


Solution

  • First check "Enable Routing for failed messages" on the Receive Port

    Then add a filter to your send port to subscribe to those messages.

    e.g.

    ErrorReport.ReceivePortName = <your port name> AND
    ErrorReport.FailureCode Exists
    

    If you have an existing filter you need to have an OR on the last line of that filter.

    <existing filer line1> AND
    <existing filer line2> OR 
    ErrorReport.ReceivePortName = <your port name> AND
    ErrorReport.FailureCode Exists