qanna-rsa/workflow-engine

The headless workflow execution engine for Laravel

Maintainers

Package info

github.com/qanna-rsa/workflow-engine

Homepage

pkg:composer/qanna-rsa/workflow-engine

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-08-08 14:49 UTC

This package is not auto-updated.

Last update: 2026-08-08 14:54:18 UTC


README

Workflow Engine logo

Workflow Engine

A headless workflow automation engine for Laravel. Define a trigger and a graph of nodes, store the definition as data, and run it synchronously, asynchronously, or from the command line — no bundled UI required.

Workflow::run(
    workflowId: 'send-welcome-email', 
    payload: ['email' => 'ada@example.com']
);

View live docs: Workflow Engine Documentation

Features

  • Trigger-driven execution — Manual, Webhook, Schedule (cron), and Eloquent Model event triggers included.
  • A large built-in node library — logic (condition, switch, loop), variables, HTTP, files, Eloquent model CRUD, math, text, date/time, and collection operations.
  • An expression language{{ trigger.email }}, {{ nodes.query.result.first().name }}, with a rich set of chainable helper methods.
  • Suspend and resume — nodes like Wait and Call Workflow can pause an execution and resume it later without re-running earlier steps.
  • Pluggable storage — file-based (git-friendly) or database-backed, configured independently for workflows and executions.
  • An interactive builderphp artisan workflow:build walks you through constructing a workflow from the terminal, including a full interactive JSON builder.
  • A fluent schema API for custom nodes — declare a node's config form with Schema::text(), Schema::select(), Schema::group(), and more, including fields that resolve dynamically based on earlier answers.
  • First-class testing supportWorkflow::fake() plus a full set of assertions.

Installation

composer require qanna-rsa/workflow-engine
php artisan vendor:publish --tag=workflowengine::config

See the live documentation for the full guide, including the optional database storage migrations.

Quick Start

use Qanna\WorkflowEngine\Engine\Nodes\Action\LogNode;
use Qanna\WorkflowEngine\Engine\Triggers\ManualTrigger;
use Qanna\WorkflowEngine\Models\Workflow;
use Qanna\WorkflowEngine\Storage\Contracts\WorkflowRepositoryContract;

$workflow = Workflow::fromArray([
    'id' => 'send-welcome-email',
    'name' => 'Send Welcome Email',
    'trigger' => ['type' => ManualTrigger::type(), 'config' => []],
    'nodes' => [[
        'id' => 'log',
        'type' => LogNode::type(),
        'config' => ['level' => 'info', 'message' => 'Welcome {{trigger.email}}'],
    ]],
    'edges' => [['from' => 'trigger', 'to' => 'log', 'branch' => 'main']],
]);

app(WorkflowRepositoryContract::class)->create($workflow);
use Qanna\WorkflowEngine\Facades\Workflow;

Workflow::run('send-welcome-email', ['email' => 'ada@example.com']);

Or skip the code and build it interactively:

php artisan workflow:build

See the live documentation for a walkthrough of both paths.

Documentation

Full documentation — installation, configuration, concepts, the built-in node reference, triggers, the interactive builder, testing, and extension points — lives at:

qanna-rsa.github.io/workflow-engine.github.io

License

Released under the MIT License.