mohamedhekal/flowforge

Embeddable Laravel workflow engine: linear definitions, allowlisted actions, delays, and run history

Maintainers

Package info

github.com/mohamedhekal/flowforge

pkg:composer/mohamedhekal/flowforge

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-07-16 14:23 UTC

This package is auto-updated.

Last update: 2026-07-16 14:35:17 UTC


README

CI License: MIT PHP Laravel

Search terms: laravel, workflow, automation, rules, erp, queue, php, laravel-package, workflow-engine, business-process, orchestration.

Embeddable Laravel workflow engine for ERP/CRM/OMS automation: versioned linear definitions, allowlisted actions, delays, and durable run history.

Installation

composer require mohamedhekal/flowforge
php artisan vendor:publish --tag=flowforge-config
php artisan migrate

Publish a workflow

use Hekal\FlowForge\Facades\FlowForge;

FlowForge::publish('Order notify', [
    'steps' => [
        [
            'key' => 'log',
            'type' => 'action',
            'action' => 'log',
            'params' => ['message' => 'order received'],
        ],
        [
            'key' => 'wait',
            'type' => 'delay',
            'seconds' => 60,
        ],
        [
            'key' => 'hook',
            'type' => 'action',
            'action' => 'webhook',
            'params' => ['url' => 'https://example.test/hooks/order'],
        ],
    ],
], slug: 'order-notify');

Start a run

$run = FlowForge::start('order-notify', ['order_id' => 42]);
// Continues via ContinueWorkflowRunJob (sync in tests; queue in production)

Custom actions

Actions are allowlisted. Register in config or at runtime:

FlowForge::extend('reserve-stock', ReserveStockAction::class);

Built-ins: log, webhook, noop.

Limitations (v0.1)

  • Linear steps only (no branching / parallel)
  • No approval gates
  • No visual builder
  • Delays use queued job delay; sync driver runs immediately

Testing

composer install && composer test

License

MIT