Skip to main content

Script Restrictions

Vantage’s JavaScript interpreter supports ECMAScript 5.1 (ES5) and a few other more modern encoding standards. For more information, go here).
  • Scripts can be used to write custom functions.
  • Scripts cannot be used to send requests to databases other than Vantage data catalogs, access to which is provided using the Context interface.
  • Scripts can be used to send requests to external services using the Context interface.
  • Scripts do not support third-party libraries like JQuery.
Script rules are under restrictions with regard to the amount of memory and processing time they can take up, as well as with regard to the number of commands in the code and recursion depth. This is done to lower the risk of the script becoming unresponsive. If your script rule does not satisfy one or more restrictions, processing will be interrupted with an error. The restriction values are set by the system administrator during the setup of the ABBYY Vantage server. Currently, the default values are as follows:
  • Memory: 500 MB
  • Script runtime: 600 seconds x total number of document pages in a transaction
  • Expressions: 1000000 x total number of document pages in a transaction
  • Maximum recursion depth: 100
  • Maximum array size: 50000
  • Maximum number of HTTP requests that can be carried out in the script: 200 x total number of document pages in a transaction

Processing of Errors

When your script is executed, errors may occur.
  • If a syntax error is detected in the script, the Custom activity transaction is interrupted. A description of the error can be viewed in the Skill Monitor.
  • If an exception is thrown while the script is running, both the script and the transaction are interrupted. A description of the error can be viewed in the Skill Monitor.
  • If the program exception is intercepted using try-catch, the error processing logic depends on the author of the script.
Important! Errors caused by exceeding the script restrictions are not intercepted. In this case, both the script and the corresponding transaction are interrupted.

Object Help

See the following help articles for available objects and enumerators:

Interfaces

Enumerators

Deprecated Interfaces and Enumerators