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

Catch different type of exception in catchStep

  • 1.  Catch different type of exception in catchStep

    Posted Thu December 18, 2003 12:14 AM

    I use the Integration tool (Version 4.6) generated following catchStep in my script. Unfortunately, severally exceptions that I experienced are not type of AdapterException, and the code in the catch branch does not got processed.

        try { 
    publishAndWaitStep();  
    catchStepTry(); 
    } 
    catch (AdapterException catchStepEx) { 
    myErrorRotine(); 
    catchStepCatch(); 
    } 
    

    I know if I change the exception type in the try statement to catch class of “Exception”, the program will do what I want. However, the Integration tool doesn’t like the “Exception” type in the try statement, and gives me a compilation error.

        try { 
    publishAndWaitStep();  
    catchStepTry(); 
    } 
    catch (Exception catchStepEx) { 
    myErrorRotine(); 
    catchStepCatch(); 
    } 
    

    I know I can write a customStep to implement above code. However, the downside of writing customStep, is the input and output variables are not visible in the entire script, and make the maintenance a nightmare. Is there anyone knows how to fix or work around this problem?

    Thanks,

    Jake Lee
    Jake_Lee@kingston.com


    #Universal-Messaging-Broker
    #webMethods
    #broker
    #Integration-Server-and-ESB