Enabling the application for the connector

You must set up the event notification mechanism in the 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, it is recommended 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.

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 EventOrderBy property to specify the order of events to be processed. For information on these and other configuration properties, see Appendix A, Standard configuration properties for connectors and Table 6.

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.

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 the checking for the existence of event and archive tables, disable the CheckForEventTableInInit by setting its value to false. By default, it is true. It is recommended that the value not be set to false.

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

SQL scripts for installing the event and archive tables

The scripts to install the event, archive, and unique identifier tables for an Oracle database are:

These files are located in the following directories:

UNIX:

connectors/Oracle Applications/dependencies/
 

Windows:

connectors\Oracle Applications\dependencies\
 
Note:
These scripts are provided only as a template to assist you in creating the required tables for the connector. For other databases, please create your scripts using these as guidelines. The order and data type in the table columns is very important. Please refer to Table 4 to view the correct order and type.

It is recommended that the DBA or person implementing the connector modify these scripts to meet specific installation and query optimization requirements. For example, these scripts do not create indexes on the tables. It is the responsibility of the person implementing the connector to create indexes to enhance performance with the query optimizer.

Event and archive table schema

Table 4 describes the columns in the event and archive tables.

Table 4. 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. The object key can be represented as a name_value pair, or as a set of keys delimited by a colon or other configurable delimiter (for example, 1000065:10056:2333).

See the EventKeyDel 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 the integration broker) INTEGER Not null

-1 (Error processing event)


0 (Ready for poll)


1 (Sent to the integration broker)


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