@mldong/jeeflow 1.8.49 → 1.8.51
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.d.ts +1 -1
- package/dist/engine.js +2 -2
- package/dist/facade.d.ts +3 -1
- package/dist/facade.js +14 -7
- package/package.json +1 -1
package/dist/engine.d.ts
CHANGED
|
@@ -215,7 +215,7 @@ export declare class EngineImpl implements Engine {
|
|
|
215
215
|
private resolveActors;
|
|
216
216
|
private isAllowed;
|
|
217
217
|
private addUserInfo;
|
|
218
|
-
/** issue 29
|
|
218
|
+
/** issue 29:自动生成标题;issues/232 R64 拍 A 钉秒 yyyy-MM-dd HH:mm:ss(标题专用格式化点,勿并 expire_time 腿) */
|
|
219
219
|
private addAutoGenTitle;
|
|
220
220
|
/** 用户提供者访问(issue 41 补强:nodeProgress 姓名解析用) */
|
|
221
221
|
getUserProvider(): UserProvider | undefined;
|
package/dist/engine.js
CHANGED
|
@@ -1068,12 +1068,12 @@ export class EngineImpl {
|
|
|
1068
1068
|
if (u.postName)
|
|
1069
1069
|
vars[KeyPostName] = u.postName;
|
|
1070
1070
|
}
|
|
1071
|
-
/** issue 29
|
|
1071
|
+
/** issue 29:自动生成标题;issues/232 R64 拍 A 钉秒 yyyy-MM-dd HH:mm:ss(标题专用格式化点,勿并 expire_time 腿) */
|
|
1072
1072
|
addAutoGenTitle(displayName, vars) {
|
|
1073
1073
|
const realName = vars[KeyRealName] || '';
|
|
1074
1074
|
const now = new Date();
|
|
1075
1075
|
const pad = (n) => n.toString().padStart(2, '0');
|
|
1076
|
-
const timeStr = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
|
1076
|
+
const timeStr = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`;
|
|
1077
1077
|
vars[KeyAutoGenTitle] = `${realName}的${displayName}-${timeStr}`;
|
|
1078
1078
|
}
|
|
1079
1079
|
/** 用户提供者访问(issue 41 补强:nodeProgress 姓名解析用) */
|
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
|
}
|