Application
The application (CscScriptApplication) object is the object in script to that all application related events and properties are attached. It is placed in the project script sheet and can be addressed by Application.
The events can be divided into events that are available for every module that supports scripting and those that are only related to user interaction in Document Review.
The events that are available for every module are shown the following picture.
The
Application_InitializeScript and the
Application_DeinitializeScript event are bracketing the
events that are controlling the batch processing.
These events are related to the load of a new
Project object and the
initialization of the script engine. Typically this event is designed for the
initialization of variables with a global scope. It can
also be used to control the active language of the project, by default this
language is following the application UI language that can be retrieved by the
property
UILanguage of the
Application object. But it can be set to a different
available language if needed by assigning
Project.ActiveLanguage the desired language. All
language identifers are in the .NET format like
en-US.
The deinitialization of the script engine gets announced by the Application_DeinitializeScript event.
The event Application_InitializeBatch is announcing the processing of a new batch. In case of the user modules this is a deterministic sequence but for server processing this event always introduces the processing of a new or a different batch. For further details please refer to Batch Processing in Server.