Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

WorkflowEngine.ts overview

Since v1.0.0


Exports Grouped by Category


Constructors

makeUnsafe

Signature

declare const makeUnsafe: (options: Encoded) => WorkflowEngine["Type"]

Source

Since v4.0.0

Encoded

Encoded (interface)

Signature

export interface Encoded {
  readonly register: (
    workflow: Workflow.Any,
    execute: (
      payload: object,
      executionId: string
    ) => Effect.Effect<unknown, unknown, WorkflowInstance | WorkflowEngine>
  ) => Effect.Effect<void, never, Scope.Scope>
  readonly execute: <const Discard extends boolean>(
    workflow: Workflow.Any,
    options: {
      readonly executionId: string
      readonly payload: object
      readonly discard: Discard
      readonly parent?: WorkflowInstance["Type"] | undefined
    }
  ) => Effect.Effect<Discard extends true ? void : Workflow.Result<unknown, unknown>>
  readonly poll: (
    workflow: Workflow.Any,
    executionId: string
  ) => Effect.Effect<Workflow.Result<unknown, unknown> | undefined>
  readonly interrupt: (workflow: Workflow.Any, executionId: string) => Effect.Effect<void>
  readonly resume: (workflow: Workflow.Any, executionId: string) => Effect.Effect<void>
  readonly activityExecute: (
    activity: Activity.Any,
    attempt: number
  ) => Effect.Effect<Workflow.Result<unknown, unknown>, never, WorkflowInstance>
  readonly deferredResult: (
    deferred: DurableDeferred.Any
  ) => Effect.Effect<Exit.Exit<unknown, unknown> | undefined, never, WorkflowInstance>
  readonly deferredDone: (options: {
    readonly workflowName: string
    readonly executionId: string
    readonly deferredName: string
    readonly exit: Exit.Exit<unknown, unknown>
  }) => Effect.Effect<void>
  readonly scheduleClock: (
    workflow: Workflow.Any,
    options: {
      readonly executionId: string
      readonly clock: DurableClock
    }
  ) => Effect.Effect<void>
}

Source

Since v4.0.0

In-memory

layerMemory

Signature

declare const layerMemory: Layer.Layer<WorkflowEngine, never, never>

Source

Since v1.0.0

Services

WorkflowEngine (class)

Signature

declare class WorkflowEngine

Source

Since v4.0.0

WorkflowInstance (class)

Signature

declare class WorkflowInstance

Source

Since v4.0.0

initial (static method)

Signature

declare const initial: (workflow: Workflow.Any, executionId: string) => WorkflowInstance["Type"]

Source