Skip to content

refactor(codegen)!: drop redundant Flows and Compensations API sections - #85

Merged
emaarco merged 1 commit into
mainfrom
emaarco/next-outgoing-requirement
Aug 14, 2026
Merged

refactor(codegen)!: drop redundant Flows and Compensations API sections#85
emaarco merged 1 commit into
mainfrom
emaarco/next-outgoing-requirement

Conversation

@emaarco

@emaarco emaarco commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

Removes generated-API content that duplicates other, better sources — a net removal of ~630 lines.

  • Flows section + the BpmnFlow runtime type — the process shape (every sequence flow with condition/isDefault, every element) is served richer by the Process JSON v2 export. Nothing consumed the generated Flows object: not the ProcessPath navigation DSL, nor the testing/web modules.
  • Compensations section — only re-listed ElementId constants already present in Elements. It resembles the Messages/Signals pattern but isn't equivalent: those surface a distinct semantic key (the message/signal name), whereas compensation's reference is an element id, so the section could only duplicate Elements.
  • Also drops the already-dead BpmnRelations runtime type (emitted by no generator since the reshaped Relations landed).

Compensation stays a first-class domain concept — CompensationDefinition, extraction across all engines, and the JSON export are unchanged. Only the redundant code-generation sections go.

Breaking

Generated Process APIs no longer contain the Flows or Compensations objects; the BpmnFlow and BpmnRelations runtime types are removed.

  • Migration: read sequence flows from the JSON export; use Elements for compensation element ids.

Verification

  • ./gradlew build green (all modules, ktlint + detekt + konsist architecture tests + coverage).
  • API goldens and the runtime worked examples regenerated without the removed sections.

Remove the generated `Flows` and `Compensations` sections plus the now-unused
`BpmnFlow` and the dead `BpmnRelations` runtime types.

Process shape (every sequence flow with its condition/default, every element)
is served by the Process JSON v2 export; compensation element ids already live
in `Elements`. Nothing consumed `Flows` (not the ProcessPath DSL, testing or web
modules), and `Compensations` only re-listed ids from `Elements`. Compensation
stays a first-class domain concept — extraction and JSON output are unchanged;
only the redundant code-generation sections go.

BREAKING CHANGE: generated Process APIs no longer contain the `Flows` or
`Compensations` objects, and the `BpmnFlow` and `BpmnRelations` runtime types are
removed. Read sequence flows from the JSON export; use `Elements` for compensation
element ids.

Co-authored-by: Claude <noreply@anthropic.com>
@emaarco
emaarco force-pushed the emaarco/next-outgoing-requirement branch from 83527c7 to 9c0c73f Compare August 14, 2026 12:15
@emaarco
emaarco enabled auto-merge (squash) August 14, 2026 12:16
@emaarco emaarco self-assigned this Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test Coverage

Module Line Coverage
bpmn-to-code-core 97.6% (2244/2300 lines)
bpmn-to-code-gradle 25.7% (29/113 lines)
bpmn-to-code-maven 62.2% (28/45 lines)
bpmn-to-code-web 95.6% (196/205 lines)
bpmn-to-code-testing 97.2% (171/176 lines)
bpmn-to-code-runtime 100.0% (80/80 lines)

@emaarco
emaarco merged commit 2f90f6f into main Aug 14, 2026
6 checks passed
@emaarco
emaarco deleted the emaarco/next-outgoing-requirement branch August 14, 2026 12:19
This was referenced Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant