IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Exception Handling

    Posted Mon August 11, 2008 10:26 PM

    Hi,

    I have developed one service in which may throw exception at varoius levels. Before i send all these exceptions to client, i want to store all these exception in some variable and once service execution get over, i will send an email. I mean i want to create a collection of exceptions and then will send them in bulk.

    Please advice whats the better way to get this working.

    thanks
    Atul


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Exception Handling

    Posted Tue August 12, 2008 12:56 AM

    There are various ways to achieve this but, the simplest will be to put a try catch around every statement or block you want to catch exception and wrap them. It goes like this

    Flow Detail

    1 SEQUENCE (FAILURE)
    1.1 SEQUENCE (STEP 1 (SUCCESS) - Try / Catch)
    1.11 SEQUENCE (FAILURE - Try)
    Do something here
    1.12 SEQUENCE (DONE - Catch)
    Get last error and wrap it up in a structure
    1.2 SEQUENCE STEP 2 (SUCCESS) - Try / Catch
    1.21 SEQUENCE (FAILURE - Try)
    Do something else here
    1.22 SEQUENCE (DONE - Catch)
    Get last error and wrap it up in a structure

     1.3   SEQUENCE STEP 3 (work with your errors)
    

    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods