Repository navigation
Conversation
- flow-engine-starter-infra 改为 pom 聚合,原 JPA 实现整体迁入 infra-db(包名不变,自动配置与表名零改动) - framework 新增 IScriptExecutor 端口;FlowScriptRuntimeContext#execute 成为统一执行入口,12 个脚本类改走端口,绑定变量与位置参数分离 - infra-groovy 提供 GroovyScriptExecutor 与三类脚本持久化实现,@ConditionalOnMissingBean 保证接入方自定义优先 - example 删除重复的 12 个脚本存储类;starter/api/query 依赖切到 infra-db - 文档同批更新:README、AGENTS、Integration/repository-integration、capabilities/script 与索引 - 新增 ScriptExecutorPortTest 6 例 Closes #316
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #318 +/- ##
=========================================
Coverage 76.51% 76.52%
- Complexity 2197 2204 +7
=========================================
Files 288 288
Lines 8867 8870 +3
Branches 1055 1059 +4
=========================================
+ Hits 6785 6788 +3
Misses 1557 1557
Partials 525 525 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
我看了一下,还是存在比较大的设计偏差的,并没有真正的实现隔离。 |
Contributor
Author
|
按 #316 方案重规划(v2,见 issue 评论 7399719715)作废弃除:本 PR 只在执行链路上加了端口,framework 仍编译依赖 springboot-starter-script,且脚本引用形态被强制为 key,未实现真正隔离。重做基线改为基于 dev 的 feature/issue-316-script-isolation(后端 + 前端 flow-frontend 两个仓库),本 PR 不再合并。 |
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.
方案
按 #316 的结论,把
flow-engine-starter-infra改为 pom 聚合,拆成infra-db与infra-groovy;framework 通过IScriptExecutor端口分离脚本执行能力,实现放在 infra-groovy。模块划分
flow-engine-starter-infra(pom 聚合)flow-engine-starter-infra-db:原 JPA 实现整体迁入,包名com.codingapi.flow.infra.*不变,spring.factories/AutoConfiguration.imports/FlowJpaPackageRegistrar零改动flow-engine-starter-infra-groovy:脚本执行端口实现 + 三类脚本持久化flow-engine-starter同时依赖两个子模块;starter-api/starter-query改依赖infra-db;根 pomdependencyManagement同步脚本执行端口
IScriptExecutor(com.codingapi.flow.gateway),方法显式区分「绑定变量」与「位置参数」:外部库invoke(Map, Object...)与invoke(Object...)是两个重载,混在一个变长参数里会让run(request)收到两个参数FlowScriptRuntimeContext#execute成为统一执行入口,12 个脚本类改走端口executeContent,否则走executegetGroovyScript通道,framework 无 Spring 环境的行为不变infra-groovy提供GroovyScriptExecutor,ScriptExecutorRegister完成装配脚本存储下沉
t_groovy_script、t_groovy_script_temp、t_node_view_javascript与脚本 key 不变AutoConfiguration以@ConditionalOnMissingBean注册,接入方自定义实现优先验证
./mvnw -o clean install(含全量测试)通过:ScriptExecutorPortTest6 例(红灯先行,再实现转绿)边界与兼容
GroovyScript类型(FlowGroovyScriptFactory、WorkflowGroovyScriptTransferService、WorkflowRuntime),FlowScriptRuntimeContext#getGroovyScript作为存量入口保留并由既有 6 个用例守护。彻底抽象类型需单独批次。@SequenceGenerator外置、达梦序列清单补齐、数据库驱动改 optional(阶段二)本轮未做。FlowOperatorGateway仍需业务方提供。文档
同批更新
README.md、AGENTS.md、docs/Integration/repository-integration.md、docs/capabilities/flow-engine-framework/script.md与docs/capabilities/index.md。交付
codingapi/flow-enginefeature/issue-316-infra-gateway-splitf7d3743692ebe8259a211dee5213f8a82eb12a36dev,未合并dev关联 issue:#316