Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A nonexistent fixture filename causes ENOENT failures in both test references, while the documentation mischaracterizes legitimate termination of parallel work within the current iteration.
2 open issues
What changed in this PR
Adds no-multi-instance-termination to bpmnlint to clarify that termination directly inside a multi-instance subprocess affects only the current iteration, addressing #223.
Changes:
- Implements the scope advisory and enables it as a warning in
recommended. - Adds fixtures and tests covering iteration types, nested scopes, event-definition references, and configuration integration.
- Documents the rule with examples of iteration-level and all-iteration cancellation.
| File | Description |
|---|---|
test/spec/config-spec.mjs |
Expects the new recommended warning. |
test/rules/no-multi-instance-termination/valid-other-end-events.bpmn |
Covers non-terminate end events. |
test/rules/no-multi-instance-termination/valid-non-multi-instance.bpmn |
Provides non-multi-instance controls. |
test/rules/no-multi-instance-termination/valid-nested.bpmn |
Covers separate nested termination scopes. |
test/rules/no-multi-instance-termination/transaction.bpmn |
Covers multi-instance transactions. |
test/rules/no-multi-instance-termination/sequential.bpmn |
Covers sequential iterations. |
test/rules/no-multi-instance-termination/referenced-termination.bpmn |
Covers referenced terminate definitions. |
test/rules/no-multi-instance-termination/parallel.bpmn |
Covers explicit and default parallel iterations. |
test/rules/no-multi-instance-termination/nested-multi-instance.bpmn |
Covers nested multi-instance scopes. |
test/rules/no-multi-instance-termination.mjs |
Adds rule and integration assertions. |
test/integration/compilation/test/bpmnlintrc.expected.js |
Updates expected compiled rule registration. |
rules/no-multi-instance-termination.js |
Implements the termination-scope warning. |
docs/rules/README.md |
Links the new rule documentation. |
docs/rules/no-multi-instance-termination.md |
Explains the rule and cancellation examples. |
docs/rules/examples/no-multi-instance-termination-incorrect.bpmn |
Illustrates termination within one iteration. |
docs/rules/examples/no-multi-instance-termination-event-subprocess-correct.bpmn |
Illustrates iteration-level event-subprocess interruption. |
docs/rules/examples/no-multi-instance-termination-correct.bpmn |
Illustrates cancellation of all iterations. |
config/recommended.js |
Enables the advisory at warning level. |
config/all.js |
Registers the rule in the complete ruleset. |
Review effort: Balanced
nikku
force-pushed
the
nikku-detect-multi-instance-termination
branch
from
November 14, 2026 18:53
87fe2f8 to
53f059a
Compare
| </bpmn:endEvent> | ||
| <bpmn:endEvent id="Event_3"> | ||
| <bpmn:incoming>Flow_5</bpmn:incoming> | ||
| <bpmn:escalationEventDefinition id="EscalationEventDefinition_137zzv5" /> |
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.


Proposed Changes
Adds a rule that warns when termination inside multi-instance is used. For non-BPMN experts this is ambiguous - does not do what you may expect (cancel single instance only).
Closes #223
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool