M5(1/3): process 的 domain —— 闭合校验、四策略解析、状态聚合
- checkClosure:七类违规(边未映射 / 必填未齐 / 类型冲突 / 孤立节点 / 网关不平衡 / 汇合来源不明 / 容忍分支被必填依赖)+ 活动未安装 + 岗位不存在; 不闭合不得发布 —— 画布即时校验与后端裁决同源 - resolveOwner:四策略封闭(指定人 / 岗位唯一人 / 轮值 / 来源跟随); 岗上多人退轮值,并列按 staffId 稳定排序 —— 解析必须确定性 - aggregateWorkflowState:聚合投影,流程层不另设状态机;计量对象是节点实例, XOR 未选分支不入集合,改道/容忍/升审批已消化即不入异常 - nextInstanceNumber:流级重做重开新实例,不复活旧任务 325 个测试通过,门禁五道全绿 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
co-authored by
Claude Opus 5
parent
3c974d2860
commit
a919d2e961
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* module: process —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。
|
||||
*/
|
||||
export type {
|
||||
ActivityContractFace,
|
||||
Candidate,
|
||||
ClosureInput,
|
||||
ClosureReport,
|
||||
ClosureViolation,
|
||||
NodeInstance,
|
||||
OwnerSpec,
|
||||
ProcessPackage,
|
||||
ResolveContext,
|
||||
Resolution,
|
||||
WorkflowState,
|
||||
} from './contract.ts';
|
||||
export { NotPublishableError, PositionVacantError } from './contract.ts';
|
||||
|
||||
export { checkClosure, publishable } from './internal/domain/closure.ts';
|
||||
export {
|
||||
aggregateWorkflowState,
|
||||
FAILURE_DIGESTIONS,
|
||||
isDigested,
|
||||
nextInstanceNumber,
|
||||
resolveOwner,
|
||||
} from './internal/domain/owner-resolution.ts';
|
||||
Reference in New Issue
Block a user