Skip to main content

Constructors

Methods

Interfaces

Module Functions


Constructors

constructor

new Graph(options: Config): Graph
Creates a new Graph instance.

Parameters

options
Config
required

Returns

Graph

Methods

start

start(input: any, ExecutionContext?: ExecutionContext): ExecutionResult
Executes the compiled graph with user context.

Parameters

input
any
required
Input data to execute the graph
ExecutionContext
ExecutionContext
Execution context containing optional parameters

Returns

ExecutionResult

visualize

visualize(path: string): Promise<void>
Visualizes the compiled graph and saves the visualization to a file.

Parameters

path
string
required
File path where the visualization will be saved

Returns

Promise<void>

closeExecution

closeExecution(outputStream: number | GraphOutputStream): void
Closes a specific execution.

Parameters

outputStream
number | GraphOutputStream
required
Output stream of the execution to close

Returns

void

toJSON

toJSON(): string
Returns the JSON configuration of the graph.

Returns

string

cleanupAllExecutions

cleanupAllExecutions(): void
Cleans up all active executions.

Returns

void

stopExecutor

stopExecutor(): void
Stops the graph executor.

Returns

void

getGraphId

getGraphId(): string
Gets the unique identifier for this graph.

Returns

string

destroy

destroy(): void
Cleans up resources associated with this graph.

Returns

void

Interfaces

ExecutionResult

Result of a single execution of the graph. It contains the output stream and the execution ID.

Properties

variantName: string outputStream: GraphOutputStream executionId: string

ExecutionContext

Context for the single execution of the graph. It is used to pass optional parameters to the graph execution. It is not required to pass all of the parameters, only the ones that are needed.

Properties

executionId?: string Context for the single execution of the graph. It is used to pass optional parameters to the graph execution. It is not required to pass all of the parameters, only the ones that are needed. userContext?: UserContextInterface Context for the single execution of the graph. It is used to pass optional parameters to the graph execution. It is not required to pass all of the parameters, only the ones that are needed. dataStoreContent?: { [x: string]: any; }

Module Functions

isDeclarativeGraphOptions

isDeclarativeGraphOptions(options: any): boolean

Parameters

options
any
required

Returns

boolean

toNativeMap

toNativeMap(tags?: { [x: string]: string; }): any

Parameters

tags
{ [x: string]: string; }

Returns

any