Skip to main content
Durable Workflow is a package for the Laravel web framework that provides tools for defining and managing workflows and activities. A workflow is a series of interconnected activities that are executed in a specific order to achieve a desired result. Activities are individual tasks or pieces of logic that are executed as part of a workflow.

What you can build

Durable Workflow can be used to automate and manage complex processes, including:

Agentic workflows

AI-driven workflows that make decisions and adapt to changing conditions

Financial transactions

Payment processing, refunds, and multi-step financial operations with automatic rollback

Data pipelines

ETL processes, data analysis, and transformation workflows that span multiple systems

Microservices orchestration

Coordinate complex operations across distributed services with guaranteed execution

User signup flows

Multi-step onboarding processes with email verification, payment, and provisioning

Job tracking

Monitor long-running jobs with progress tracking and automatic recovery from failures

Key features

By using Durable Workflow, developers can break down large, complex processes into smaller, modular units that can be easily maintained and updated.

Declarative PHP classes

Define workflows and activities using simple, declarative PHP classes with a clean syntax

Queue integration

Full integration with Laravel’s queue and event systems for asynchronous execution on worker servers

Reliable execution

Built-in support for handling errors and retries, ensuring workflows execute reliably and consistently

Parallel execution

Tools for starting, monitoring, and managing workflows with support for queuing and parallel execution

Visual monitoring

Monitor workflows with Waterline, a dedicated UI for visualizing workflow execution and debugging

Battle-tested

Used in production by companies running complex workflows at scale with extensive test coverage

How it works

Durable Workflow uses Laravel’s queue system to execute workflows asynchronously. Each workflow maintains its state in the database, allowing it to survive server restarts, deployments, and failures. When a workflow yields to an activity or timer, its state is persisted, and execution can resume exactly where it left off.
use function Workflow\activity;
use Workflow\Workflow;

class OrderWorkflow extends Workflow
{
    public function execute($orderId)
    {
        // Process payment (activity)
        $payment = yield activity(ProcessPayment::class, $orderId);
        
        // If payment succeeds, fulfill the order
        $fulfillment = yield activity(FulfillOrder::class, $orderId);
        
        // Send confirmation email
        yield activity(SendConfirmation::class, $orderId, $fulfillment);
        
        return $fulfillment;
    }
}
Each yield point is a durable execution boundary. If your server crashes or restarts, the workflow will automatically resume from the last completed activity.

Get started

Quick start

Follow our quickstart guide to install Durable Workflow and run your first workflow in minutes

Community and support

Join the growing community of developers using Durable Workflow:

GitHub Discussions

Ask questions and share your workflows

Discord

Chat with the community in real-time

Sample App

Explore a complete sample application

Waterline UI

Monitor and debug your workflows visually

Build docs developers (and LLMs) love