laravel-process-engine maintained by dskripchenko
Description
Laravel bridge for dskripchenko/process-engine: database store, queue workers, scheduler, artisan commands, a Processes facade, Eloquent model binding and state projection.
Author
Last update
2026/10/26 16:17
(dev-main)
License
Downloads
14
Tags
laravel-process-engine
Laravel bridge for dskripchenko/process-engine: long-running processes as statecharts with durable execution, explicit retry semantics for side effects, timers, external events, versions and operator actions — on your database and your queue.
- A database store for PostgreSQL, MySQL / MariaDB and SQLite (migrations included).
- Queue jobs as the doorbell, the tick and the archive registered in the scheduler.
- Effect handlers resolved from the container — inject your services.
Processesfacade,HasProcessesfor models:startProcess(),process(),whereProcessIn('state')scopes, and projection of the current state into a column of the model.- Artisan:
tick,work,status,doctor,migrate,archive,validate,graph,make:process,make:process-effect. - Engine signals as Laravel events;
flag()guards from config; laravel-delayed-process completions forwarded as events.
Install
composer require dskripchenko/laravel-process-engine
php artisan migrate
Run a queue worker and the scheduler (schedule:run every minute) as usual.
Use
use Dskripchenko\LaravelProcessEngine\Concerns\HasProcesses;
final class Claim extends Model
{
use HasProcesses;
}
use Dskripchenko\LaravelProcessEngine\Facades\Processes;
$process = $claim->startProcess(ClaimSettlement::class, new ClaimContext(policyId: $policy->id));
Processes::send($process->id(), new FormSubmitted($request->validated()),
key: $request->header('Idempotency-Key'), by: Actor::user($request->user()->id));
Processes::publish(new PartyDecision($payload['approved']),
correlate: $payload['application_id'], key: $payload['message_id']);
$claim->process(ClaimSettlement::class)->expects();
Claim::whereProcessIn('awaitingDocuments')->paginate();
Documentation
| English | Deutsch | Русский | 中文 | |
|---|---|---|---|---|
| Installation and configuration | en | de | ru | zh |
| Using it in an application | en | de | ru | zh |
Processes themselves — the builder, effects, events, versions, operations — are documented in dskripchenko/process-engine.
Requirements
PHP 8.2 – 8.5, Laravel 11, 12 or 13.
License
MIT. See LICENSE.