Search by

nowo-tech / workflow-bundle

HecFranco

Symfony bundle to define and run Symfony Workflow state machines from database definitions with built-in CRUD.

Package info

github.com/nowo-tech/WorkflowBundle

Homepage

Documentation

Type:symfony-bundle

pkg:composer/nowo-tech/workflow-bundle

Statistics

Installs: 259

Dependents: 0

Suggesters: 1

Stars: 1

Open Issues: 0

v2.3.0 2026-11-23 08:32 UTC

This package is auto-updated.

Last update: 2026-11-28 14:27:32 UTC


README

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Define Symfony Workflow state machines and workflows in the database, manage them with a built-in CRUD UI, and execute transitions at runtime through DatabaseWorkflowRegistry and WorkflowApplicator.

📋 Compatible with Symfony 7.4+ (PHP 8.2+) and 8.x (PHP 8.4+) — tested on Symfony 7.4, 8.0, and 8.1+.

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly.

Workflow definitions list in the demo admin: name, slug, match rules (default badge), priority, place and transition counts, view/edit/delete actions
Definitions list — match rules, priority and row actions
Definition detail page with the flow diagram of a branching state machine, return/loop transitions, definition, runtime binding and match rules cards
Definition detail — flow diagram of a branching state machine
Transitions tab of the definition editor with the Edit transition dialog open: name, label and searchable from / to place selects
Transitions editor — dialog with searchable from / to places

Features

  • Persist workflow definitions (places, transitions, subject class, marking property) in Doctrine
  • Configurable Doctrine table_prefix for table and constraint names
  • Built-in admin UI at /workflow (configurable path), protected by default via security.access_roles / WorkflowUiAccessPolicyInterface
  • Admin pages on the UiKit 2.1 page contract (REQ-UI-003): list, show, form, settings and dashboard scaffolds themed once by the host (nowo_ui_kit.layouts / nowo_ui_kit.theme), flow diagram and collection editors on native <dialog>s, no CDN assets — see Templates
  • Configurable web_ui.path_prefix, web_ui.layout_template, web_ui.templates.<page> and web_ui.list_page_size
  • UI translations for en, es, fr, it, de, nl, pt (enable extra locales in web_ui.locales)
  • Runtime resolution via DatabaseWorkflowRegistry (Symfony Workflow component)
  • WorkflowRuntimeInterface / WorkflowApplicator to apply transitions (your code persists the subject; runtime.flush_after_apply: true lets the bundle flush it)
  • Optional header search (SearchKit 1.10+, PHP 8.3+): one group per request type finds your workflow requests by a search text and their status, only those your access rules let the viewer see — see Usage
  • Demo with order approval (state machine) and document review (parallel workflow)
  • FrankenPHP worker mode: Supported (including kernel not reset between requests; see Demo with FrankenPHP and Worker audit)

Quick start

composer require nowo-tech/workflow-bundle
# config/packages/nowo_workflow.yaml
nowo_workflow:
    web_ui:
        path_prefix: '/workflow'
        # layout_template: null → nowo_ui_kit.layouts.admin (your layout / bridge, set once in UiKit)
    security:
        access_roles: [ROLE_ADMIN]
php bin/console nowo:workflow:sync-schema
php bin/console nowo:workflow:seed-demo   # optional sample definitions

Demo

make -C demo up-symfony8

Open http://localhost:8022 — try the CRUD at /workflow and playgrounds for orders/documents.

Playwright e2e and the README screenshots (REQ-DEMO-013): make -C demo/symfony8 test-e2e and make -C demo/symfony8 demo-screenshots (after make -C demo/symfony8 reset-demo).

Smoke check (boot + HTTP 200):

make demo-smoke

Documentation

Additional documentation

Tests and coverage

Area Coverage / status
PHP 100% (statement coverage gate: make coverage-check and composer test-coverage-100 in CI)
TS/JS N/A (the only shipped script, src/Resources/public/js/nowo-workflow.js, is hand-written and has no Vitest suite; the admin UI is exercised by the demo Playwright e2e under demo/symfony8/e2e)
Python N/A

Tests summary: PHPUnit unit and integration suites (tests/Unit, tests/Integration).

make test
make test-coverage