The event store is a persistent cache where event records are saved until the polling adapter can process them. The adapter uses the event store to track the inbound requests as they make their way through the system. Each time a database record is created, updated, or deleted, the adapter updates the status of the event in the event store. The status of each event is continually updated by the adapter for recovery purposes until the events are delivered to a configured export on the server.
The adapter polls the event records from the event store at regular intervals. In each poll call, a number of events are processed by the adapter. Events are processed in ascending order of priority and ascending order of the event time stamp. In each poll cycle, the adapter picks up all new events. For each new event, the adapter retrieves the value set in the object_key column for the event and then loads the business object that corresponds to the value specified in the object name field. After the object is loaded, the adapter sets the primary key values of the business object based on the value specified in the object_key column. After setting the keys, adapter performs a retrieval of the object based on the keys. The business object or optional business graph is created from the retrieved information and is published to the export.
If you have associated a stored procedure with the Retrieve operation of the business object, you can define the mapping between the input parameters of the stored procedure and the business object attributes (generally, primary keys). If such a mapping is defined, then the adapter sets the input parameters for the stored procedure, invokes the stored procedure, and populates the object based on the results obtained from the stored procedure.
For stored procedures and functions, if you defined a mapping between the input parameters of the stored procedure or function and the business object attributes (generally using primary keys) using the RetrieveSP application-specific information, then the adapter sets the input parameters on the stored procedure, invokes the stored procedure, and populates the business object based on the results obtained from the stored procedure.
When the object_function column has the value Delete, which indicates that the object was deleted, the object is not retrieved from the database. The keys are set on the data object and the business object and optional business graph is created and delivered to the export.
If an event is successfully posted, the entry is deleted from the event store. For failed events, the entries remain in the event store and the event_status column is set to -1. When High Availability Active-Active support is enabled, the event_status column is set to 3, as the events start to be processed.
The table format and content of the event store are described in Table 1.
Column name | Type | Description |
---|---|---|
XID | String | The unique transaction ID (XID) value for assured once delivery. |
event_id | Number | The unique event ID, which is a primary key for the table. This ID can have the same value as the object_key. |
object_key | String | A string that contains keys of the record in the
event store that is retrieved. This column cannot be null. Specify the value as one or more key=value pairs, separated by the semicolon character (;). Alternatively, you can specify only the values for the primary keys separated by the semicolon (;) character. In this case, the values must be specified in the same order as primary keys are defined in the business object. |
object_name | String | The name of the business object or business
graph. The business object (or the business object within the business
graph) can be a hierarchical business object. Each business object
or business graph refers to a table or view. This column cannot be null. |
object_function | String | The operation corresponding to the event (Delete,
Create, Update, and so on). This column cannot be null. |
event_priority | Number | Identifies the event priority. This value must
be a positive integer. This column cannot be null. |
event_time | Timestamp | Date and time when the event was generated. The format is mm/dd/yyyy hh:mm:ss. |
event_status | Number | The event status. This is initially set to the
value for a new event and updated by the adapter as it processes the
event. The status can have one of the following values:
This column cannot be null. |
event_comment | String | Any comment associated with the event. |
connector_ID | String | The unique identifier for the adapter instance that receives a specific event |
event_timeout | Timestamp | Indicates if the event is timed out or not. |