I want to make a service(called by a trigger) to subscribe a documents from broke, the service will deal with the document he got , and insert/update some information into the database.
my question is , if the service have successful done I wish the broke can clear the document ,if failed(eg,DB broken/shutdown) , I wish the broke can still keep the document and the service can retry the work several times or in a certain time.
You can try the trigger retry limit which can help in transient error conditions but not in service exceptions. You can try the following logic but need some coding.
Log the document using audit logging feature into the monitoring database. Now the document will be logged into the database in all error cases.
Write a service which can check the database for failed documents and resubmit it using publish methods. You may need to understand the monitoring database tables to see how the document is stored in what table and fields etc.
Schedule the service to run in a specific interval of time.
Hi,
in WM 6.1 you can try to use the trigger settings for retry limit (Retries on error, Deliver until property, Retry interval)and the use of the service pub.flow:throwExceptionForRetry (for the flow services) or the use of ISRuntimeException( ) (for the java services).
The IS and the Broker will automatically reprocess the document that caused that error depending on the configuration you gave.