FailedMessage Schema?

Home Page Forums BizTalk 2004 – BizTalk 2010 FailedMessage Schema?

Viewing 2 reply threads
  • Author
    Posts
    • #20192

      Is there a schema for the FailedMessage that gets created when Routing of failed messages is turned on?

      I’m
      trying to send myself an email when any errors occur in my system. I
      get the email, but there is no useful info. The original message is
      attached, but I don’t have any information about why the error occured.

      I’ve tried doing xpath queries into the FailedMessage (XmlDoc), but I don’t get anything back. For example: sbEmailBody.Append(xpath(msgFailedMessage, “string(//[local-name()=’Description’])”));

      If there is a schema for the FailedMessage type, which I’m assuming there is, I can directly access these nodes.

    • #20194

      Biztalk does not change the content when it produces the failed message. It is only the message context that is changed.
      All the information is in the message context properties:
      http://msdn.microsoft.com/en-us/library/aa578516.aspx

      • #20205

        Thanks Greg,

        I saw that MSDN article before, I think I was just over-complicating my code. For those of you who don’t know, there is a way to check if a Promoted Property exists or not, which is extremely useful in this case:

         

        if(ErrorReport.SendPortName exists msgFailedMessage)

        {

            emlBody = msgFailedMessage(ErrorReport.SendPortName);

        }

        else if(ErrorReport.ReceivePortName exists msgFailedMessage)

        {

            emlBody = msgFailedMessage(ErrorReport.ReceivePortName);

        }

         

        Here is an MSDN article, which lists the rest of these awesome operators: http://msdn2.microsoft.com/en-us/library/aa561847.aspx

    • #20216

       

      There are some articles floating around on exception management. See http://biztalkhotrod.com/default.aspx , the recent issue has a article about exception management and the enabling of tracking on receive / send pipelines and creating a fault message for orchestrations. There are different schemas for the receive and send pipeline error messages, and the orchestration fault message is custom created. Check out the article, it is a solid approach for exception management.

       

       

Viewing 2 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.