Engines
Engines object is used for executing a scripting service programmatically.
- Module:
platform/engines - Definition: https://github.com/eclipse/dirigible/issues/234
- Source: /platform/engines.js
- Status:
stable - Group:
platform
Basic Usage
import { Engine } from "sdk/platform";
import { response } from "sdk/http";
let result = new Engine("javascript").execute("project1", "hello.js", "", {});
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 |