Skip to content
Français

WorkflowJobOptions

import type { WorkflowJobOptions } from "@elie-laloum/outpost";
  • workflowRequired
    (input: WorkflowJson, context: WorkflowJobContext) => Workflow | Promise<Workflow>
    Build the workflow for one job input; the same input must build the same workflow, and it may be asynchronous.
  • checkpointRequired
    WorkflowJobCheckpoint
    Checkpoint store and base version shared by every job; creation throws without both.
  • startOptional
    WorkflowJobStartOptions | undefined
    Other workflow start options, such as concurrency, budget, onQuota or timeoutMs; checkpoint, signal, decisions and answers are managed by the job.
export interface WorkflowJobOptions {
  /** Builds the workflow for one job input; the same input must build the same workflow. */
  workflow(
    input: WorkflowJson,
    context: WorkflowJobContext,
  ): Workflow | Promise<Workflow>;
  readonly checkpoint: WorkflowJobCheckpoint;
  readonly start?: WorkflowJobStartOptions;
}