Home Page › Forums › BizTalk 2004 – BizTalk 2010 › FailedMessage Schema?
- This topic has 3 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
July 21, 2008 at 12:42 PM #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.
-
July 21, 2008 at 1:32 PM #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-
July 22, 2008 at 6:03 AM #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
-
-
July 22, 2008 at 10:20 PM #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.
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.