Description
The typed navigation graph introduced in PR #55 (implementing #54) reshapes the generated Relations section and adds structural members that are not derived from BPMN ids — the scope/per-node then(), the Next successor holder, and the Inner subprocess scope. Node objects and their accessors, by contrast, are derived from element ids via toCamelCase. When an element id folds onto one of these structural names, the generated Kotlin/Java Relations fails to compile.
CollisionDetectionService does not catch this: the flow-node collision check added in #63 (ADR-011) only compares element-derived names against each other (getRawName().toCamelCase()), not against the generator's reserved structural names. Before #55, Relations used UPPER_SNAKE_CASE properties with no such members, so this collision surface is new to that PR.
This ticket asks to evaluate the real-world likelihood and decide on a fix — e.g. reserve the structural names (then, Next, Inner, and the per-node name / calledProcess fields) in the collision rule, or escape/namespace them in the generator.
Steps to Reproduce
- Create a BPMN process with a start event and a flow node whose id is
next (or then).
- Generate the Process API (Kotlin or Java).
- Compile the generated
…ProcessApi source.
Expected Behaviour
Either the model is rejected up front with a clear collision error (consistent with the existing identifier-folding detection from #63 / ADR-011), or the generator escapes/namespaces the structural members so that any valid BPMN id produces compiling code.
Actual Behaviour
Validation passes, but the generated Relations does not compile — e.g. Conflicting declarations: object Next, object Next for id next, or a property/function clash on then for id then. Java produces the equivalent "already defined" errors (duplicate nested class Next; two then() methods differing only by return type).
Plugin Version
n/a — introduced on PR #55 (branch emaarco/analyze-scenario-test-builder), not yet released
Process Engine
Not applicable
Output Language
Kotlin (Java affected equivalently)
Description
The typed navigation graph introduced in PR #55 (implementing #54) reshapes the generated
Relationssection and adds structural members that are not derived from BPMN ids — the scope/per-nodethen(), theNextsuccessor holder, and theInnersubprocess scope. Node objects and their accessors, by contrast, are derived from element ids viatoCamelCase. When an element id folds onto one of these structural names, the generated Kotlin/JavaRelationsfails to compile.CollisionDetectionServicedoes not catch this: the flow-node collision check added in #63 (ADR-011) only compares element-derived names against each other (getRawName().toCamelCase()), not against the generator's reserved structural names. Before #55,RelationsusedUPPER_SNAKE_CASEproperties with no such members, so this collision surface is new to that PR.This ticket asks to evaluate the real-world likelihood and decide on a fix — e.g. reserve the structural names (
then,Next,Inner, and the per-nodename/calledProcessfields) in the collision rule, or escape/namespace them in the generator.Steps to Reproduce
next(orthen).…ProcessApisource.Expected Behaviour
Either the model is rejected up front with a clear collision error (consistent with the existing identifier-folding detection from #63 / ADR-011), or the generator escapes/namespaces the structural members so that any valid BPMN id produces compiling code.
Actual Behaviour
Validation passes, but the generated
Relationsdoes not compile — e.g.Conflicting declarations: object Next, object Nextfor idnext, or a property/function clash onthenfor idthen. Java produces the equivalent "already defined" errors (duplicate nestedclass Next; twothen()methods differing only by return type).Plugin Version
n/a — introduced on PR #55 (branch
emaarco/analyze-scenario-test-builder), not yet releasedProcess Engine
Not applicable
Output Language
Kotlin (Java affected equivalently)