> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Object model

> Script restrictions and object model for Custom activity scripting in ABBYY Vantage.

This page describes restrictions on Custom activity scripts and lists the objects and enumerators available in Vantage's JavaScript environment.

## Script restrictions

Vantage's JavaScript interpreter supports ECMAScript 5.1 and selected later features. For more information, see the [Jint ECMAScript features](https://github.com/sebastienros/jint#supported-features).

Scripts can define custom functions, access Vantage data catalogs through the `Context` interface, and send requests to external services through the `Context` interface.

<Note>
  Scripts cannot:

  * Send requests to databases other than Vantage data catalogs.
  * Use third-party libraries such as jQuery.
</Note>

Custom scripts are subject to memory, runtime, command-count, and recursion-depth limits to prevent runaway scripts. If a script exceeds any limit, processing is interrupted with an error. Defaults are set by your server administrator — current defaults:

| Restriction             | Default limit                                                 |
| :---------------------- | :------------------------------------------------------------ |
| Memory                  | 500 MB                                                        |
| Script runtime          | 600 seconds × total number of document pages in a transaction |
| Expressions             | 1,000,000 × total number of document pages in a transaction   |
| Maximum recursion depth | 100                                                           |
| Maximum array size      | 50,000                                                        |
| Maximum HTTP requests   | 200 × total number of document pages in a transaction         |

## Error handling

* If a syntax error is detected in the script, the Custom activity transaction is interrupted. The error is visible in **Skill Monitor**.
* If an exception is thrown while the script runs, both the script and the transaction are interrupted. The error is visible in **Skill Monitor**.
* If a program exception is caught with `try`/`catch`, error handling is whatever your script does.

<Warning>
  Errors caused by exceeding script restrictions are not intercepted. In these cases, both the script and the transaction are interrupted.
</Warning>

## Object reference

### Execution context

* [Context](/vantage/documentation/skill-designer/process/custom-activity/context)
* [Transaction](/vantage/documentation/skill-designer/process/custom-activity/transaction)
* [Parameter](/vantage/documentation/skill-designer/process/custom-activity/parameter)

### Documents and fields

* [Document](/vantage/documentation/skill-designer/process/custom-activity/document)
* [Field](/vantage/documentation/skill-designer/process/custom-activity/field)
* [Page](/vantage/documentation/skill-designer/process/custom-activity/page)
* [Region](/vantage/documentation/skill-designer/process/custom-activity/region)
* [Rectangle](/vantage/documentation/skill-designer/process/custom-activity/rectangle)
* [BinaryFile](/vantage/documentation/skill-designer/process/custom-activity/binary-file)
* [DocumentExportResult](/vantage/documentation/skill-designer/process/custom-activity/document-export-result)

### Classification and validation

* [ClassConfidenceModel](/vantage/documentation/skill-designer/process/custom-activity/class-confidence-model)
* [RuleError](/vantage/documentation/skill-designer/process/custom-activity/rule-error)

### HTTP

* [HttpRequest](/vantage/documentation/skill-designer/process/custom-activity/http-request)
* [MultipartFormDataRequest](/vantage/documentation/skill-designer/process/custom-activity/multi-part-form-data-request)

### Enumerators

* [DataType](/vantage/documentation/skill-designer/process/custom-activity/data-type)
* [FieldOcrType](/vantage/documentation/skill-designer/process/custom-activity/field-ocr-type)
* [ExportFormat](/vantage/documentation/skill-designer/process/custom-activity/export-format)
* [ContentEncoding](/vantage/documentation/skill-designer/process/custom-activity/content-encoding)

### Deprecated interfaces and enumerators

| Deprecated                                                                                      | Replacement                                                                                        |
| :---------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- |
| [InputData](/vantage/documentation/skill-designer/process/custom-activity/input-data)           | [Transaction.Documents](/vantage/documentation/skill-designer/process/custom-activity/transaction) |
| [OutputData](/vantage/documentation/skill-designer/process/custom-activity/output-data)         | [Transaction.Documents](/vantage/documentation/skill-designer/process/custom-activity/transaction) |
| [ExtractedData](/vantage/documentation/skill-designer/process/custom-activity/extracted-data)   | [Document](/vantage/documentation/skill-designer/process/custom-activity/document)                 |
| [ExtractedField](/vantage/documentation/skill-designer/process/custom-activity/extracted-field) | [Field](/vantage/documentation/skill-designer/process/custom-activity/field)                       |
| [FieldType](/vantage/documentation/skill-designer/process/custom-activity/field-type)           | [FieldOcrType](/vantage/documentation/skill-designer/process/custom-activity/field-ocr-type)       |

## Related topics

<CardGroup cols={3}>
  <Card title="Custom activity" icon="code" href="/vantage/documentation/skill-designer/process/custom-activity/custom-activity">
    Extend skills with scripted logic and third-party integrations.
  </Card>

  <Card title="Sample scripts" icon="file-code" href="/vantage/documentation/skill-designer/process/custom-activity/sample-scripts">
    JavaScript samples for OAuth, exports, field updates, and table manipulation.
  </Card>

  <Card title="Context" icon="braces" href="/vantage/documentation/skill-designer/process/custom-activity/context">
    Global object for transaction data, HTTP requests, and secrets.
  </Card>
</CardGroup>
