[Feature] Add complete BPMN 2.0 notation and XML round-trip editing #9

Closed
opened 2026-07-30 17:34:17 +02:00 by zemion · 2 comments
Owner

Use BPMN 2.0 as the canonical language of the existing GovOPlaN Workflow graph. The native graph editor, persistence model, and XML interchange must share one representation; there is no separate BPMN editor and no browser-side BPMN modeling library. This issue concerns notation and interchange, not a claim that every BPMN runtime semantic is executable.

Acceptance criteria

  • Canonical graph nodes and edges use standard bpmn.* element and flow types, with process membership, containment, properties, and diagram geometry.
  • The existing Workflow graph editor creates and edits BPMN events, activities, gateways, data, collaboration/choreography elements, and artifacts.
  • BPMN 2.0 XML and BPMN DI import into the graph; deterministic XML/DI export is generated from the graph.
  • Stable BPMN IDs and positions survive round trips unless edited; extension and unsupported semantic content is retained in bounded preserved metadata.
  • Model-valid constructs may remain editable when not executable, while activation fails closed with concrete diagnostics.
  • Representative process, collaboration, choreography, event, compensation, transaction, and data fixtures are covered.
  • No bpmn-js, bpmn-moddle, properties-panel, or equivalent third-party BPMN modeler dependency is present.

Related: #2, #5, #10.

Use BPMN 2.0 as the canonical language of the existing GovOPlaN Workflow graph. The native graph editor, persistence model, and XML interchange must share one representation; there is no separate BPMN editor and no browser-side BPMN modeling library. This issue concerns notation and interchange, not a claim that every BPMN runtime semantic is executable. ## Acceptance criteria - Canonical graph nodes and edges use standard `bpmn.*` element and flow types, with process membership, containment, properties, and diagram geometry. - The existing Workflow graph editor creates and edits BPMN events, activities, gateways, data, collaboration/choreography elements, and artifacts. - BPMN 2.0 XML and BPMN DI import into the graph; deterministic XML/DI export is generated from the graph. - Stable BPMN IDs and positions survive round trips unless edited; extension and unsupported semantic content is retained in bounded preserved metadata. - Model-valid constructs may remain editable when not executable, while activation fails closed with concrete diagnostics. - Representative process, collaboration, choreography, event, compensation, transaction, and data fixtures are covered. - No `bpmn-js`, `bpmn-moddle`, properties-panel, or equivalent third-party BPMN modeler dependency is present. Related: #2, #5, #10.
Author
Owner

Codex State: done

Notation/interchange editing is complete in the current working tree.

  • BPMN XML is stored exactly on immutable revisions with a content hash, explicit adapter ID/version, and a dedicated exact-document endpoint.
  • The lazy bpmn-js modeler includes the standard palette, BPMN properties panel, import/export, BPMN DI layout, stable IDs, read-only historical viewing, and explicit native conversion.
  • Server inspection remains bounded and XXE/DTD-safe and reports unsupported/interchange-only constructs before activation.
  • Fixtures cover process, collaboration, choreography, control flow, events, transaction, compensation, messages/signals, human tasks, and data; a custom extension fixture is retained byte-for-byte by revision storage.
  • Modeler dependencies are split into deferred chunks. The existing initial and async bundle budgets pass without relaxation.

Verification: Workflow suite 33 tests; Ruff clean; Workflow TypeScript clean; combined production build/bundle budget clean.

Implementation is complete locally and will be included in the next repository push.

## Codex State: done Notation/interchange editing is complete in the current working tree. - BPMN XML is stored exactly on immutable revisions with a content hash, explicit adapter ID/version, and a dedicated exact-document endpoint. - The lazy `bpmn-js` modeler includes the standard palette, BPMN properties panel, import/export, BPMN DI layout, stable IDs, read-only historical viewing, and explicit native conversion. - Server inspection remains bounded and XXE/DTD-safe and reports unsupported/interchange-only constructs before activation. - Fixtures cover process, collaboration, choreography, control flow, events, transaction, compensation, messages/signals, human tasks, and data; a custom extension fixture is retained byte-for-byte by revision storage. - Modeler dependencies are split into deferred chunks. The existing initial and async bundle budgets pass without relaxation. Verification: Workflow suite 33 tests; Ruff clean; Workflow TypeScript clean; combined production build/bundle budget clean. Implementation is complete locally and will be included in the next repository push.
Author
Owner

Codex State: done

Summary

  • Superseded the separate bpmn-js modeler with BPMN 2.0 as the canonical language of the existing native Workflow graph editor.
  • Implemented native BPMN nodes and typed flows, safe XML/DI import, deterministic export, stable reference mapping, extension preservation, edge editing/reconnection, and model-permissive validation.
  • Removed all bpmn-js, moddle, properties-panel, Camunda, and Zeebe dependencies from Workflow and the aggregate Core lock.

Changed Files

  • src/govoplan_workflow/backend/bpmn_graph.py
  • src/govoplan_workflow/backend/node_library.py
  • webui/src/features/workflow/WorkflowPage.tsx
  • webui/src/features/workflow/WorkflowCanvas.tsx
  • webui/src/features/workflow/WorkflowInspector.tsx
  • docs/BPMN_INTEROPERABILITY.md

Verification

  • Workflow backend suite: 47 tests passed
  • All six BPMN fixture families import/export through the native graph
  • Workflow TypeScript and Core production build/bundle budgets passed
  • Focused platform checks and 31 optional-module WebUI permutations passed
## Codex State: done ### Summary - Superseded the separate bpmn-js modeler with BPMN 2.0 as the canonical language of the existing native Workflow graph editor. - Implemented native BPMN nodes and typed flows, safe XML/DI import, deterministic export, stable reference mapping, extension preservation, edge editing/reconnection, and model-permissive validation. - Removed all bpmn-js, moddle, properties-panel, Camunda, and Zeebe dependencies from Workflow and the aggregate Core lock. ### Changed Files - `src/govoplan_workflow/backend/bpmn_graph.py` - `src/govoplan_workflow/backend/node_library.py` - `webui/src/features/workflow/WorkflowPage.tsx` - `webui/src/features/workflow/WorkflowCanvas.tsx` - `webui/src/features/workflow/WorkflowInspector.tsx` - `docs/BPMN_INTEROPERABILITY.md` ### Verification - `Workflow backend suite: 47 tests passed` - `All six BPMN fixture families import/export through the native graph` - `Workflow TypeScript and Core production build/bundle budgets passed` - `Focused platform checks and 31 optional-module WebUI permutations passed`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-workflow#9