BlueCielo Meridian Enterprise 2012 VBScript API Reference | BlueCielo ECM Solutions

You are here: Understanding Meridian event procedures > Understanding the order of events

Understanding the order of events

Most of the event procedures consist of four types for each event:

Within a single event, the event procedures are invoked in the above order. The Initialize and Terminate procedures are invoked once each for the entire batch and for most of the events only the Vault object is available. The Before and After procedures are invoked once for each object (document, folder, work area, and so on) affected by the event and during these events, the affected objects are available.

The command a user executes may also involve more than one type of event. The following example lists the NewDocument and CalculateFileName events and the order in which they occur when a new document is created:

  1. DocGenericEvent_InitializeNewDocument
  2. DocGenericEvent_InitializeCalculateFileName
  3. DocGenericEvent_BeforeNewDocument
  4. DocGenericEvent_AfterNewDocument
  5. DocGenericEvent_BeforeCalculateFileName
  6. DocGenericEvent_AfterCalculateFileName
  7. DocGenericEvent_TerminateCalculateFileName
  8. DocGenericEvent_TerminateNewDocument

The preceding example is a relatively simple one in which all of the events are in the DocGenericEvent category and only one document is involved. In the following example, events in the DocGenericEvent and DocCopyMoveEvent categories occur in the order listed when a batch of documents (some of which might have references) is copied:

Before the batch of documents is processed:

  1. DocCopyMoveEvent_PrepareCopy
  2. DocCopyMoveEvent_InitializeCopy
  3. DocGenericEvent_InitializeNewDocument
  4. DocGenericEvent_InitializeCalculateFileName

For each source document in the batch:

  1. DocCopyMoveEvent_BeforeCopyWithReferences (if the source document has references)
  2. DocCopyMoveEvent_BeforeCopy
  3. DocCopyMoveEvent_AfterCopy
  4. DocCopyMoveEvent_BeforeCopy (for each reference of the current source document)
  5. DocCopyMoveEvent_AfterCopy (for each reference of the current source document)
  6. DocCopyMoveEvent_AfterCopyWithReferences (if the source document has references)

For each destination document (copy made) in the batch:

  1. DocGenericEvent_BeforeNewDocument
  2. DocGenericEvent_AfterNewDocument
  3. DocGenericEvent_BeforeCalculateFileName
  4. DocGenericEvent_AfterCalculateFileName

After the batch of documents has been processed:

  1. DocGenericEvent_TerminateCalculateFileName
  2. DocGenericEvent_TerminateNewDocument
  3. DocCopyMoveEvent_TerminateCopy

These same events occur when documents are moved, derived, or replaced but with the corresponding events (DocCopyMoveEvent_InitializeMove, DocCopyMoveEvent_BeforeMove, and so on) instead of DocCopyMoveEvent_InitializeCopy, DocCopyMoveEvent_BeforeCopy, and so on. The only difference is that the source and destination documents are the same document.

Related concepts

Understanding Meridian event procedures

Understanding the names of events

Understanding batch events

Related tasks

Creating and editing event procedures

Limiting events generated by VBScript

Related information

The Meridian API constants

 


Copyright © 2000-2012 BlueCielo ECM Solutions

www.bluecieloecm.com