How to maintains the documents in broker

Hi experts,

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.

how can I implement it?

thanks in advance.


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.

  1. Log the document using audit logging feature into the monitoring database. Now the document will be logged into the database in all error cases.

  2. 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.

  3. Schedule the service to run in a specific interval of time.



Thank you for your reply , did you have some experience on it , could you give me a piece of code about what you have said.

thank you.

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.