[Architecture] Extract headless Workflow Engine from the Workflow editor module #12

Closed
opened 2026-07-31 15:05:46 +02:00 by zemion · 1 comment
Owner

Decision

Split the current package into a headless govoplan-workflow-engine module (runtime ID workflow_engine) and the optional govoplan-workflow authoring/inspection module.

Durable architecture: Workflow Engine And Workflow Editor Split.

Engine Ownership

  • Workflow definitions, immutable revisions, instances, transitions, events, commands, timers, persistence, and migrations.
  • BPMN/native graph schemas, validation, import/export, node-library and execution-adapter registries.
  • Definition/runtime APIs, dispatchers, workers, idempotency, retries, reconciliation, and audit/event output.
  • Configuration-package fragments and module-contributed workflow baselines.
  • No primary navigation or full editor.

Editor Ownership

  • Workflow catalogue, visual editor, revision/diff/validation/activation UI, instance inspector, and operator controls.
  • Module-standard override, update comparison, and reset-to-standard UI.
  • Hard dependency on workflow_engine; no database or execution ownership.

Extraction Plan

  1. Define Engine contracts while preserving the existing workflow.* interface names.
  2. Create and scaffold the new repository/package/module.
  3. Move backend, tests, migration chain, and workers without changing table names, IDs, API paths, or Alembic history.
  4. Make Workflow an editor package with a compatibility facade for one release line.
  5. Move Core worker and module consumers to Engine capabilities.
  6. Verify clean Engine-only startup, fresh install, upgrade, editor install/uninstall, and module-combination tests.

Acceptance Criteria

  • A domain module can contribute and run workflows with Workflow Engine installed and the Workflow editor absent.
  • Installing the editor adds authoring/inspection only.
  • Existing definitions, revisions, instances, foreign keys, idempotency keys, API clients, and audit references survive upgrade unchanged.
  • Engine has no frontend dependency and optional integrations remain capability-based.
  • Workflow cannot start without a compatible Engine contract.
  • Rollback and compatibility behavior follow the platform compatibility policy.

Related: #5, #6, and #13.

## Decision Split the current package into a headless `govoplan-workflow-engine` module (runtime ID `workflow_engine`) and the optional `govoplan-workflow` authoring/inspection module. Durable architecture: [Workflow Engine And Workflow Editor Split](https://git.add-ideas.de/GovOPlaN/govoplan-workflow/src/branch/main/docs/ENGINE_EDITOR_SPLIT.md). ## Engine Ownership - Workflow definitions, immutable revisions, instances, transitions, events, commands, timers, persistence, and migrations. - BPMN/native graph schemas, validation, import/export, node-library and execution-adapter registries. - Definition/runtime APIs, dispatchers, workers, idempotency, retries, reconciliation, and audit/event output. - Configuration-package fragments and module-contributed workflow baselines. - No primary navigation or full editor. ## Editor Ownership - Workflow catalogue, visual editor, revision/diff/validation/activation UI, instance inspector, and operator controls. - Module-standard override, update comparison, and reset-to-standard UI. - Hard dependency on `workflow_engine`; no database or execution ownership. ## Extraction Plan 1. Define Engine contracts while preserving the existing `workflow.*` interface names. 2. Create and scaffold the new repository/package/module. 3. Move backend, tests, migration chain, and workers without changing table names, IDs, API paths, or Alembic history. 4. Make Workflow an editor package with a compatibility facade for one release line. 5. Move Core worker and module consumers to Engine capabilities. 6. Verify clean Engine-only startup, fresh install, upgrade, editor install/uninstall, and module-combination tests. ## Acceptance Criteria - A domain module can contribute and run workflows with Workflow Engine installed and the Workflow editor absent. - Installing the editor adds authoring/inspection only. - Existing definitions, revisions, instances, foreign keys, idempotency keys, API clients, and audit references survive upgrade unchanged. - Engine has no frontend dependency and optional integrations remain capability-based. - Workflow cannot start without a compatible Engine contract. - Rollback and compatibility behavior follow the platform compatibility policy. Related: #5, #6, and #13.
Author
Owner

Implemented and pushed as a compatibility-preserving Engine/editor extraction.

Delivered

  • Created GovOPlaN/govoplan-workflow-engine at 9bccbd6 with the complete headless backend, unchanged /api/v1/workflow route family, runtime worker, BPMN/native graph services, persistence, and migration chain.
  • Transferred migration ownership to runtime module ID workflow_engine without changing existing revision IDs or table names. A fresh Engine install and an upgrade from the former workflow migration head are covered.
  • Preserved persisted workflow:* grants through Core's explicit legacy permission-namespace contract (govoplan-core@1884274).
  • Reduced govoplan-workflow to navigation/WebUI/editor ownership plus one 0.1 compatibility release of Python facade imports (8fd8753). It has a hard, version-checked Engine dependency and owns no routes, permissions, workers, or migrations.
  • Added versioned module workflow contributions, idempotent standard reconciliation, immutable baselines, provenance, drift detection, derive/override, and history-preserving reset APIs. A test-only domain manifest proves contribution and execution with the editor absent.
  • Updated platform defaults, deployment queues, release tooling, repository metadata, and all module manifests that referred to Workflow runtime. The temporary facade boundary exception is narrowly tracked for removal in #14.

Verification

  • tools/checks/check-focused.sh passes, including Core and all focused backend suites plus all 33 WebUI module permutations.
  • Engine: 52 tests pass; editor compatibility suite: 47 tests pass.
  • PostgreSQL dev smoke applied only f1b7d3e5a9c2 -> 0b4e7c9a2d6f and startup passed.
  • Static scan: 54 manifests, 75 provided interfaces, 46 requirements, no contract errors.
  • Engine-only registry: API + migrations + permissions, no frontend. Editor registry: the same Engine ownership plus one frontend.
  • Workflow-only, Workflow+Dataflow, and full-product production WebUI builds pass bundle budgets.

The architecture acceptance criteria are complete. Follow-up #13 retains the remaining richer standard-diff/configuration-package rollout work; compatibility-facade removal is tracked in #14.

Implemented and pushed as a compatibility-preserving Engine/editor extraction. ### Delivered - Created [`GovOPlaN/govoplan-workflow-engine`](https://git.add-ideas.de/GovOPlaN/govoplan-workflow-engine) at `9bccbd6` with the complete headless backend, unchanged `/api/v1/workflow` route family, runtime worker, BPMN/native graph services, persistence, and migration chain. - Transferred migration ownership to runtime module ID `workflow_engine` without changing existing revision IDs or table names. A fresh Engine install and an upgrade from the former `workflow` migration head are covered. - Preserved persisted `workflow:*` grants through Core's explicit legacy permission-namespace contract (`govoplan-core@1884274`). - Reduced `govoplan-workflow` to navigation/WebUI/editor ownership plus one 0.1 compatibility release of Python facade imports (`8fd8753`). It has a hard, version-checked Engine dependency and owns no routes, permissions, workers, or migrations. - Added versioned module workflow contributions, idempotent standard reconciliation, immutable baselines, provenance, drift detection, derive/override, and history-preserving reset APIs. A test-only domain manifest proves contribution and execution with the editor absent. - Updated platform defaults, deployment queues, release tooling, repository metadata, and all module manifests that referred to Workflow runtime. The temporary facade boundary exception is narrowly tracked for removal in #14. ### Verification - `tools/checks/check-focused.sh` passes, including Core and all focused backend suites plus all 33 WebUI module permutations. - Engine: 52 tests pass; editor compatibility suite: 47 tests pass. - PostgreSQL dev smoke applied only `f1b7d3e5a9c2 -> 0b4e7c9a2d6f` and startup passed. - Static scan: 54 manifests, 75 provided interfaces, 46 requirements, no contract errors. - Engine-only registry: API + migrations + permissions, no frontend. Editor registry: the same Engine ownership plus one frontend. - Workflow-only, Workflow+Dataflow, and full-product production WebUI builds pass bundle budgets. The architecture acceptance criteria are complete. Follow-up #13 retains the remaining richer standard-diff/configuration-package rollout work; compatibility-facade removal is tracked in #14.
zemion added the module/workflow-engine label 2026-07-31 17:01:48 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-workflow#12