@mldong/jeeflow 1.8.48 → 1.8.50
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/facade.d.ts +3 -1
- package/dist/facade.js +14 -7
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +15 -0
- package/package.json +1 -1
package/dist/facade.d.ts
CHANGED
|
@@ -103,7 +103,9 @@ export declare class JeeflowFacade {
|
|
|
103
103
|
/** 成员姓名解析(issue 43/E15):UserProvider SPI 并行批量解析 realName,查不到缺省空串 */
|
|
104
104
|
private resolveMemberNames;
|
|
105
105
|
private collectPath;
|
|
106
|
-
/** 决策输出边表达式求值(args = 实例变量 + 决策节点前置任务变量)
|
|
106
|
+
/** 决策输出边表达式求值(args = 实例变量 + 决策节点前置任务变量)
|
|
107
|
+
*
|
|
108
|
+
* instanceId/defineId 只作日志归因用(issues/201)——求值失败那条腿不许再一声不吭。 */
|
|
107
109
|
private evalDecisionExpr;
|
|
108
110
|
private approvalRecord;
|
|
109
111
|
private getAssigneeTextData;
|
package/dist/facade.js
CHANGED
|
@@ -946,7 +946,7 @@ export class JeeflowFacade {
|
|
|
946
946
|
try {
|
|
947
947
|
const flow = JSON.parse(toStr(def.content));
|
|
948
948
|
nodeProgress = await this.buildNodeProgress(flow, his);
|
|
949
|
-
await this.collectPath(flow, 'start', active, history, edges, new Set(), inst.variables ?? {}, his);
|
|
949
|
+
await this.collectPath(flow, 'start', active, history, edges, new Set(), inst.variables ?? {}, his, instanceId, String(inst.defineId ?? ''));
|
|
950
950
|
}
|
|
951
951
|
catch (e) {
|
|
952
952
|
// issues/162(口径=保留降级面+落一条可诊断日志,形状照 jeeflow-go v1.8.43 那枚):
|
|
@@ -1025,7 +1025,7 @@ export class JeeflowFacade {
|
|
|
1025
1025
|
// issues/157:边名收录在**源节点循环内**、活跃判断之前(逐字同位于 java
|
|
1026
1026
|
// `JeeflowFacade.collectPath`)。此前是把边名当递归实参传的,
|
|
1027
1027
|
// ⇒ 目标节点当前活跃的那条边既不下钻也不收录,"进当前待办的那一跳"永远是灰的。
|
|
1028
|
-
async collectPath(flow, nodeId, active, history, edges, visited, vars, historyTasks) {
|
|
1028
|
+
async collectPath(flow, nodeId, active, history, edges, visited, vars, historyTasks, instanceId, defineId) {
|
|
1029
1029
|
if (visited.has(nodeId))
|
|
1030
1030
|
return;
|
|
1031
1031
|
visited.add(nodeId);
|
|
@@ -1036,7 +1036,7 @@ export class JeeflowFacade {
|
|
|
1036
1036
|
// 决策节点:输出边表达式求值过滤(对齐 boot3 recursionModel,issues/06)
|
|
1037
1037
|
if (src?.type === 'snaker:decision') {
|
|
1038
1038
|
const expr = e.properties?.expr;
|
|
1039
|
-
if (expr && !await this.evalDecisionExpr(flow, src, expr, vars, historyTasks))
|
|
1039
|
+
if (expr && !await this.evalDecisionExpr(flow, src, expr, vars, historyTasks, instanceId, defineId))
|
|
1040
1040
|
continue;
|
|
1041
1041
|
}
|
|
1042
1042
|
if (e.id && !edges.includes(e.id))
|
|
@@ -1049,11 +1049,13 @@ export class JeeflowFacade {
|
|
|
1049
1049
|
history.push(tid);
|
|
1050
1050
|
if (active.includes(tid))
|
|
1051
1051
|
continue; // 遇活跃节点停止深入(边名已在上面收录)
|
|
1052
|
-
await this.collectPath(flow, tid, active, history, edges, visited, vars, historyTasks);
|
|
1052
|
+
await this.collectPath(flow, tid, active, history, edges, visited, vars, historyTasks, instanceId, defineId);
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
/** 决策输出边表达式求值(args = 实例变量 + 决策节点前置任务变量)
|
|
1056
|
-
|
|
1055
|
+
/** 决策输出边表达式求值(args = 实例变量 + 决策节点前置任务变量)
|
|
1056
|
+
*
|
|
1057
|
+
* instanceId/defineId 只作日志归因用(issues/201)——求值失败那条腿不许再一声不吭。 */
|
|
1058
|
+
async evalDecisionExpr(flow, decision, expr, vars, historyTasks, instanceId, defineId) {
|
|
1057
1059
|
const args = { ...(vars ?? {}) };
|
|
1058
1060
|
for (const e of flow.edges ?? []) {
|
|
1059
1061
|
if (e.targetNodeId === decision.id) {
|
|
@@ -1066,7 +1068,12 @@ export class JeeflowFacade {
|
|
|
1066
1068
|
try {
|
|
1067
1069
|
return Boolean(await this.engine.evalExpr(expr, args));
|
|
1068
1070
|
}
|
|
1069
|
-
catch {
|
|
1071
|
+
catch (e) {
|
|
1072
|
+
// issues/201(audit8 R79 拍 C=只统一「求值器自身抛异常必须落可诊断日志」,遍历宽度不钉;
|
|
1073
|
+
// 口径与本栈 162 腿同源,日志三件齐):旧形状 `catch { return false }` 把求值失败折成
|
|
1074
|
+
// 「这条分支求值为假」⇒ 对外读数与合法判假完全同形、零线索。本栈宽度维持折 false
|
|
1075
|
+
// (该边不收、其余边继续遍历),只补可归因的一句。
|
|
1076
|
+
console.error(`[jeeflow] WARN highLight 决策边表达式求值失败,该边按 false 处理(分支不收、其余边继续遍历): instanceId=${instanceId}, defineId=${defineId}, nodeId=${decision?.id ?? ''}, expr=${expr}, err=${e}`);
|
|
1070
1077
|
return false;
|
|
1071
1078
|
}
|
|
1072
1079
|
}
|
package/dist/registry.d.ts
CHANGED
|
@@ -72,4 +72,8 @@ export declare class HandlerRegistry {
|
|
|
72
72
|
listHandlersGroup(typeName: HandlerType, group: string): HandlerMeta[];
|
|
73
73
|
/** 已注册的处理器名称清单(含未带元数据的) */
|
|
74
74
|
listHandlerNames(): string[];
|
|
75
|
+
/** 已注册的处理器类型清单(去重,首次出现序;issues/186 R20 第四能力补齐)——
|
|
76
|
+
* 类型在场 ⟺ 该类型下至少有一件清单项(对齐 Java `listHandlerTypes` 的注册表 keySet 口径:
|
|
77
|
+
* 显式元数据类型 ∪ 运行时注册所在类型;老数据无 type 按 AssignmentHandler 归类,与 listHandlers 一致) */
|
|
78
|
+
listHandlerTypes(): HandlerType[];
|
|
75
79
|
}
|
package/dist/registry.js
CHANGED
|
@@ -90,4 +90,19 @@ export class HandlerRegistry {
|
|
|
90
90
|
listHandlerNames() {
|
|
91
91
|
return [...this.assignments.keys(), ...this.decisions.keys(), ...this.customs.keys()];
|
|
92
92
|
}
|
|
93
|
+
/** 已注册的处理器类型清单(去重,首次出现序;issues/186 R20 第四能力补齐)——
|
|
94
|
+
* 类型在场 ⟺ 该类型下至少有一件清单项(对齐 Java `listHandlerTypes` 的注册表 keySet 口径:
|
|
95
|
+
* 显式元数据类型 ∪ 运行时注册所在类型;老数据无 type 按 AssignmentHandler 归类,与 listHandlers 一致) */
|
|
96
|
+
listHandlerTypes() {
|
|
97
|
+
const types = new Set();
|
|
98
|
+
for (const m of this.metas.values())
|
|
99
|
+
types.add(m.type ?? 'AssignmentHandler');
|
|
100
|
+
if (this.assignments.size > 0)
|
|
101
|
+
types.add('AssignmentHandler');
|
|
102
|
+
if (this.decisions.size > 0)
|
|
103
|
+
types.add('DecisionHandler');
|
|
104
|
+
if (this.customs.size > 0)
|
|
105
|
+
types.add('CustomHandler');
|
|
106
|
+
return [...types];
|
|
107
|
+
}
|
|
93
108
|
}
|