Skip to content
Prose v0.3.2

Execution Options

The third argument to .execute() is an optional options object.

const result = await flow.execute(input, deps, options);

Type: number

Maximum duration for the entire flow in milliseconds. Throws TimeoutError if exceeded.

Type: number

Default maximum duration per step in milliseconds. Can be overridden per-step via .withRetry({ stepTimeout }).

Type: AbortSignal

External abort signal for cancellation. Combined with flow/step timeouts into ctx.signal.

const controller = new AbortController();
await flow.execute(input, deps, { signal: controller.signal });

Type: FlowObserver

Lifecycle hooks for logging, metrics, or tracing. See Observability guide.

Type: boolean Default: true

When false, returns partial accumulated state instead of throwing on step failure.

Type: string

Custom ID propagated to events and observers via ctx.meta.correlationId. Auto-generated if not provided.

Type: object

Control behavior for missing optional dependencies.

{
errorHandling: {
throwOnMissingDatabase: false, // warn instead of throwing
throwOnMissingEventPublisher: false, // warn instead of throwing
}
}