fix(bpmn): let the graph hash alone decide BPMN source staleness - #8079
Merged
Merged
Conversation
A metadata-only save (a rename, a variable edit) bumps a published definition to a new draft version without touching the graph, but the stale check compared the version unconditionally, refusing export/document GET even though the graph the stored source describes had not moved. Once the graph-hash marker is present it now decides staleness on its own; the version check remains only as a fallback for definitions imported before that marker existed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
This was referenced Sep 12, 2026
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.
Closes #8073. Part of #7909.
Problem
Publishing at version N and then saving anything through the designer, such as a rename or a variable change, creates draft N+1. That draft still carries
Bpmn:SourceVersion = N. Because staleness required the version and the graph hash to match, the untouched BPMN source counted as stale. Export and the document GET refused, and Studio's binding editor told the user to re-import.Fix
In
BpmnInterchangeDocumentService.ResolveSourceXml, the single place staleness is decided for export, document GET and document PUT: when theBpmn:SourceGraphHashmarker is present, the graph hash alone decides. The version comparison applies only to definitions imported before the marker existed. The document ETag and the refusal codes are unchanged.A graph change in the same draft, or in a new draft, still changes the hash, so it is still stale.
Tests
bpmn.export.source-stale, at both the service and endpoint levels.The tests simulate publishing by setting
IsPublishedon the stored row, through one shared helper (Support/PublishSimulation). The real publisher refuses a none-start BPMN process because of a separate defect, filed as #8078. The helper becomes a realPublishAsynccall once that lands.🤖 Generated with Claude Code