Hi Quoc Nquyen,
Here is one approach for “throwExceptionForRetry” service.
Sequence(exit on success)
|------Sequence(exit on failure, try block)
|------Sequence(exit on done, catch block)
Sequence(exit on failure, throw exception block)
|----pub.flow:getRetryCount
|----Branch(on retryCount)
|-------retryCount=0(do some thing…)
|-------retryCount=max(do some thing…)
|----pub.flow:throwExceptionForRetry
retryCount=max means the maximum number of times the Integration Server retries a trigger service depends on the value of
the Max attempts property for the trigger.
pub.flow:throwExceptionForRetry service is used to handle transient errors that might occur during execution of a trigger service. A transient error is an error that arises from a condition that might be
resolved quickly, such as the unavailability of a resource due to network issues or failure to connect to a database. The trigger service might execute successfully if the Integration Server waits and then retries the service. If a transient error occurs, the trigger service can catch this error and instruct the server to retry the trigger service by invoking pub.flow:throwExceptionForRetry.(reference IntegrationServerBISReference.pdf)
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services