About the work area events

The events for work areas are more complicated than most of the other events because they deal with more than one vault context. That is, the context of documents that are assigned to a work area is separate from the context of the work area they are being assigned to. The event procedures for work area events are executed in the work area context and have several limitations:

  • You cannot change document properties from these events unless the document is assigned to the work area.
  • You can never change properties in the BeforeAssign event.
  • In the AfterCancel and AfterRelease events, you can only change properties if the document is reassigned to the work area.
  • The global Document object is not available (is Nothing) for the work area events. If a document object is available it is passed as a parameter. This way it is obvious when the Document object can be used.

The events that occur for the work area commands (in alphabetical order) are shown in the following lists in the sequence that they occur.

Assign to Work Area event sequence

  • DocGenericEvent_PrepareCommand
  • DocWorkAreaEvent_InitializeAssign
  • DocWorkAreaEvent_BeforeAssign
  • DocWorkAreaEvent_AfterAssign
  • DocWorkAreaEvent_TerminateAssign

Discard from Work Area event sequence

  • DocGenericEvent_PrepareCommand
  • DocWorkAreaEvent_InitializeCancel
  • DocWorkAreaEvent_BeforeCancel
  • DocWorkAreaEvent_AfterCancel
  • DocWorkAreaEvent_TerminateCancel

Release from Work Area event sequence

  • DocGenericEvent_PrepareCommand
  • DocWorkAreaEvent_InitializeRelease
  • DocWorkAreaEvent_BeforeRelease
  • DocWorkAreaEvent_AfterRelease
  • DocWorkAreaEvent_TerminateRelease

Each of the work area event procedures is described in the following topics.