1.4 Event Records

GroupWise stores event records in the user's database. Each record stores relevant data about the occurring event. For example, suppose an application creates an event configuration to track deleted items in a user's mailbox and a user deletes an item. The POA deletes the item and creates an event record that has the following fields:

<Event>
  <event type=”EventType"/>
  <id type="uid">
  <sid type="unsignedInt">
  <timeStamp type="xs:dateTime" minOccurs="0"/>
  <field type="string"/>
  <container type="uid"/>
  <from type="uid"/>
  <key type="string"/>
  <uid" type="unsignedInt"/>
  <type type="ItemType"/>
</Event>
event

Describes the event.

id

Uniquely identifies the item.

sid

Short identifier of the item.

--For GroupWise 8.0 HP1 and later.

timestamp

Identifies the time the event occurred.

field

List of fields interested in being notified when they change on the item.

container

Identifies the folder or address book for which the event record was created.

from

Identifies the source folder or address book (used with FolderItemMove). For proxies, this field is the UserID of the user logging in as a proxy.

key

Identifies the application for which the event record was created.

uid

Uniquely identifies the event record.

type

Item type of the item affected.

An event record is not created unless you specifically add the event type in the configureEventsRequest method. For example, if you want to track when new folders are created, you must add the FolderAdd event type when you configure events by calling configureEventsRequest. If you don't add the FolderAdd event type, a configuration record is not created and your application is not notified when a folder is added.

Event records can require large amounts of disk space and significantly impede the performance of processing events on the POA. Therefore, event records need to be periodically removed from user's databases. By default, event records persist in a user's database for seven days, but this persistence value has a range of 0-20 days. You can modify this value by calling the configureEventsRequest method.

Old event records also need to be removed. Event records can be removed in two ways:

  • You can clean up your own event records. We recommend that you clean up your event records as soon as possible. Events can be removed by calling getEventsRequest , removeEventsRequest, or removeItemsRequest.

    An application can remove a list of event UIDs by calling removeItemsRequest and passing events in the container element and the UIDs in the itemRefList element. This is a good way for an application to remove only the events it has processed.

  • The GroupWise POA removes old event records during its nightly maintenance and also disables unused event configurations. The logic for removal and event configuration disabling during nightly maintenance is as follows:

    • Event records older than the persistence date are removed.

    • If an event record is older than the persistence date, the event configuration is disabled.

    • If the event configuration has not been enabled for 21 days, it is deleted.

There can be more than one event record for each event. For example, suppose application A and application B both register to receive event notifications for deleted items for user1. Two separate event records are created in user1’s database, one event record for each registered application. Each application would need to remove its own event records.