How to generate ESB exceptions in BizTalk 2013

1.  Install Microsoft BizTalk ESB ToolKit

Untitled

2. Open ESB Configuration Tool from Program Files with Administrative privileges

Untitled

3. Enter Database server name where BizTalk has been configured. Provide IIS Web Services username and password.

4. Goto ESB BizTalk Applications and Enable ESB Core Component in BizTalk Server. By Enabling this BizTalk configuration tool will create Microsoft.Practices.ESB application for handling ESB exceptions generated by BizTalk application.

Untitled

5. In orchestration add two references :

6. Microsoft.Practices.ESB.ExceptionHandling

7. Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults

8. In Exception block of orchestration assign application specific values to FailureCategory, FaultDescription,FaultSeverity and FaultCode of FaultMessage

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);

9. If ESB Management Console is configured on your machine then you can able to see the fault message in Console. Otherwise check the fault message in Exception Database

Untitled

Untitled

Leave a comment