Skip to content

docs(guides): add Cloudflare Workflows migration guide - #22

Draft
NathanFlurry wants to merge 2 commits into
mainfrom
migrate-cloudflare-workflows
Draft

NathanFlurry wants to merge 2 commits into
mainfrom
migrate-cloudflare-workflows

Conversation

@NathanFlurry

@NathanFlurry NathanFlurry commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Adds a Migrate from Cloudflare Workflows guide at /guides/migrate-cloudflare-workflows. It is listed in a new "Migrations" guides group, which merges with the actors bundle's group of the same name.

  • Before/after mappings: WorkflowEntrypoint, event.payload, step.do and WorkflowStepConfig, NonRetryableError to CriticalError, try/catch to tryStep, sleep/sleepUntil, Promise.all to join, triggering through a Worker binding, status()/terminate(), and child workflows.
  • The Rivet code is in examples/docs/guides/migrate-cloudflare-workflows/ and passes pnpm --filter @rivet-dev/workflows-docs-examples check-types and biome.
  • Input, status, and output live in the workflow's SQLite database (db plus onCreate). The guide doesn't use state, queues, or KV, which are deprecated or being deprecated in RivetKit.

Gap: step.waitForEvent / instance.sendEvent. Delivering a message to a running workflow currently goes through workflow queues (ctx.queue.*), which are being deprecated along with actor queues. The guide says so plainly and tells readers not to build new code on queues. It describes a polling workaround in prose, without code. Update that section once a replacement exists.

Ported from rivet-dev/rivet#4389. That PR added the Cloudflare migration guides to the old website cookbook, before the docs moved into per-product bundles.

🤖 Generated with Claude Code

NathanFlurry and others added 2 commits November 6, 2026 12:08
Map Cloudflare Workflows concepts to Rivet Workflows with before/after
code: steps, retries and timeouts, CriticalError, tryStep, sleeps, join,
starting workflows, status and terminate, and child workflows. The Rivet
code lives in examples/docs/guides/migrate-cloudflare-workflows and is
type-checked. Input and status use the workflow's SQLite database.

step.waitForEvent and instance.sendEvent are documented as a current gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- onError skips attempts that will retry and the tryStep-handled
  send-receipt step, so a recovered failure no longer marks a running
  order failed; the complete step clears any stale error.
- Explain that a step timeout does not cancel the callback, so retried
  timeouts need idempotent work.
- Waiting for events: say plainly that event delivery currently uses
  queues, which are being deprecated, instead of promising a replacement.
- The progress client connects with createWithInput before the first
  steps run and disposes the connection when done.
- Rename the sidebar entry to "From Cloudflare Workflows" and soften the
  versioning comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant