How to Generate ESB Exceptions in BizTalk 2013





0/5 (0 vote)
How to generate ESB exceptions in BizTalk 2013
- Install Microsoft BizTalk ESB ToolKit
- Open ESB Configuration Tool from Program Files with Administrative privileges.
- Enter Database server name where BizTalk has been configured. Provide IIS Web Services username and password.
- Go to ESB BizTalk Applications and Enable ESB Core Component in BizTalk Server. Enabling this BizTalk configuration tool will create
Microsoft.Practices.ESB
application for handling ESB exceptions generated by BizTalk application. - In orchestration, add two references:
Microsoft.Practices.ESB.ExceptionHandling
Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults
- In Exception block of orchestration, assign application specific values to
FailureCategory
,FaultDescription
,FaultSeverity
andFaultCode
ofFaultMessage
FaultMessage = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage(); FaultMessage.FailureCategory = “”; FaultMessage.FaultDescription = ex.Message; FaultMessage.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Severe; FaultMessage.FaultCode=” “; Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.AddMessage(FaultMessage, msg);
- If ESB Management Console is configured on your machine, then you will be able to see the fault message in console. Otherwise, check the fault message in Exception Database.