const checkout = createWorkflow([
{ action: 'cartValidate' },
{ action: 'paymentReserve', compensate: 'paymentRelease' },
{ action: 'orderCreate', compensate: 'orderCancel' },
{ action: 'cartClear' },
]);
const result = await checkout.run(bus, { cartId, paymentInfo });
// If orderCreate fails → paymentRelease runs automatically
createWorkflow — sequential commands with automatic compensation on failure.