feat(workflows): save BPMN documents with subprocesses - #1033
Merged
Merged
Conversation
elsa-core now keeps a subprocess's stored body and bindings across the document PUT (elsa-workflows/elsa-core#8077), so Studio no longer needs to refuse saving a BPMN document that declares one. Removes BpmnDocumentFailureReason.SubProcessContentNotCarried, the SubProcessIds check, and the "Performed by" panel's CanEdit/Save gating and info alert. Editing an element inside a subprocess is still refused, since its body still isn't part of the document, and now names that as a server limitation tracked in elsa-workflows/elsa-core#8076 instead of implying a Studio one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
… subprocess Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 #1032. Part of elsa-workflows/elsa-core#7909.
Why
#1031 refused to save a BPMN document that declared a subprocess, transaction or event subprocess. The core document PUT used to write those bodies empty. elsa-workflows/elsa-core#8077 fixed that: the PUT now restores each kept subprocess's stored body, with every binding inside it, by element id. The contract is unchanged.
What changed
BpmnDocumentFailureReason.SubProcessContentNotCarried, theSubProcessIdscheck inBpmnDocumentSession.SaveAsync, and the panel'sCanEdit/ Save-button gating and info alert. Top-level tasks in a process with subprocesses are now editable and saveable.BpmnDefinitionsDocument.FindSubProcessIdsandSubProcessElementType, which were dead code after the above.Compatibility
The document endpoints exist only in elsa-core 3.8 preview builds. Preview builds made between elsa-core #8060 and #8077 serve them without the fix, and saving from Studio against those builds would still empty subprocesses. No stable release is affected.
Tests
SaveAsyncon a document with a subprocess sends the PUT.Elsa.Studio.Workflows.Testsrun: 445/445.WorkflowInstanceDesignerDisconnectRefreshTests(from fix(workflows): stop instance designer refresh timers when the circuit disconnects #992) appeared once under heavy machine load. It did not reproduce in 2 runs on this branch or 2 runs onmain.🤖 Generated with Claude Code