Skip to content

PersistentAI API Documentation / @persistentai/fireflow-types / ISubflowHandle

Interface: ISubflowHandle

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:117

Handle for an in-progress subflow execution

Properties

executionId

readonly executionId: string

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:121

The execution ID of the child flow


getResult()

getResult: () => Promise<ISubflowResult>

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:126

Wait for the subflow to complete and get its result

Returns

Promise<ISubflowResult>


getStatus()

getStatus: () => Promise<IWorkflowStatus>

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:131

Get the current workflow status

Returns

Promise<IWorkflowStatus>


send()

send: <T>(message, topic?) => Promise<void>

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:136

Send a message to the child workflow

Type Parameters

T

T

Parameters

message

T

topic?

string

Returns

Promise<void>


waitForOutput()

waitForOutput: <T>(timeoutMs?) => Promise<T | null>

Defined in: packages/fireflow-types/src/execution/services/dbos-types.ts:150

Wait for flowOutput event (resolves when FlowOutputNode executes). Returns null if timeout expires or workflow completes without output.

This enables early port resolution - the parent can receive outputs as soon as the child's FlowOutputNode runs, even before the child workflow completes.

Type Parameters

T

T = Record<string, unknown>

Type of the expected output data

Parameters

timeoutMs?

number

Max wait time (default: inherit from startSubflow params)

Returns

Promise<T | null>

Output data from FlowOutputNode, or null if no output set

Licensed under BUSL-1.1