Skip to main content

FlowExecution

@forge/monorepo


@forge/monorepo / backend/src / FlowExecution

Type Alias: FlowExecution

FlowExecution = object

Defined in: backend/src/flows/index.ts:254

Properties

attempt

readonly attempt: number

Defined in: backend/src/flows/index.ts:277

Attempts for the current step, so a retry policy survives a restart.


conversationId?

readonly optional conversationId?: ConversationId

Defined in: backend/src/flows/index.ts:263


currentStep

readonly currentStep: string | null

Defined in: backend/src/flows/index.ts:266

The step about to run, or the one being waited on. null once terminal.


depth

readonly depth: number

Defined in: backend/src/flows/index.ts:278


detail?

readonly optional detail?: string

Defined in: backend/src/flows/index.ts:282

Why it stopped, when it stopped for a reason worth reading.


finishedAt?

readonly optional finishedAt?: string

Defined in: backend/src/flows/index.ts:280


flowId

readonly flowId: string

Defined in: backend/src/flows/index.ts:257


flowVersion

readonly flowVersion: number

Defined in: backend/src/flows/index.ts:259

Pinned at start. The definition is read at this version for the execution's whole life.


history

readonly history: readonly StepRecord[]

Defined in: backend/src/flows/index.ts:275


id

readonly id: string

Defined in: backend/src/flows/index.ts:255


principalId

readonly principalId: PrincipalId

Defined in: backend/src/flows/index.ts:262


runId

readonly runId: RunId

Defined in: backend/src/flows/index.ts:261

The platform run this execution is, so quotas, usage and events apply as they do to any run.


spend

readonly spend: FlowSpend

Defined in: backend/src/flows/index.ts:274


startedAt

readonly startedAt: string

Defined in: backend/src/flows/index.ts:279


state

readonly state: Readonly<Record<string, unknown>>

Defined in: backend/src/flows/index.ts:273

State between steps, durable, and readable by a person — #187 AC-3.

A flat JSON object rather than an opaque blob, because "what state is this flow in" is a question someone asks while it is stuck, and an answer they cannot read is not an answer.


status

readonly status: FlowStatus

Defined in: backend/src/flows/index.ts:264


tenantId

readonly tenantId: TenantId

Defined in: backend/src/flows/index.ts:256


waitingFor?

readonly optional waitingFor?: { interactionId: string; kind: "human"; } | { kind: "signal"; signal: string; } | { kind: "time"; untilMs: number; } | { kind: "run"; member?: string; runId: string; }

Defined in: backend/src/flows/index.ts:284

Set while waiting: the interaction a checkpoint is parked on, or the signal a wait needs.