Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
a5199a0
feat: 支持操作者身份标识的存储与脚本读取(issue #288 P1)
xlorne Nov 23, 2026
6e71220
chore(release): 版本号升级至 0.3.0-SNAPSHOT(中版本)
xlorne Nov 23, 2026
07425ab
feat: 操作者身份标识的请求透传、待办隔离与审批判定(issue #288 P2/P3)
xlorne Nov 23, 2026
7859108
feat(script): 脚本支持按身份获取操作者(issue #288)
xlorne Nov 23, 2026
9af745f
fix(identity): 补齐 issue #288 代码评审发现的偏离与测试缺口
xlorne Nov 23, 2026
f71ff20
refactor(identity): 收敛身份标识扩展点并同步前端子模块(issue #288)
xlorne Dec 2, 2026
e80934c
fix(identity): 修复批量取人身份丢失与入口校验缺口(issue #288 评审)
xlorne Dec 2, 2026
1066281
feat(example): 自动生成身份标识演示数据,便于前后端可视化验证(issue #288)
xlorne Dec 2, 2026
e278740
docs(identity): 补充「审批人待办落在默认身份」的排查说明并同步前端子模块(issue #288)
xlorne Dec 2, 2026
9dab8a9
feat(identity): 身份只作用于脚本与留痕,办理权限按人员判定(issue #297)
xlorne Dec 2, 2026
b6531c0
chore(example): 同步前端子模块(身份提示改为操作身份口径,issue #297)
xlorne Dec 2, 2026
9d8796e
docs(identity): 示例验证步骤改为跨身份口径并补充移动端入口(issue #297)
xlorne Dec 2, 2026
bf841cb
docs(identity): 全量对齐身份相关文档与代码现状(issue #297)
xlorne Dec 2, 2026
06e9847
docs(user-integration): 补充 findByIds(ids, identity) 重载说明(issue #297)
xlorne Dec 2, 2026
0fda160
docs(example): 演示初始化器注释改为跨身份口径(issue #297)
xlorne Dec 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 项目概述

Flow Engine 是一个企业级工作流引擎,基于 Java 17 和 Spring Boot 3.5.9 构建(当前版本 0.1.0-SNAPSHOT)。
Flow Engine 是一个企业级工作流引擎,基于 Java 17 和 Spring Boot 3.5.9 构建(当前版本 0.3.0-SNAPSHOT)。

### 核心模块

Expand Down
3 changes: 2 additions & 1 deletion docs/Integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
|------|------|
| [快速开始](./quick-start.md) | 最小集成步骤:引入依赖 → 提供 Bean → 编写流程 → 发起流程 |
| [流程用户体系](./user-integration.md) | `FlowOperatorGateway` / `IFlowOperator` / `GatewayContext` / 线程缓存 / 当前登录人 |
| [多身份参与](./operator-identity.md) | 同一人员多身份:身份 SPI、请求声明、查询范围、判定模式(`USER_ONLY`/`STRICT`)、升级 DDL |
| [流程默认脚本](./script-integration.md) | 12 种脚本类型、`GroovyScriptRequest` 完整 API、`$bind`、默认脚本替换、脚本生命周期 |
| [流程事件机制](./event-integration.md) | 9 种事件、`EventPusher`、`IHandler` 订阅、异步分发管道、事务变体、推送时机 |
| [仓储抽象与持久化](./repository-integration.md) | `IRepositoryHolder`、12 个仓储接口(含 11 个 JPA 实现 + 需自行实现的 `NodeViewJavaScriptRepository`)、脚本仓储、锁机制 |
| [Spring Boot 自动配置](./auto-configuration.md) | `AutoConfiguration` 8 个 Bean、4 个 Register、必选/可选 Bean 清单 |
| [Spring Boot 自动配置](./auto-configuration.md) | `AutoConfiguration` 10 个 Bean、5 个 Register、必选/可选 Bean 清单、配置项 |
| [REST API](./rest-api.md) | 5 个 Controller、`mockKey`/`operatorId` 分流机制、请求/响应结构 |
| [Mock 模式](./mock-mode.md) | 全内存沙箱 `MockInstance`、15 分钟过期、接入方式 |
| [节点/动作/策略扩展](./extension-points.md) | 19 种节点 × 9 种动作 × 15 种节点策略 × 2 种流程策略,扩展方式 |
Expand Down
14 changes: 13 additions & 1 deletion docs/Integration/auto-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
- `META-INF/spring.factories` → `EnableAutoConfiguration=com.codingapi.flow.AutoConfiguration`
- `META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports` → `com.codingapi.flow.AutoConfiguration`

`AutoConfiguration` 为 `@Configuration`,**无 `@ConditionalOnMissingBean`、无条件注解** —— 构造函数依赖的 Bean 缺失将导致启动失败。
`AutoConfiguration` 为 `@Configuration` + `@EnableConfigurationProperties(FlowProperties.class)`(issue #297 起)。
除 `SpringFlowEventPublisher`(带 `@ConditionalOnMissingBean` / `@ConditionalOnProperty`)外**无条件注解** ——
所需 Bean 缺失将导致启动失败。

## 2. 注册的 Bean 全清单

| @Bean | 依赖 | 作用 |
|---|---|---|
| `OperatorIdentityPolicyRegister` | `FlowProperties` | 启动时把 `codingapi.flow.identity.match-mode` 写入 framework 的 `OperatorIdentityPolicy`(issue #297) |
| `NodeViewJavaScriptCacheContextRegister` | **`NodeViewJavaScriptRepository`** | 构造器内执行 `NodeViewJavaScriptCacheContext.getInstance().setNodeViewJavaScriptRepository(repo)`(15 分钟缓存上下文) |
| `GatewayContextRegister` | **`FlowOperatorGateway`** | 把操作人网关灌入 `GatewayContext` 单例(`InitializingBean`) |
| `FlowScriptContextRegister` | `ApplicationContext` + **`FlowOperatorGateway`** + `FlowRecordRepository` | 给 `FlowScriptContext` 单例设置 `IBeanFactory`(转发 Spring 容器,脚本 `$bind` 依赖) |
| `RepositoryHolderContextRegister` | `WorkflowService` + `FlowRecordService` + 6 个仓储 + `GatewayContextRegister` | 把 8 个依赖灌入 `RepositoryHolderContext` 单例(`InitializingBean`) |
| `SpringFlowEventPublisher` | `ApplicationContext` | 事务提交后投递 + 按流程 id 分区串行(可用 `codingapi.flow.event.ordered=false` 关闭,关闭后回退事件框架直投) |
| `FlowRecordService` | `FlowTodoRecordRepository` + `FlowTodoMergeRepository` + `FlowRecordRepository` | 记录服务 Bean |
| `WorkflowService` | `WorkflowVersionRepository` + `WorkflowRepository` + `WorkflowRuntimeRepository` | 流程设计服务 Bean |
| `FlowService` | `RepositoryHolderContextRegister`(仅保证顺序) | `new FlowService(RepositoryHolderContext.getInstance())`,业务入口 |
Expand All @@ -29,6 +33,13 @@
全部位于 `flow-engine-starter/src/main/java/com/codingapi/flow/register/`,均实现 `InitializingBean`:

```java
// OperatorIdentityPolicyRegister(issue #297)
@Override
public void afterPropertiesSet() {
// framework 不依赖 Spring,模式通过静态持有者传递
OperatorIdentityPolicy.setMatchMode(flowProperties.getIdentity().getMatchMode());
}

// GatewayContextRegister
@Override
public void afterPropertiesSet() {
Expand Down Expand Up @@ -89,6 +100,7 @@ public void afterPropertiesSet() {

| 配置前缀 | 作用 |
|---|---|
| `codingapi.flow.identity.match-mode` | 身份匹配模式:`USER_ONLY`(starter 默认,办理只比人员)/ `STRICT`(人员+身份,framework 默认)。启动时生效,不支持热切换(issue #297) |
| `codingapi.script.tempValidTime` | 临时脚本有效期(默认 15 分钟) |
| `codingapi.script.shellMaxCacheSize` | 脚本编译缓存上限(默认 10240) |
| `codingapi.framework.handler-thread-pool-size` | 异步事件线程池大小(默认 20) |
Expand Down
Loading
Loading