Durable Workflow (formerly Laravel 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.
Durable Workflow can be used to automate and manage complex processes, such as agentic workflows (AI-driven), financial transactions, data analysis, data pipelines, microservices, job tracking, user signup flows, sagas and other business processes. By using Durable Workflow, developers can break down large, complex processes into smaller, modular units that can be easily maintained and updated.
Some key features and benefits of Durable Workflow include:
- Support for defining workflows and activities using simple, declarative PHP classes.
- Tools for starting, monitoring, and managing workflows, including support for queuing and parallel execution.
- Built-in support for handling errors and retries, ensuring that workflows are executed reliably and consistently.
- Integration with Laravel's queue and event systems, allowing workflows to be executed asynchronously on worker servers.
- Extensive documentation and a growing community of developers who use and contribute to Durable Workflow.
Documentation for Durable Workflow can be found on the website.
You can find us in the GitHub discussions and also on our Discord channel.
There's also a sample application that you can run directly from GitHub in your browser.
1. Create a workflow
use function Workflow\V2\activity;
use Workflow\V2\Workflow;
class MyWorkflow extends Workflow
{
public function handle(string $name): string
{
$result = activity(MyActivity::class, $name);
return $result;
}
}2. Create an activity
use Workflow\V2\Activity;
class MyActivity extends Activity
{
public function handle(string $name): string
{
return "Hello, {$name}!";
}
}3. Run the workflow
use Workflow\V2\WorkflowStub;
$workflow = WorkflowStub::make(MyWorkflow::class);
$workflow->start('world');$workflow->output();
=> 'Hello, world!'The Durable Workflow package is sustained by the community via sponsors and volunteers.
Waterline is a separate UI that works nicely alongside Horizon. Think of Waterline as being to workflows what Horizon is to queues.
Waterline is a technical runtime UI for operators: use it for fleet
health, queues, waits, retries, failures, repair, and history
diagnostics. Business dashboards should read app-owned milestone
projections keyed by workflow_id and run_id, not Waterline data or
workflow runtime tables.
Refer to https://github.com/durable-workflow/waterline for installation and configuration instructions.

