Skip to content

intent: a process step named start no longer collides with the BPMN start event's id (#8058) - #8060

Merged
iliyan-velichkov merged 1 commit into
masterfrom
issue-8058-bpmn-start-event-id
Oct 22, 2026
Merged

iliyan-velichkov merged 1 commit into
masterfrom
issue-8058-bpmn-start-event-id

Conversation

@iliyan-velichkov

Copy link
Copy Markdown
Contributor

Cause

BpmnIntentGenerator gave every start event the fixed id start (START_ID), and every step becomes a BPMN element whose id is the step's name. A step named start produced two elements with one id: Generate succeeded, publish failed with cvc-id.2: There are multiple occurrences of ID value 'start', and the .bpmn stayed FAILED with the process never starting.

Change

Option 1 of the issue (generator, no author-facing rule), narrowed to avoid its trade-off:

  • The start event's id is chosen per process (startEventId): start unless an element of the process already carries it (authored and synthesized steps, parallel joins, the abort then step), then startEvent (startEvent2, ... if that is taken too).
  • The linear chain, the <startEvent>, its outgoing flow and the diagram layout all use the chosen id. nodeSize takes it too, so a step named start is drawn as a task, not as the event's 30x30 circle.
  • Only a colliding process changes. Every other generated .bpmn stays byte-identical, so no existing project churns on regeneration, and the ITs that assert sourceRef="start" are unaffected.

Nothing reads the generated start event by id: the hits for id="start" outside the generator are hand-written BPMN fixtures (and IntentResilienceBpmnContractTest, a hand-written copy of the generated shape).

Not addressed here, same family: the abort subprocess's start event is <Process>AbortStart, which an author could also claim by naming a step exactly that. It is prefixed by the process id, so it never hits by accident the way start did.

Verification

  • StartEventIdBpmnTest (new): every id in the document unique, startEvent -> start flow, the step drawn as a task, the fallback also moving aside, and a non-colliding process keeping <startEvent id="start">. Against the unfixed generator it fails with duplicate id [start].
  • engine-intent unit suite: 1796 tests, green.
  • IntentEngineIT (83), IntentEmissionCoverageIT, IntentSetManyIT: green. IntentSetManyIT's trigger step is named start again (it had been renamed to begin to dodge this in intent: one setter step writes several members of one record in one statement - set: { slotKey: null, Status: DONE } (#8042) #8055), so it now generates, publishes, deploys and runs the colliding shape; no Failed to deploy BPMN in the log.
  • mvn -T 1C formatter:validate green with the formatter cache wiped.
  • Not run: the full IT suite, PostgreSQL. The release javadoc build was not needed, since only private members gained Javadoc.

Fixes #8058

🤖 Generated with Claude Code

… start event's id (#8058)

BpmnIntentGenerator gave every start event the fixed id `start`, and every
step becomes an element whose id is its name. A step named `start` therefore
produced two elements with one id: Generate succeeded, and publish failed with
`cvc-id.2: There are multiple occurrences of ID value 'start'`, leaving the
.bpmn FAILED and the process never started.

The start event's id is now chosen per process: `start` unless an element of
the process already carries it, then `startEvent` (numbered if that is taken
too). The chain, the start event, its outgoing flow and the diagram layout all
use the chosen id - nodeSize no longer draws a step named `start` as the
event's circle. Only a colliding process changes; every other generated .bpmn
stays byte-identical, and authors get no new naming rule.

Verified: StartEventIdBpmnTest (fails on master with duplicate id [start],
passes here), the engine-intent unit suite (1796 tests), and IntentEngineIT,
IntentEmissionCoverageIT and IntentSetManyIT - whose trigger step is named
`start` again (it had been renamed to `begin` to dodge this, #8055) and now
deploys and runs. formatter:validate green with the cache wiped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iliyan-velichkov
iliyan-velichkov merged commit 46594d2 into master Oct 22, 2026
16 checks passed
@iliyan-velichkov
iliyan-velichkov deleted the issue-8058-bpmn-start-event-id branch October 22, 2026 15:15
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.

intent: a process step named start collides with the BPMN start event's id - the process never deploys

1 participant