docs(plan): 回写 T2.4 评审——T3.2 语义校验加 items 非空与自定义完成条件口径

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 11:48:29 +08:00
parent b89447556f
commit 4abe9f8ce6

View File

@@ -301,6 +301,8 @@ commit:`feat(flow): 草稿发布(id还原+ProcessValidator校验门)+影响摘
### Task 3.2 网关:EIP4 语义校验 + 部署审计(Flyway V4)
> 📌 **T2.4 评审补充**:语义校验白名单须加两条——①办理人/会签表达式的 `items` **非空**(`items:[]` 的 MI collection 运行期会炸,仅 JSON 可解析+type 白名单不够);②completionCondition 允许「三预设 或 保留的自定义 body」(T2.4 已实现自定义保留态,校验别把存量自定义条件拒了,白名单改为预设正则 ∪ 非空任意表达式加告警)。
**Files:**
- Create: `platform-flow-gateway/.../aggregate/ModelSemanticValidator.java` + test:解析 XML(**照 WfTemplateService.newJdkDbf :116-135 钉 JDK 解析器**,防 xerces 击穿)→ ①每个 `activiti:candidateUsers`/multiInstance collection 的内嵌 JSON 可解析且 items[].type ∈ 白名单 ②`activiti:formKey` 存在于 view_wftemplate(JdbcTemplate exists)③completionCondition 匹配预设白名单正则。返回 `List<String> errors`。
- Create: `platform-app/src/main/resources/db/migration/V4__flow_deploy_audit.sql`(照 V3 风格):`sys_flow_deploy_audit(id bigserial pk, model_id, deployment_id, process_key, new_version int, operator varchar(64), deployed_at timestamp default now())`