Geeks With Blogs
Ganesh Narayanan's BizTalk Hints MCTS

This has been blogged several times already. I am making this entry here for my reference.

Steps to enable basic ESB 2.0 Exception handling in an orchestration:

  1. Create Multipart message type “Fault” with “Body” of type Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults.FaultMessage
  2. Create new message msgFault with above type
  3. Create Exception Handler sysEx of type System.SystemException
  4. Construct message with following expressions:
//Create Fault Exception Message
msgFault = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
//Set Fault Properties
msgFault.Body.FailureCategory = "Category of failure";
msgFault.Body.FaultCode = "ERROR";
msgFault.Body.FaultDescription = sysEx.Message;
msgFault.Body.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Error;
//Add Message to the Fault Message
Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.AddMessage(msgFault, MessageCreatedOutsideScope);
References to be added:
Posted on Thursday, July 1, 2010 11:31 AM | Back to top

Comments on this post: Simple Biztalk ESB 2.0 Exception Handling

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Ganesh Narayanan | Powered by: