Document History Database
The document history database maintains a history of the guaranteed documents processed by triggers. Integration Server adds an entry to the document history database when a trigger service begins executing and when it executes to completion (whether it ends in success or failure). The document history database contains document processing information only for triggers for which the Use history property is set to true.
The database saves the following information about each document:
Trigger ID. Universally unique identifier for the trigger processing the document.
Document UUID. Universally unique identifier for the document. The publisher is responsible for generating and assigning this number.
Note:Integration Server automatically assigns a UUID to all the documents that it publishes. However, if a service publishes a document to Universal Messaging using pub.publish:publish, you can specify a value for uuid that Integration Server uses instead of generating one.
Processing Status. Indicates whether the trigger service executed to completion or is still processing the document. An entry in the document history database has either a status of “processing” or a status of “completed.”
Integration Server adds an entry with a “processing” status immediately before executing the trigger service. When the trigger service executes to completion,
Integration Server adds an entry with a status of “completed” to the document history database.
Time. The time the trigger service began executing. The document history database uses the same time stamp for both entries it makes for a document. This allows
Integration Server to remove both entries for a specific document at the same time.
To determine whether a document is a duplicate of one already processed by the trigger, Integration Server checks for the document’s UUID in the document history database. The existence or absence of the document’s UUID can indicate whether the document is new or a duplicate.
If the UUID... | Then Integration Server... |
Does not exist. | Assigns the document a status of New and executes the trigger service. The absence of the UUID indicates that the trigger has not processed the document before. |
Exists in a “processing” entry and a “completed” entry. | Assigns the document a status of Duplicate. The existence of the “processing” and “completed” entries for the document’s UUID indicate the trigger processed the document successfully already. Integration Server acknowledges the document, discards it, and writes a journal log entry indicating that a duplicate document was received. |
Exists in a “processing” entry only. | Cannot determine the status of the document conclusively. The absence of an entry with a “completed” status for the UUID indicates that the trigger service started to process the document, but did not finish. The trigger service might still be executing or the server might have unexpectedly shut down during service execution. If a document resolver service is specified, Integration Server invokes it. If a document resolver service is not specified for this trigger, Integration Server assigns the document a status of In Doubt, acknowledges the document, uses the audit subsystem to log the document, and writes a journal log entry stating that an In Doubt document was received. |
Exists in a “completed” entry only | Determines the document is a Duplicate. The existence of the “completed” entry indicates the trigger processed the document successfully already. Integration Server acknowledges the document, discards it, and writes a journal log entry indicating that a Duplicate document was received. |
Note:Integration Server also considers a document to be In Doubt when the document’s UUID (or, in the absence of a UUID the value of
trackID or
eventID) exceeds 96 characters.
Integration Server then uses the document resolver service, if provided, to determine the status of the document. For more information about how
Integration Server handles a document missing a UUID, see
Documents without UUIDs.
For information about configuring the document history database, refer to Installing Software AG Products.