Skip to content

Engines

Engines object is used for executing a scripting service programmatically.

Basic Usage

import { engines } from "sdk/platform";
import { response } from "sdk/http";

let result = engines.getEngine("javascript").execute("project1/hello", {});

response.println(JSON.stringify(result));
response.flush();
response.close();

Functions


Function Description Returns
getEngine(type) Returns the engine object per type provided Engine
getTypes() Returns the list of the registered engine types array of strings

Objects


Engine

Function Description Returns
execute(module, context) Executes a given module with a given context object
executeCode(source, context) Executes a given source code with a given context object