About Event Handler Revisions

The system creates a set of event handler revisions the first time:

  • The event is generated or any of its handlers executes.
  • The event is generated after any of its constituent handlers or their actions has been modified.
  • Any of the event’s handlers executes after any of its constituent actions has been modified.

Modifications can include additions, changes, or deletions to the handlers or actions associated with the event or handler.

When the revision is created, the system copies all of the event's handlers and actions to a read-only table. The event or handler then uses the data in this read-only table when executing the handlers and actions, until a new revision is created.

Revisions are used to ensure that the metadata that is used by an application event and its handlers and actions is not altered while the event is executed. In some cases, it can take the system a period of time to finish executing an event's handlers, either because of the processing time involved, or because the system is waiting for some input or response before it can continue. It is possible that someone could make changes to the event's handlers and actions while the event is processing or waiting, and that these changes could affect the execution of the event that is in progress.

Revisions were developed to address this kind of potential problem. When an event fires, the application event and its handlers use the revisions that are in effect at the time they start executing until they are finished.

Example

You are using an application event to send notices to a manager when a customer order is more than $10,000. The manager must approve the order before it can be processed.

During a transfer of responsibilities from one manager to another, a new manager is assigned the responsibility of approving such orders. The system administrator makes the change of notice to the appropriate event action.

However, the original manager has a few orders pending approval. These orders continue to use the metadata for the revision in effect at the time they were created and await that manager's approval. In the meantime, the new manager receives notices for any subsequent orders, because the first new order generates a new revision using the information for the new manager.