Biztalk Exception Handling

Home Page Forums BizTalk 2004 – BizTalk 2010 Biztalk Exception Handling

Viewing 1 reply thread
  • Author
    Posts
    • #21322

      I’m new to biztalk server, I have few question while developing orchestration usng exception handling, like how to catch the exceptions,how to display them and where the exception messages were displayed etc..Can any one help me to solve this problems and I would be grateful if you can help me with different scenarios.

      1. 
      try
      {
       //Req for Web Service
      }
      catch(Exception WebEx)
      {
       //Catch the Web Exception and display
      }
        
      2.
      try
      {

       try
       {
        //Req for Web Service
       }
       catch(Exception WebEx)
       {
       
        //Catch the Web Exception
        throw WebEx; 
       }
      }
      catch(Exception ex)
      {
       //Catch the Web exception if it is thrown by 1-catch block else display some .net expcetion
      }  

       

       

    • #21325

      Add your shapes withing a Scope shape and add exception handlers to the scope.  If you are not catching the exceptions the messages will be suspended by BizTalk and you will have to debug them using the HAT tool.

      If you are using BizTalk R2 then its worth checking out the exception handling framework in the ESB guidance provided by Microsoft.

      • #21326

        Hi Prasanth,

        Thanks for your replay. Please go through my question one more time, I asked how to catch the exceptions, where they

        will be stored like EventLog, how to catch the exception message, how to display and how to store in different

        locations like Eventlog, Databse..

        Can anyone please help me with any example  and I would be helpful if you can explain with different scenarios.

        Thanks in advance for your help,

        Chinnu.

         

        • #21331

          Ok, to be more specific, BizTalk 2006 does not have any build-in features to catch the exceptions and display them to you (other than admin tools/HAT).  That is the reason Microsoft came up with an exception handling framework in R2.  If you are not using ESB then you will have to build your own components similar to that which are available in R2.  

          You need to possibly

          a) develop a .NET component which you can call in all your exception handlers in orchestration, build a fault message and pass it on to the error handler component and persist the message in your required persistence database/logs OR

          b)  design a fault message schema, build the fault message in every exception handler and publish it to the message box.  Have another set of orchestration(s) that will subcribe to the fault message and persrists the message in your persistence database/logs.

          In either of the method, you can build a custom UI (web portal) to read the persistence database and display it in the fashion your project needs.

           

          But i strongly recommend, use R2 if possible.  It has lot of other features than just exception handling (like edit & resubmit etc.).  Taka a look at design and architecture of ESB guidance.

           

          I hope that answers your question.  Guys correct me if i am wrong,.

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