Overview

When subscribing to one or more standard events (create, change, delete) in LN, a publisher is started that will detect the events based on the audit trail and will publish the corresponding event messages.

When subscribing to specific events, the subscription is stored in LN and the publisher will be running, but in fact the subscription is passive. The publisher will not pick up anything until an event triggered from the application.

Events can be published either based on the audit trail or from the LN application.

The following methods exist to initiate an event from the LN application:

  • Using the standard PublishEvent method. In that case the application is responsible for building the request (XML) in accordance with the BDE interface definition. See following section “PublishEvent”.
  • Using the ShowAndPublishEvent method. In this case the application can initiate the event at business object or component level simply by specifying the values for the identifying table columns. The business object runtime will take care of collecting the required data, building the request XML and invoking the PublishEvent method to do the actual publishing. For details, see following section “ShowAndPublishEvent”.
  • Using the ShowAndPublishStandardEvent method. This method is available to publish standard events from the application in addition to (or instead of) publishing them based on the audit trail. This method is comparable to ShowAndPublishEvent, but it cannot be used for application-specific events, but for standard events (create, change, or delete) only. Note that also the PublishEvent method can be used to publish standard events. For details, see following section “ShowAndPublishStandardEvent”.

In theory, the PublishEvent, ShowAndPublishEvent or ShowAndPublishStandardEvent can be invoked from any script or library in the application. Logical places to implement the invocation are for example the data access layer (for events that are related to database changes or execution of a business method) or the user interface script (for events that are linked to a specific form command, for example).

When LN acts as an event consumer, incoming events are processed through the OnEvent method.