概要
公開日: 2026-06-23
翻訳生成に失敗したため、原文をそのまま保存しています。
原文
Changelog New updates and improvements at Cloudflare. Subscribe to RSS View RSS feeds ← Back to all posts Workflows rollback handlers now include step context Jun 23, 2026 Workflows 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. TypeScript 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" , }, }, ) ; { 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. Resources API New to Cloudflare? Directory Sponsorships Open Source Cloudflare Research Support Help Center System Status Compliance GDPR Company cloudflare.com Our team Careers Tools Cloudflare Radar Cloudflare Labs Speed Test Is BGP Safe Yet? Certificate Transparency Community Community forum X Discord YouTube GitHub © 2026 Cloudflare, Inc. Privacy Policy Terms of Use Report Security Issues Trademark Cookie Settings Was this helpful? Yes No