Yeah, that is correct, since Workflows itself doesn’t know whether the names are the same or not, or
Yeah, that is correct, since Workflows itself doesn’t know whether the names are the same or not, or whether it is safe to mix a run like that


body.record and they aren't null
Serialized RPC arguments or return values are limited to 1MiB error142c8bdb1fea8b57b0fb24ca54327b99 if it helpsmigrate: latest schema version 1 is less than current DB schema version 2try-catch code path was triggeredrunning for 16+ hoursqueued for the status.get(crypto.randomUUID()) always return an existing instance?queued?const workflowBody: WorkflowParams = {
coursework: {
id: body.record.id,
...
},
prompt_id: body.record.prompt_id,
};
await env.grading_workflow.create({
id: submissionId,
params: workflowBody,
});142c8bdb1fea8b57b0fb24ca54327b99migrate: latest schema version 1 is less than current DB schema version 2try-catchrunningqueuedqueued.get(crypto.randomUUID())class UserEventSchema extends Schema.TaggedRequest<UserEventSchema>()("UserEventSchema", {
failure: Schema.Defect,
success: Schema.Option(Schema.Struct({ name: Schema.String })),
payload: {
name: Schema.String,
payload: Schema.Option(Schema.Struct({ ... })),
},
}) {}
const ComplexSteps = Workflow.schema(
// encode | decode
UserEventSchema,
({ name, payload }) =>
Effect.gen(function* () {
yield* Effect.logInfo(name, Option.getOrNull(payload));
return Option.some({ name });
}),
{
retries: { limit: 3, delay: "1 seconds" },
},
);
const SimpleStep = Workflow.do("step1", Effect.log("hello"));
const MyWorkflow = makeWorkflowEntrypoint(
{ name: "MyWorkflow", binding: "MY_WORKFLOW", schema: WorkflowParams },
Effect.gen(function* () {
yield* SimpleStep;
yield* Workflow.do("step2", Effect.log("world"));
yield* Workflow.sleep("sleep", "1 minute");
yield* ComplexSteps({ name: "cloudflare", payload: Option.some({ ... }) }); // return: Option
}),
);
const workflow = yield* Workflows.getWorkflow<WorkflowsBinding>("MyWorkflow");
const instance = yield* workflow.create({ params: { ... } }); // typesafe create