<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac" -->

---
title: Saga Lara Flow: Durable Workflows and Compensating...
description: Saga Lara Flow is a Laravel package that enables durable, long-running business processes written as plain PHP methods on top of Laravel queues. It records...
canonical: https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues | daily.dev
og:description: Saga Lara Flow is a Laravel package that enables durable, long-running business processes written as plain PHP methods on top of Laravel queues. It records...
og:url: https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac
og:image: https://api.daily.dev/og/posts/p0xHMIKac.png
og:image:alt: Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues

**[Laravel News](https://daily.dev/sources/ln)** · 6 min read · 4 upvotes · 0 comments

## Summary

Saga Lara Flow is a Laravel package that enables durable, long-running business processes written as plain PHP methods on top of Laravel queues. It records each step to the database, allowing workflows to replay from the last completed step after interruption. Key features include automatic compensating transactions (saga rollback) in reverse order on failure, signal-based suspension for external input with optional timeouts, parallel action blocks, child workflows with close policies, side effect recording for non-deterministic values, tag-based run querying, and Artisan commands for management. The package requires PHP 8.5 and Laravel 13, and supports multi-tenancy via capture/restore closures. A `runSync()` method makes workflows easy to test synchronously.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/saga-lara-flow>

## Questions this post answers

### How do I roll back completed steps in a Laravel workflow when a later step fails?

Register an undo action or closure per step using compensateWith(), and the engine automatically fires those compensations in reverse order when a later step throws an exception. For grouped steps, saga() builds an explicit compensation block, with onCompensationFailure() controlling whether a failed undo aborts the rollback and compensateInParallel() running undos concurrently.

_Track new Laravel packages like this one on daily.dev as you evaluate workflow and saga tooling._

### How can a Laravel workflow pause and wait for human approval or an external callback before continuing?

Call $this->signal('approval') inside a workflow method, which suspends the run and releases the worker until something delivers that named signal from elsewhere in the application. Chaining timeoutAfter() adds a deadline that throws AwaitSignalTimeoutException if the signal never arrives, letting the workflow catch it and run a fallback action instead.

_Developers building approval-driven workflows can follow tools like this on daily.dev._

### What are the requirements for installing the Saga Lara Flow package in a Laravel project?

Saga Lara Flow requires PHP 8.5 and Laravel 13, and is released under the MIT license. Install it with composer require discovery-ukraine/saga-lara-flow, run php artisan migrate for its database tables, and publish the config with php artisan vendor:publish --tag="saga-lara-flow-config" to set the database connection, queue, lock behavior, and tenancy hooks.

_daily.dev helps Laravel developers keep up with package requirements before adopting new workflow tools._

## Similar posts on daily.dev

- [Chevere Workflow: A Declarative PHP Workflow Engine with Async Job Execution](https://daily.dev/posts/chevere-workflow-a-declarative-php-workflow-engine-with-async-job-execution-s6zf3p4ye) · Laravel News · 8 upvotes · 1 comments
- [Laravel Chores: Resumable Data Operations and Cleanups](https://daily.dev/posts/laravel-chores-resumable-data-operations-and-cleanups-pwnv8kwdu) · Laravel News · 10 upvotes · 0 comments
- [A new programming model for durable execution](https://daily.dev/posts/a-new-programming-model-for-durable-execution-8hk6zrkca) · Vercel · 0 upvotes · 0 comments
- [Managed Queues: Autoscaling Queue Workers on Laravel Cloud](https://daily.dev/posts/managed-queues-autoscaling-queue-workers-on-laravel-cloud-hprotj33u) · Laravel · 23 upvotes · 3 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues","url":"https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac"},"datePublished":"2026-08-07T13:52:52.164Z","dateModified":"2026-09-13T21:08:50.670Z","description":"Saga Lara Flow is a Laravel package that enables durable, long-running business processes written as plain PHP methods on top of Laravel queues. It records...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d67120d8dd9c426c236bc85c45c1f63b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d67120d8dd9c426c236bc85c45c1f63b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Laravel News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Laravel News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ln","url":"https://daily.dev/sources/ln"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,laravel","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel News","item":"https://daily.dev/sources/ln"},{"@type":"ListItem","position":3,"name":"Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/saga-lara-flow-durable-workflows-and-compensating-transactions-on-laravel-queues-p0xhmikac#faq","mainEntity":[{"@type":"Question","name":"How do I roll back completed steps in a Laravel workflow when a later step fails?","acceptedAnswer":{"@type":"Answer","text":"Register an undo action or closure per step using compensateWith(), and the engine automatically fires those compensations in reverse order when a later step throws an exception. For grouped steps, saga() builds an explicit compensation block, with onCompensationFailure() controlling whether a failed undo aborts the rollback and compensateInParallel() running undos concurrently. Track new Laravel packages like this one on daily.dev as you evaluate workflow and saga tooling."}},{"@type":"Question","name":"How can a Laravel workflow pause and wait for human approval or an external callback before continuing?","acceptedAnswer":{"@type":"Answer","text":"Call $this->signal('approval') inside a workflow method, which suspends the run and releases the worker until something delivers that named signal from elsewhere in the application. Chaining timeoutAfter() adds a deadline that throws AwaitSignalTimeoutException if the signal never arrives, letting the workflow catch it and run a fallback action instead. Developers building approval-driven workflows can follow tools like this on daily.dev."}},{"@type":"Question","name":"What are the requirements for installing the Saga Lara Flow package in a Laravel project?","acceptedAnswer":{"@type":"Answer","text":"Saga Lara Flow requires PHP 8.5 and Laravel 13, and is released under the MIT license. Install it with composer require discovery-ukraine/saga-lara-flow, run php artisan migrate for its database tables, and publish the config with php artisan vendor:publish --tag=\"saga-lara-flow-config\" to set the database connection, queue, lock behavior, and tenancy hooks. daily.dev helps Laravel developers keep up with package requirements before adopting new workflow tools."}}]}
```

