Save pipeline when trigger retries exceeded?

Hi.

I have a service that’s called by a trigger, which throws an exception for retry if there’s a problem connecting to our database. The trigger will retry for the configured number of attempts.

What I’d like is, after the final attempt, for the pipeline to get written somewhere so that an admin can manually resubmit it.

Any advice on how to achieve this?

Thanks.

Hi,

on error, just invoke another service to alert the admin.

regards,
srinivas.

But I only want to do it after the last retry.

Can the service invoked by the trigger know that it won’t be retried?

Hi,

You can use monitor to resubmit the failed service.

Thanks - that is something I will investigate. My client currently does not have Monitor installed, and they’re logging to the filesystem rather than the DB.

I’d welcome suggestions for what to do if they’re unwilling to install Monitor.

Other way is instead of performing database operation in trigger service itself, create another service called processTriggerService which does all your database operations. Code your trigger service to map incoming document to a temporary canonical and route this temporary canonical to trading network.

TN processsing rule for this routed document will invoke processTriggerService service. This way you can maintain and track the status of the trigger retry and reprocess the document in case something goes for toss.

Jiten

You can use pub.flow:getRetryCount service to find out retryCount and maxRetryCount which can be used to identify the last retry attempt using %retryCount% = %maxRetryCount% condition. When this condition met, you can do savePipeline or required functionality to store transactional data for furhter resubmit.