Repository navigation
intent: a process step named start no longer collides with the BPMN start event's id (#8058) - #8060
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
BpmnIntentGeneratorgave every start event the fixed idstart(START_ID), and every step becomes a BPMN element whose id is the step's name. A step namedstartproduced two elements with one id: Generate succeeded, publish failed withcvc-id.2: There are multiple occurrences of ID value 'start', and the.bpmnstayedFAILEDwith the process never starting.Change
Option 1 of the issue (generator, no author-facing rule), narrowed to avoid its trade-off:
startEventId):startunless an element of the process already carries it (authored and synthesized steps, parallel joins, the abortthenstep), thenstartEvent(startEvent2, ... if that is taken too).<startEvent>, its outgoing flow and the diagram layout all use the chosen id.nodeSizetakes it too, so a step namedstartis drawn as a task, not as the event's 30x30 circle..bpmnstays byte-identical, so no existing project churns on regeneration, and the ITs that assertsourceRef="start"are unaffected.Nothing reads the generated start event by id: the hits for
id="start"outside the generator are hand-written BPMN fixtures (andIntentResilienceBpmnContractTest, 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 waystartdid.Verification
StartEventIdBpmnTest(new): everyidin the document unique,startEvent -> startflow, 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].IntentEngineIT(83),IntentEmissionCoverageIT,IntentSetManyIT: green.IntentSetManyIT's trigger step is namedstartagain (it had been renamed tobeginto 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; noFailed to deploy BPMNin the log.mvn -T 1C formatter:validategreen with the formatter cache wiped.Fixes #8058
🤖 Generated with Claude Code