Skip to content

Session

Sessions contain business logic that do model selection and Program execution.

Constructors

new Session(sessionId)

new Session(sessionId): Session

Parameters

sessionId: string

Returns

Session

Accessors

sessionId

get sessionId(): string

Returns

string

Methods

execute()

execute(program): Promise<void>

Execute the program, step by step. This may result in multiple calls to the Model.

Parameters

program: Program

The program to execute.

Returns

Promise<void>


failure()

failure(failureCode?): void

Marks the session as having failed. This can only be called once and can’t be called after calling success().

Parameters

failureCode?: string

Optional user-supplied failure code.

Returns

void


success()

success(): void

Marks the session as having completed successfully. This can only be called once and can’t be called after calling failure(…).

Returns

void


Generated using typedoc-plugin-markdown and TypeDoc