Skip to main content
Version: v4.5

Script execution overview

Object Model API or orchestrator script executions are managed by a script manager and executed by a script worker. With an orchestrator or an Object Model API script execution request, the following data flow occurs:

Figure: Script execution data flow

CalloutDescription
1An incoming Object Model API or orchestrator script execution request is queued to run and a script execution job request is sent to the script manager.
2The script manager's scheduler checks for script execution jobs in its jobs table. If a job is available, it checks for an available script worker. The script manager communicates and sends data to the script worker.
3The script worker receives a script execution request from the script manager and executes the required script. The script worker returns response data to the script manager.
4The script manager returns the response data from the executed script to the orchestrator or Object Model API.
5The script manager requests the script worker logs.
6The script worker sends the script execution logs to the script manager.

Script content considerations#

When you create a script that you want to execute in the Script Execution Service, the JavaScript syntax differs slightly from the syntax of a regular Script in the Item Service.

For more information, see Script content considerations.

Memory limits and stream processing#

For tasks that require more than 100MB of memory, stream processing is required. Stream processing involves uploading data to the File Service and download the data from that location when it is required.

For more information, see Script content considerations.

Stream processing model data#

To avoid memory exception errors while importing model data, process all model data imports with stream processing.

Stream processing with scripts#

For the example of a model import using scripts, a script worker that passes model data greater than 5MB should upload it to the file service using a script and instead pass a download link. A script worker that recieves data greater than 5MB should download that data from the File Service download link to the script worker using a script to do so.

Configuring an orchestrator to use script workers#

To configure an Orchestrator to use script workers for script execution, set the following Orchestrator attribute:

_schemaVersion: 2