@mldong/jeeflow 1.8.19 → 1.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.js +19 -3
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -135,9 +135,13 @@ export class EngineImpl {
|
|
|
135
135
|
// createTask 不再触发(引擎语义修正),此处为完成任务节点的唯一触发点
|
|
136
136
|
await this.firePost(curNode, inst);
|
|
137
137
|
const ct = curNode.properties?.countersignType;
|
|
138
|
-
|
|
139
|
-
//
|
|
140
|
-
|
|
138
|
+
const csCond = String(curNode.properties?.countersignCompletionCondition ?? '').trim();
|
|
139
|
+
// issues/91:会签一票否决仅当节点配置 ONE_VOTE_VETO(忽略大小写)时生效,
|
|
140
|
+
// submitType=20 才跳过会签"未完成即停留"门控提前流转;否则为软拒绝——
|
|
141
|
+
// 否决者任务正常完成、countersignDisagreeFlag=1 已记录为变量(供下游参考),
|
|
142
|
+
// 流程不阻断(对齐 mldong 内置引擎 / Java CountersignHandler)
|
|
143
|
+
const csVeto = !!ct && csCond.toUpperCase() === 'ONE_VOTE_VETO' &&
|
|
144
|
+
Number(vars[KeySubmitType]) === Number(SubmitType.CountersignDisagree);
|
|
141
145
|
if (ct === 'SEQUENTIAL' && !csVeto) {
|
|
142
146
|
const doing = await this.repo.findDoingTasks(inst.id);
|
|
143
147
|
if (doing.length === 0) {
|
|
@@ -163,6 +167,18 @@ export class EngineImpl {
|
|
|
163
167
|
if (doing.length > 0)
|
|
164
168
|
return (await this.repo.findInstanceById(inst.id));
|
|
165
169
|
}
|
|
170
|
+
// issues/91:会签节点 merged 后(ONE_VOTE_VETO 否决 / 全部完成任一路径),
|
|
171
|
+
// 废弃该节点剩余 DOING 任务(对齐内置引擎 abandonProcessTask):
|
|
172
|
+
// SEQUENTIAL 逐人创建天然 no-op;PARALLEL 全员预创建,否决时废弃其余成员
|
|
173
|
+
// (刚完成者已 Done 不会误伤)。逐条持久化并回写聚合副本(E25:防 updateInstance 级联回写旧状态)
|
|
174
|
+
if (ct) {
|
|
175
|
+
const remaining = await this.repo.findDoingTasks(inst.id, [curNode.id]);
|
|
176
|
+
for (const t of remaining) {
|
|
177
|
+
t.abandon(now);
|
|
178
|
+
await this.repo.updateTask(t);
|
|
179
|
+
syncTaskToAggregate(inst, t);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
166
182
|
for (const node of followEdges(flow, curNode.id)) {
|
|
167
183
|
// 统一走 executeNode:结束节点也经节点执行链(拦截器/事件完整触发),
|
|
168
184
|
// executeNode 内部 TypeEnd 分支完成聚合根 finish + 事件发布
|