All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Workflows - Workflows rollback handlers now include step context

11d ago

Source

CloudflareWorkflows - Workflows rollback handlers now include step contextcloudflare.com
Snippet from the RSS feed
Workflows makes it easier to build reliable multi-step applications that can recover when downstream systems fail. Rollback handlers now receive the original step context via a ctx object for the step being rolled back. This includes ctx.step.name , ctx.step.count , ctx.attempt , and the step config with defaults applied. The step configuration includes the retry and timeout settings used for that step, so you can customize your step recovery logic according to those fields. await step . do ( "create charge" , async () => { const charge = await createCharge () ; return { chargeId : charge . id }; }, { rollback : async ({ ctx , output , error }) => { // `output` is the value returned by the step being rolled back. const { chargeId } = output as { chargeId : string }; await refundCharge ( chargeId , { // `ctx` is the original step context, including step name, count, attempt, and config. reason : ` ${ ctx . step . name } : ${ error . message } ` , } ) ; }, rollbackConfig : { // `rollbackConfig` controls retries and timeout for the rollback handler. retries : { limit : 3 , delay : "30 seconds" , backoff : "linear" }, timeout : "5 minutes" , }, }, ) ; Refer to rollback options to learn more.

You might also wanna read

Workflow SDK: Adding Durability and Reliability to TypeScript Functions

The article introduces Workflow SDK, a tool that adds durability, reliability, and observability to asynchronous JavaScript/TypeScript funct

useworkflow.dev·8mo ago

MCP's production flaws: Context bloat, performance issues, and the case for CLI-based alternatives

This article argues that MCP (Model Context Protocol) has significant flaws in production use, including context bloat, poor performance, an

quandri.io·1mo ago

Postgres-Backed Durable Workflow Execution: An Alternative to External Orchestration Systems

This article explains the concept of durable workflow execution using Postgres as the backing database, as implemented by the DBOS system. I

dbos.dev·1mo ago

Postgres-Backed Durable Workflow Execution: An Alternative to External Orchestration Systems

This article explains the concept of durable workflow execution using Postgres as the backing database, as implemented by the DBOS system. I

dbos.dev·1mo ago

Introduction to the Flow Library for Application Logic and Deployment Separation

The article introduces the flow library, which separates application logic from deployment concerns like topology, execution, and error hand

clojure.github.io·10mo ago

Why Workflow State Should Live in the Same Database as Your Application Data

The article argues that workflow systems should not just use Postgres as a backend, but should actually co-locate workflow state inside the

dbos.dev·2d ago

Why Workflow State Should Live in the Same Database as Your Application Data

The article argues that workflow systems should not just use Postgres as a backend, but should actually co-locate workflow state inside the

dbos.dev·2d ago

How AI Changed My Software Development Workflow: From Cursor to Claude Code

The author describes a personal shift in software development workflow over the past two months, moving from using Cursor to primarily using

lucumr.pocoo.org·27d ago

Comments

Sign in to join the conversation.

No comments yet. Be the first.