@@ -90,7 +90,7 @@ <h1>Flow Engine 集成手册</h1>
9090
9191< p > 本手册面向后端与前端开发者,完整介绍如何将 Flow Engine(后端)与 flow-frontend(前端框架)集成到一个企业项目中。涵盖后端 Spring Boot 集成、前端 packages 集成能力、插件扩展机制,以及基于官方示例(后端 < code > flow-engine-example</ code > 、前端 < code > app-pc</ code > / < code > app-mobile</ code > )的集成分析。</ p >
9292
93- < div class ="tip "> < strong > 适用版本</ strong > :后端 < code > 0.0.52 </ code > (Java 17 / Spring Boot 3.5.9);前端 < code > 0.0.52 </ code > (React 18 / TypeScript 5 / pnpm 10 monorepo)。</ div >
93+ < div class ="tip "> < strong > 适用版本</ strong > :后端 < code > 0.1.0-SNAPSHOT </ code > (Java 17 / Spring Boot 3.5.9);前端 < code > 0.1.9 </ code > (React 18 / TypeScript 5 / pnpm 10 monorepo)。</ div >
9494
9595< div class ="toc ">
9696 < h3 > 目录</ h3 >
@@ -222,14 +222,14 @@ <h3>2.1 一站式引入(推荐)</h3>
222222< pre > < code > <dependency>
223223 <groupId>com.codingapi.flow</groupId>
224224 <artifactId>flow-engine-starter</artifactId>
225- <version>0.0.52 </version>
225+ <version>0.1.0-SNAPSHOT </version>
226226</dependency></ code > </ pre >
227227
228228< p > starter 通过 Spring Boot 自动装配机制注册以下 < code > AutoConfiguration</ code > :</ p >
229229< table >
230230 < tr > < th > 自动配置类</ th > < th > 来源模块</ th > < th > 职责</ th > </ tr >
231231 < tr > < td > < code > com.codingapi.flow.AutoConfiguration</ code > </ td > < td > flow-engine-starter</ td > < td > 注册 FlowService / WorkflowService / FlowRecordService / RepositoryHolderContext / 网关上下文 / 脚本上下文 / 延迟任务 Runner</ td > </ tr >
232- < tr > < td > < code > com.codingapi.flow.infra.AutoConfiguration</ code > </ td > < td > flow-engine-starter-infra</ td > < td > 注册 10 个 JPA 仓储实现,并通过 < code > FlowJpaPackageRegistrar</ code > 注册 JPA 扫描包 < code > com.codingapi.flow.infra</ code > </ td > </ tr >
232+ < tr > < td > < code > com.codingapi.flow.infra.AutoConfiguration</ code > </ td > < td > flow-engine-starter-infra</ td > < td > 注册 11 个 JPA 仓储实现,并通过 < code > FlowJpaPackageRegistrar</ code > 注册 JPA 扫描包 < code > com.codingapi.flow.infra</ code > </ td > </ tr >
233233 < tr > < td > < code > com.codingapi.flow.api.AutoConfiguration</ code > </ td > < td > flow-engine-starter-api</ td > < td > 扫描 < code > com.codingapi.flow.api</ code > ,注册命令类 Controller(< code > /api/cmd/**</ code > )</ td > </ tr >
234234 < tr > < td > < code > com.codingapi.flow.query.AutoConfiguration</ code > </ td > < td > flow-engine-starter-query</ td > < td > 扫描 < code > com.codingapi.flow.query</ code > ,注册查询类 Controller(< code > /api/query/**</ code > )</ td > </ tr >
235235</ table >
@@ -285,8 +285,8 @@ <h2 id="be-extends">5. 后端:扩展点</h2>
285285< table >
286286 < tr > < th > 扩展点</ th > < th > 说明</ th > </ tr >
287287 < tr > < td > 事件订阅</ td > < td > 实现 < code > IHandler<E></ code > 订阅 7 种事件:Start / Todo / Done / Finish / Urge / Revoke / Delete,自动被 Spring 扫描</ td > </ tr >
288- < tr > < td > 节点策略</ td > < td > 15+ 策略 (OperatorLoad / RecordMerge / Revoke / Router / FormFieldPermission 等)由 < code > NodeStrategyManager</ code > 持有,可扩展 </ td > </ tr >
289- < tr > < td > 自定义动作</ td > < td > 8 种内置动作(PASS/REJECT/RETURN/TRANSFER/DELEGATE/ADD_AUDIT/SAVE/CUSTOM),扩展 < code > BaseAction </ code > 实现新动作 </ td > </ tr >
288+ < tr > < td > 节点策略</ td > < td > 15 种策略 (OperatorLoad / RecordMerge / Revoke / Router / FormFieldPermission 等)由 < code > NodeStrategyManager</ code > 持有(工厂固定注册,不支持新增策略类型;业务方通过策略配置 + Groovy 脚本表达差异) </ td > </ tr >
289+ < tr > < td > 自定义动作</ td > < td > 8 种内置动作(PASS/REJECT/RETURN/TRANSFER/DELEGATE/ADD_AUDIT/SAVE/CUSTOM)由 < code > FlowActionFactory </ code > 固定注册(不支持新增动作类型);业务方通过 CUSTOM 动作 + Groovy 脚本表达自定义行为 </ td > </ tr >
290290 < tr > < td > 自定义脚本注册</ td > < td > < code > ScriptRegistryContext.getInstance().setRegistry(new CustomScriptRegistry())</ code > 替换默认 Groovy 脚本</ td > </ tr >
291291</ table >
292292
@@ -611,7 +611,7 @@ <h2 id="fullstack">15. 全栈集成最佳实践</h2>
611611 <!-- 约束 -->
612612 < rect x ="620 " y ="30 " width ="260 " height ="280 " rx ="12 " fill ="#fffbeb " stroke ="#f59e0b "/>
613613 < text x ="750 " y ="56 " text-anchor ="middle " font-size ="14 " font-weight ="700 " fill ="#92400e "> 通用约束</ text >
614- < text x ="635 " y ="84 " font-size ="12 " fill ="#334155 "> • 前后端版本对齐(0.0.52 )</ text >
614+ < text x ="635 " y ="84 " font-size ="12 " fill ="#334155 "> • 前后端版本对齐(0.1.x )</ text >
615615 < text x ="635 " y ="108 " font-size ="12 " fill ="#334155 "> • 前端跨包用完整包名 import</ text >
616616 < text x ="635 " y ="132 " font-size ="12 " fill ="#334155 "> • TS strict,禁用 any</ text >
617617 < text x ="635 " y ="156 " font-size ="12 " fill ="#334155 "> • 样式用 .module.scss</ text >
0 commit comments