none
Exception Handling if SAP port not working RRS feed

  • Question

  • Hi All,

    I am working on project where is pick xml files from network share location and send this to SAP. If SAP port is not working..like SAP server is down. Then how can i resubmit the xml's when SAP port start working.

    I have encorporated Port retry interval. Only thing i want to be prepare if orchestration exhausted after retry interval.

    As a project requirment no manual intervention should be there.

    Pls Advise..how can i modify orchestration

     


    -- Kind Regards Sandeep
    Wednesday, January 19, 2011 12:47 PM

Answers

  • Hi,

     

    1) The simplest way to restart the orchestration is to add a 'loop' shape in it. After the first receive shape (the one with activate=true), add a loop shape. Put inside the loop shape the core process of the orchestration (mapping, send to sap, exception handling, ...). The condition of the loop can be 'while error=true' : in case of an error (catch by the exception handler) the process can be retried. If not, the process ends.

     

    2) Orchestration can be a (very) long running process so they can wait for a very long time. If your SAP is down for a long time, the orchestration can wait. You just have to be careful if many orchestrations are waiting because it can grow the message box size and make your system working very slowly.

     

    3) It is not my advice (Cf. loop shape in the first point). Also, I advise to use the Exception Managment from the MS BizTalk ESB Toolkit : it provides a way to create 'error messages' to envelope message in error and add context information, publish it to an error management portal and resubmit it. If you plan to use BizTalk for many flows in your enterprise, think about a generic way to handle errors.

     

    Bye.


    David GROSPELIER NOVELI MVP BizTalk 2010 dgr@noveli.fr http://blog.noveli.fr
    • Proposed as answer by Dgrospelier Thursday, January 20, 2011 7:25 AM
    • Marked as answer by Sandeep.Handa Thursday, January 20, 2011 8:14 AM
    Thursday, January 20, 2011 7:25 AM

All replies

  • Hi,

    If I understand your architecture, you have a receive location (FILE), a send port to SAP (sapBinding) and an orchestration with a logical receive port (bind to the FILE receive location) and a logical send port (bind to a send port to SAP).

    If the SAP system is down, and the send port retry count exceeded, you can get an exception in the orchestration.

    To do that :

      - Set the property Delivery Notification to 'Transmitted' on the logical send port of the orchestration,

      - Add a scope to the orchestration (Transaction=None and Synchronized=True). The Send shape must be inside the scope

      - Add an exception handler to the scope and catch the exception of type 'DeliveryNotificationException'.

    With this kind of solution, BizTalk will send an ACK or NACK to the orchestration after the execution of the send port. If the send port is suspended, you will receive a DeliveryNotificationException in the orchestration, and you can add your own exception handler code : for example, go back to the beginning of the orchestration and retry the send process or send the message to an error managment mechanism (alerting, tracing, resubmit, ...).

    Bye.

     


    David GROSPELIER NOVELI MVP BizTalk 2010 dgr@noveli.fr http://blog.noveli.fr
    • Proposed as answer by Dgrospelier Thursday, January 20, 2011 7:25 AM
    Wednesday, January 19, 2011 6:38 PM
  • Hi David,

    Thanks for your reply..

    As i am new to BizTalk ..i just like to ask regarding exception handling that:

    1. how can orchestration go back to start of orchestration.

    2. Also i am thinking if SAP port is down for long time say for a day would it be fesiable to restart the orchestration will there be any tradeoff.

    3. Can i drop input xml to the same folder if exception occurs so that  it will be again picked by biztalk..

     

    Pls Advise..


    -- Kind Regards Sandeep
    Thursday, January 20, 2011 6:49 AM
  • Hi,

     

    1) The simplest way to restart the orchestration is to add a 'loop' shape in it. After the first receive shape (the one with activate=true), add a loop shape. Put inside the loop shape the core process of the orchestration (mapping, send to sap, exception handling, ...). The condition of the loop can be 'while error=true' : in case of an error (catch by the exception handler) the process can be retried. If not, the process ends.

     

    2) Orchestration can be a (very) long running process so they can wait for a very long time. If your SAP is down for a long time, the orchestration can wait. You just have to be careful if many orchestrations are waiting because it can grow the message box size and make your system working very slowly.

     

    3) It is not my advice (Cf. loop shape in the first point). Also, I advise to use the Exception Managment from the MS BizTalk ESB Toolkit : it provides a way to create 'error messages' to envelope message in error and add context information, publish it to an error management portal and resubmit it. If you plan to use BizTalk for many flows in your enterprise, think about a generic way to handle errors.

     

    Bye.


    David GROSPELIER NOVELI MVP BizTalk 2010 dgr@noveli.fr http://blog.noveli.fr
    • Proposed as answer by Dgrospelier Thursday, January 20, 2011 7:25 AM
    • Marked as answer by Sandeep.Handa Thursday, January 20, 2011 8:14 AM
    Thursday, January 20, 2011 7:25 AM