PHPackages                             adamczykpiotr/laravel-dag-workflows - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. adamczykpiotr/laravel-dag-workflows

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

adamczykpiotr/laravel-dag-workflows
===================================

This is my package dag-workflows

1.9.0(3d ago)0322[2 PRs](https://github.com/adamczykpiotr/laravel-dag-workflows/pulls)MITPHPPHP ^8.3CI passing

Since Nov 10Pushed 1mo agoCompare

[ Source](https://github.com/adamczykpiotr/laravel-dag-workflows)[ Packagist](https://packagist.org/packages/adamczykpiotr/laravel-dag-workflows)[ Docs](https://github.com/adamczykpiotr/laravel-dag-workflows)[ GitHub Sponsors](https://github.com/AdamczykPiotr)[ RSS](/packages/adamczykpiotr-laravel-dag-workflows/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (52)Versions (35)Used By (0)

dag-workflows
=============

[](#dag-workflows)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1597ffd9fc8bc25f71938492963523a6b6fe66b3dfd542e50f7f8ec2c55d3757/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6164616d637a796b70696f74722f6c61726176656c2d6461672d776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adamczykpiotr/laravel-dag-workflows)[![GitHub Tests Action Status](https://camo.githubusercontent.com/bda20dc7fd1640f9b2b5fe19aab0d9f8ec079d4f3ffa2faff4353de58d12cb4d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6164616d637a796b70696f74722f6c61726176656c2d6461672d776f726b666c6f77732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/adamczykpiotr/laravel-dag-workflows/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/63dee74667799a22d2bc773430e687bfe1cbf17a6233b750b67c00fb0954fe4e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6164616d637a796b70696f74722f6c61726176656c2d6461672d776f726b666c6f77732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/adamczykpiotr/laravel-dag-workflows/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e73fd04f92a5b6d5814aac0977b9b1367047af976b4aa333b152a6763ee11163/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6164616d637a796b70696f74722f6c61726176656c2d6461672d776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adamczykpiotr/laravel-dag-workflows)

A lightweight library to define and dispatch directed acyclic graph (DAG) based workflows composed of Tasks and TaskGroups. Each Task can contain one or more jobs and may declare dependencies on other tasks. This package helps model, persist and execute complex multi-step workflows in Laravel applications.

Key features:

- Expressive workflow definitions using `Workflow`, `Task` and `TaskGroup` building blocks
- Support for single and grouped tasks
- Task dependencies and ordering
- Easy dispatching and inspection via Eloquent models
- Per-step progress reporting with built-in debounce
- Pausable tasks for manual intervention (anomaly detection, user approval, etc.)
- Events for workflow state changes (paused, resumed, cancelled)

Installation
------------

[](#installation)

Install the package via Composer and run migrations:

```
composer require adamczykpiotr/laravel-dag-workflows
php artisan migrate
```

Migrations ship with the package and run in place. If you want to customise the schema, publish them first: `php artisan vendor:publish --tag="dag-workflows-migrations"`.

Usage
-----

[](#usage)

Below is a concise example showing how to define and dispatch a workflow. This example mirrors the structure of the included tinker snippet but models an "Image Import Pipeline":

```
