引入skipped机制并且完善多节点的断流问题#604
Open
swfnotswift wants to merge 18 commits intoModelEngine-Group:hzjh-mainfrom
Open
引入skipped机制并且完善多节点的断流问题#604swfnotswift wants to merge 18 commits intoModelEngine-Group:hzjh-mainfrom
swfnotswift wants to merge 18 commits intoModelEngine-Group:hzjh-mainfrom
Conversation
added 15 commits
March 19, 2026 15:23
# Conflicts: # app-builder/waterflow/java/waterflow-service/src/main/java/modelengine/fit/waterflow/flowsengine/domain/flows/context/FlowContext.java # app-builder/waterflow/java/waterflow-service/src/main/java/modelengine/fit/waterflow/flowsengine/domain/flows/streams/To.java
# Conflicts: # app-builder/waterflow/java/waterflow-service/src/main/java/modelengine/fit/waterflow/flowsengine/domain/flows/streams/To.java
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.
🔗 相关问题 / Related Issue
Issue 链接 / Issue Link: #{$IssueNumber} 👈👈
📋 变更类型 / Type of Change
📝 变更目的 / Purpose of the Change
本文档详细说明 Waterflow 流程引擎中引入的 Skipped 机制以及 多 END 节点断流逻辑的设计与实现。该机制解决了以下两个核心问题:
并发环境下 Condition 节点另一条分支"饿死"问题:当 Condition 节点存在多条分支时,未匹配条件的分支在某些并发场景下无法正确参与后续汇聚,导致流程状态不一致。
多 END 节点场景下断流信号丢失问题:配置了多个 END 节点的流程在执行时,部分 END 节点的触发无法正确入库,导致终止信号无法发送,前端无法收到流程结束通知。
1.2 涉及范围
FlowNodeStatus.javaFlowContext.javaConditionsNode.javaFlowConditionNode.javaFlowNode.javaWhen.java,To.javaFlowContextMemoRepo.java,FlowContextPersistRepo.javaFlowRuntimeServiceImpl.javaRestartContextSchedule.javaConstant.javaAippFlowEndCallback.javaEndNodeStatusMapper.xml📋 主要变更 / Brief Changelog
Constant.javaINTERNAL_SKIPPED_SIGNAL_KEY常量;更新状态互斥表FlowNodeStatus.javaSKIPPED枚举值FlowContext.javamarkSkippedSignal()、isSkippedSignal()、fork()方法ConditionsNode.javaenableConditionSkip参数及分支分发逻辑FlowConditionNode.javaWhen.javaTo.javaFlowContextMemoRepo.javaFlowContextPersistRepo.javagetPendingAndSkippedBySubscriptions()方法FlowRuntimeServiceImpl.javaRestartContextSchedule.javaAippFlowEndCallback.javaEndNodeStatusMapper.xmlterminal_sent直接写死为 false🧪 验证变更 / Verifying this Change
测试步骤 / Test Steps
测试覆盖 / Test Coverage
📸 截图 / Screenshots
✅ 贡献者检查清单 / Contributor Checklist
请确保你的 Pull Request 符合以下要求 / Please ensure your Pull Request meets the following requirements:
基本要求 / Basic Requirements:
代码质量 / Code Quality:
测试要求 / Testing Requirements:
mvn -B clean package -Dmaven.test.skip=true,npm install --force && npm run build:pro/ Basic checks passmvn clean install/ Unit tests pass文档和兼容性 / Documentation and Compatibility:
📋 附加信息 / Additional Notes
审查者注意事项 / Reviewer Notes: