Enabling the application for the connector

You must set up the event notification mechanism in the application/database before the connector can process event delivery. To do this, you must complete the following tasks:

The sections that follow provide information on creating and configuring the event and archive tables.

Event and archive tables

The connector uses the event table to queue events for pickup. If you have set the ArchiveProcessed property to true or to no value, the connector uses the archive table to store events after updating their status in the event table.

For each event, the connector gets the business object's name, verb, and key from the event table. The connector uses this information to retrieve the entire entity from the application. If the entity was changed after the event was first logged, the connector gets the initial event and all subsequent changes. In other words, if an entity is created and updated before the connector gets it from the event table, the connector gets both data changes in the single retrieval.

The following three outcomes are possible for each event processed by a connector:

If events are not deleted from the event table after the connector picks them up, they occupy unnecessary space there. However, if they are deleted, all events that are not processed are lost and you cannot audit the event processing. Therefore, IBM recommends that you also create an archive table and keep the ArchiveProcessed property set to true. Whenever an event is deleted from the event table, the connector inserts it into the archive table.

Note:
If problems accessing the application database cause the connector to fail while deleting an event from the event table or inserting an event into the archive table, the connector returns APPRESPONSETIMEOUT and is terminated.

Configuring event and archive processing

To configure event and archive processing, you must use configuration properties to specify the following information:

You can also specify a value for the EventKeyDel property to specify the order of events to be processed. For information on these and other configuration properties, see Table 30.

Note:
Creation of the event and archive tables is optional. However, if you specify a value for EventTableName but do not use the connector to poll for events and do not create an event table, the connector times out. To prevent such time-out, leave the value of EventTableName as null (as a string).

By default, the name of the event queue table is xworlds_events, and the name of the archive queue table is xworlds_archive_events.

Note:
If your site will not archive events into the archive table, set the value of ArchiveProcessed to false.

To use the connector only for request processing, use the -fno option when starting it and set the value of EventTableName to null (as a string).

If the driver being used does not support Java class DatabaseMetaData and you want the connector to avoid checking for the existence of event and archive tables, then disable the CheckForEventTableInInit by setting it to false. By default, this property is set to true.

Event and archive table schema

Table 29 describes the columns in the event and archive tables. Use these as guides for creating and installing these tables, taking special note of the order and data type in table columns.

Table 29. Event and archive table schema

Name Description Type Constraint
event_id Internal identifier of the event INTEGER Primary key
connector_id Unique ID of the connector for which the event is destined. This value is important when multiple connectors poll the same table. VARCHAR
object_key Primary key of the business object. Multiple keys can be concatenated with a colon or other configurable delimiter, for example, 1000065:10056:2333. See the DateFormat property for more information. VARCHAR Not null
object_name Name of the business object VARCHAR Not null
object_verb Verb associated with the event VARCHAR Not null

event_priority

Event priority (0 is highest, n is lowest), which the connector uses to get events on a priority basis. The connector does not use this value to lower or raise priorities. INTEGER Not null

event_time

Date and time the event occurred DATETIME Default current date/time (for archive table, actual event time)
archive_time Date and time the event was archived (applies only to the archive table) DATETIME Archive date/time
event_status -2 (Error sending event to InterChange server) INTEGER Not null

-1 (Error processing event)


0 (Ready for poll)


1 (Sent to InterChange Server)


2 (No Subscriptions for the business object)


3 (In Progress). This status is used only in the event table and not in the archive table.

event_comment Description of the event or error string VARCHAR

Copyright IBM Corp. 1997, 2004