Interface: ScriptExecution


CloudControl Pro 9 Docs / engines / ScriptExecution

Interface: ScriptExecution

engines.ScriptExecution

Object returned by execScriptFile. It represents a script execution, records the path of script file executed, can listen events of start and stop, and can get engine to communicate with it or stop engine.

Hierarchy

  • unknown

    ScriptExecution

Table of contents

Properties

Accessors

Methods

Events

Properties

source

Readonly source: any

Source file object of engine.


sourceFile

Readonly sourceFile: string

Path of execution source file.

Accessors

engineOrNull

get engineOrNull(): null | ScriptEngine

Get the engine object of this execution, if engine is not ready, return null.

Returns

null | ScriptEngine


executionConfig

get executionConfig(): ReadOnlyExecutionConfig

Get the execution config of this execution.

Returns

ReadOnlyExecutionConfig

Methods

engine

engine(): any

Get the engine object of this execution asynchronously.

Returns

any

Events

on

on(event, listener): ScriptExecution

The event of execution start. Once this event is sent, the thread and engine of the execution are ready and about to execute script.

start

Parameters

Name Type
event "start"
listener (execution: ScriptExecution) => void

Returns

ScriptExecution

on(event, listener): ScriptExecution

The event of execution success. This event indicates that the script has been executed successfully. success

Parameters

Name Type
event "success"
listener (execution: ScriptExecution) => void

Returns

ScriptExecution

on(event, listener): ScriptExecution

The event of execution exception. This event indicates an uncaught exception encountered during script execution.

exception

Parameters

Name Type
event "exception"
listener (execution: ScriptExecution, exception: Throwable) => void

Returns

ScriptExecution