CMDx 2.0 is a full runtime rewrite of the Ruby business process framework. The migration guide covers every breaking change: halt semantics now use throw/catch instead of Result state mutation (2.5× faster), attributes renamed to inputs with coerce: instead of type:, returns replaced by outputs, middleware signatures simplified to single-arg with yield, and the built-in Correlate/Runtime/Timeout middlewares removed. Result objects are now read-only and frozen post-execution. New features include parallel workflow execution with configurable pool size, fiber-local chain storage for parallel safety, a Telemetry pub/sub system with five lifecycle events, first-class rollback dispatch, and pattern matching support on results. The guide provides a step-by-step migration checklist, before/after code examples for every changed area, a grep command to catch missed migrations, common error fixes, a rollback plan, and an AI agent prompt to automate most of the rewrite.

26m read timeFrom github.com
Post cover image
Table of contents
Before You BeginTL;DR Cheat SheetUpgrade WorkflowConfigurationTask DefinitionHaltsInputs (was Attributes)Outputs (was Returns)CallbacksMiddlewaresSettingsResult ConsumersWorkflowsChainFaults & ExceptionsErrorsContextRetriesDeprecationRollbackTelemetryLocale & I18nGeneratorsRemoved Modules & ClassesValidating the MigrationTroubleshootingRollback PlanAutomated Migration PromptFuture

Sort: