Integration Server 10.15 | Publish-Subscribe Developer’s Guide | Publishing Documents | Setting Fields in the Document Envelope | About UUID, EventIds, and Digital Event Services
 
About UUID, EventIds, and Digital Event Services
The UUID is the universally unique identifier for a document (event). Applications rely on the UUID to determine whether or not the application has already received or processed the document. Due to this reliance, when publishing a document to Universal Messaging and Broker, Integration Server ensures that a UUID is assigned to a document, including automatically assigning one if the UUID is not provided. However, for documents published to Digital Event Services, Integration Server does not automatically generate and assign a UUID to the document. Instead, Integration Server relies on Digital Event Services and on the field used as the EventId annotation to provide a unique ID for the document.
The EventId annotation specifies the name of the field that contains the UUID within the document. At publication time, Digital Event Services ensures that a published document contains a value in the field assigned to the EventId annotation.
At design time, you can:
*Assign a field to the EventId annotation to indicate which field in the document or document reference contains the UUID value. You can identify any String field contained in the publishable document type as the EventId annotation with the exception of a field within the _env field. Because the _env field is not mapped to a digital event type definition, you cannot specify _env/uuid as the EventId field.
*Leave the EventId annotation unassigned. That is, do not assign a field to the EventId annotation. Integration Server updates the digital event type definition to add an internal field named _guid that will be used as the EventId annotation.
Note:
The _guid field is an internal field added to the digital event type definition by Integration Server. The _guid field does not appear in the publishable document type.
When building the service that publishes an instance of the publishable document type, you can do one of the following to provide a UUID for the document:
*If you assigned a field to the EventId annotation, provide a value for that field.
*If you did not assign a field to the EventId annotation, you can provide a value for the _env/uuid field. Integration Serveruses the _env/uuid value as the _guid value in the published event.
*Rely on Digital Event Services to generate a UUID by not specifying a value for the field used as the EventId annotation or the _env/uuid field
At publication time, to ensure that a document published to Digital Event Services contains a value for EventId, one of the following occurs on Integration Serveror Digital Event Services
*If the publishable document type specifies a field for the EventId annotation and that field is not null, Integration Server publishes the event, making no changes to the event for the EventId.
*If the publishable document type specifies a field for the EventId annotation and that field is null, Digital Event Services generates a UUID and uses the UUID as the value of the field assigned to the EventId annotation.
*If the field used as the EventId annotation contains an empty string “” and Digital Event Services considers the document to be persistent, Digital Event Services rejects the publish and throws an error stating that a non-empty value must be supplied as the EventId. Integration Serverwraps and rethrows the exception and the publish fails.
Note:
Whether or not Digital Event Services considers a document persistent is determined by the delivery mode assigned to the event type that corresponds to the publishable document type.
*If the publishable document type did not specify a field for the EventId annotation and the _env/uuid field is not null, Integration Server uses the value of the _env/uuid field to populate the _guid field.
*If the publishable document type did not specify a field for the EventId annotation and the _env/uuid field is null, Digital Event Services generates a UUID and uses the UUID as the value of the _guid field in the event.
When a trigger receives an event from Digital Event Services and decodes the event to IData, Integration Server updates the contents of the _env/uuid field with the value of the EventId. This ensures that the document has a UUID that can use for duplicate Integration Server detection.
Important:
Digital Event Services is deprecated. Use webMethods messaging to send and receive events.