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
Expand all | Collapse all

Guaranteed docs in trigger doc store

  • 1.  Guaranteed docs in trigger doc store

    Posted Wed March 08, 2006 09:38 PM

    Hi All,

    How do we make sure that guaranteed document is not deleted from trigger document store when there is a failure in the service executed by the subscribe trigger. I wanted to reprocess the same document in case of a failure in the subscribe service.

    Env: wm6.1. We are not using Broker.

    Please advice.

    Regards,
    Pauly


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


  • 2.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 02:39 PM

    Pauly,

    See if this service helps: pub.flow:throwExceptionForRetry. It’s documented in the Built-In Services Guide. If you use it, make sure you code your service in a manner that will not cause infinite loops (ie. use throwExceptionForRetry conditionally. ex.: IF retry count < MAX_RETRY THEN throwExceptionForRetry)

    • Percio

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


  • 3.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 03:24 PM

    Thanks Percio. I do not want to loose the data from trigger store even if the processing service failed after max retry. Any more ideas?

    Regards,
    Pauly


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


  • 4.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 03:53 PM

    throwExceptionForRetry is the answer that most use. You need to construct your flow services so that this is throwned outside of your normal try/catch. It will allow the trigger to resubmit automatically the document for processing. Your trigger settings will determine how long the retry will attempt, you can do a few attempts or until successful.

    You would only want to trap non-logic related errors in this retry attempt otherwise you will end up in a loop that you can’t get out of. Non-logic would be database not available, web server not available etc. Bad data or bad logic should not trigger this.

    If you have a need to resubmit a document that failed because the data is incorrect or the logic is incorrect then you should consider using WmMonitor and auditing. You can set this for success and/or failure and preserve the input pipeline. An important note about this: If you very high transaction volumes, auditing the service will give you a performance hit.


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


  • 5.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 04:10 PM

    Pauly,

    Like Mark said, if you don’t want to lose the data, you can set your audit settings so that the exception is logged to the Monitor database along with the pipeline. You will then have to login to the Monitor to reprocess the data.

    One other approach that I have used is that assuming you’re dealing with a transient error that can be fixed on the target system or will fix itself over time, you can suspend the trigger and then resume it once the problem has been fixed. This is helpful in that you don’t get a ton of errors being written to the Monitor and you don’t have to go manually reprocess each one of them.

    The resume and suspend services are in the pub.trigger folder of the WmPublic package. These services are available in 6.5, but there’s also a fix for 6.1 that installs them.

    • Percio

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


  • 6.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 05:46 PM

    Thanks Mark and Percio.

    Wouldn’t Exit with failure in the catch block of the service, do the retry even if I set Retries on error/Max attemps value for the trigger?

    Do I have to use throwExceptionForRetry only for this? If yes, do I have to use it outside the catch block?

    Regards,
    Pauly


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


  • 7.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 05:59 PM

    No exit on failure will not cause the service to retry. The runtime engine of the IS server is looking for a specific type of error to engage the retry capability. It is called a system exception instead of the more common service exception. Your exit on failure will bubble up as a service exception and will not engage the retry capabilities.

    The throwruntimeexception must be done outside of your try/catch sequence. You can catch the error in your catch block and then pass it to your steps outside of the catch to evaluate it and see if a throwruntime is warranted.

    Seq (exit on success)
    Seq(try) (exit on failure)
    Seq(catch) (exit on done)
    branch on error
    throwruntime(if it matches critirea)
    or just exit


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


  • 8.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 06:06 PM

    I should add that the JDBC adapter throws the type of exception for connection oriented or transient failures that you are looking for ie the system exception instead of the service exception. All of the Integration Server adapters don’t do this so you will need to evaluate the error message thrown by the adapters for these transient errors. Ie the http client doesn’t through a system exception when it cannot connect to a web server instead it returns a 40x status code within a variable back to you. Each adapter, service, built client etc behaves a bit differently so you will need to evaluate each one that your are using to figure out how to react to the types and formats of the errors returned for transient failures.


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


  • 9.  RE: Guaranteed docs in trigger doc store

    Posted Thu March 09, 2006 06:17 PM

    Thank you so much Mark. By the way I am using JDBC Adapter.

    Regards,
    Pauly


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