Workflow
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10099
Type Parameters
Section titled “Type Parameters”PARAMS
Section titled “PARAMS”PARAMS = unknown
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Workflow<
PARAMS>():Workflow<PARAMS>
Returns
Section titled “Returns”Workflow<PARAMS>
Methods
Section titled “Methods”create()
Section titled “create()”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.
Parameters
Section titled “Parameters”options?
Section titled “options?”WorkflowInstanceCreateOptions<PARAMS>
Options when creating an instance including id and params
Returns
Section titled “Returns”Promise<WorkflowInstance>
A promise that resolves with a handle for the Instance
createBatch()
Section titled “createBatch()”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.
Parameters
Section titled “Parameters”WorkflowInstanceCreateOptions<PARAMS>[]
List of Options when creating an instance including name and params
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”string
Id for the instance of this Workflow
Returns
Section titled “Returns”Promise<WorkflowInstance>
A promise that resolves with a handle for the Instance