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

How to Implement Retry Mechanism using throwExceptionForRetry service in trigger and trigger service

  • 1.  How to Implement Retry Mechanism using throwExceptionForRetry service in trigger and trigger service

    Posted Thu March 01, 2012 03:29 AM

    Hi All,

    Please any one reply me with steps how to Retry Mechanism using throwExceptionForRetry service in trigger and trigger service.

    Please explain me briefly development steps and property values for trigger and trigger services.

    Thanks and Regards,
    Anil Kumar Ellendula


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How to Implement Retry Mechanism using throwExceptionForRetry service in trigger and trigger service

    Posted Thu March 29, 2012 12:40 PM

    Hi Anil
    If you want the service to retry only for a specified number of times, you need to set the number of retries in the trigger properties and the duration after which each retry should happen. In this case you need to set one of the properties as retry until max attempts reached.
    In your trigger subscribing service u need to take a variable(retry) and set it as ‘false’ as the first step in your try block. In your catch block you need to retrieve the current retryCount and maxRetries from trigger properties by using wm public service pub.flow.getRetryCount. Also, you need to write a logic to set this variable(retry) as true when the retryCount is less then maxRetryCount in your catch block. When retryCount = maxRetryCount , invoke/implement your error handler.
    In the finally block you need to invoke throwException for retry only when variable(retry) is = ‘true’. if you are doing clearPipeline do remember to preserve the same.

    Regards
    Anuj


    #webMethods
    #Integration-Server-and-ESB