Introduction
It is possible to publish standard events (create, change, or delete) from the LN application.
Normally, when receiving a SubscribeEvent request that includes one or more standard event actions (create, change, or delete), auditing is switched on for the business object’s database tables. The audit trail is automatically populated, so standard events need not be published from the LN application. A publisher will be running to pick up the database changes and publish the corresponding events.
Note that in some cases change events cannot always be detected from the audit trail. For example, if the business object, or some of its subcomponents, are not directly related to LN tables. In such cases, the use of a publisher based on the audit trail for the business object tables can be suppressed. This can be configured in the BII (more specifically, in the on execute hook for the SubscribeEvent method).
Some examples:
- If the BII specifies that no standard publisher must be started for any standard events, the subscription is simply stored and the publisher will wait only for application events. to arrive. Consequently, all standard events must be generated from the LN application.
- If the BII specifies that no standard publisher must be started for the standard ‘change’ event, and a subscription arrives for ‘create’, ‘change’ and ‘delete’ events, then a standard publisher will be started only for the ‘create’ and ‘delete’ events, and the ‘change’ event must be published from the LN application.
This chapter explains how this must be configured (programmed). How to Model this in the BII explains how to model the business interface implementation in the LN Studio. How to Implement this in the Application explains how to implement the publishing of standard events in the application.