Skip to content

Workflow

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10099

PARAMS = unknown

new Workflow<PARAMS>(): Workflow<PARAMS>

Workflow<PARAMS>

create(options?): Promise<WorkflowInstance>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10111

Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.

WorkflowInstanceCreateOptions<PARAMS>

Options when creating an instance including id and params

Promise<WorkflowInstance>

A promise that resolves with a handle for the Instance


createBatch(batch): Promise<WorkflowInstance[]>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10120

Create a batch of instances and return handle for all of them. If a provided id exists, an error will be thrown. createBatch is limited at 100 instances at a time or when the RPC limit for the batch (1MiB) is reached.

WorkflowInstanceCreateOptions<PARAMS>[]

List of Options when creating an instance including name and params

Promise<WorkflowInstance[]>

A promise that resolves with a list of handles for the created instances.


get(id): Promise<WorkflowInstance>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10105

Get a handle to an existing instance of the Workflow.

string

Id for the instance of this Workflow

Promise<WorkflowInstance>

A promise that resolves with a handle for the Instance