weaver-e10-builder 1.5.7 → 1.5.9
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/commands/app.d.ts.map +1 -1
- package/dist/commands/app.js +259 -0
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/form-add-detail-table.d.ts.map +1 -1
- package/dist/commands/form-add-detail-table.js +13 -2
- package/dist/commands/form-add-detail-table.js.map +1 -1
- package/dist/commands/form-button.d.ts.map +1 -1
- package/dist/commands/form-button.js +6 -4
- package/dist/commands/form-button.js.map +1 -1
- package/dist/commands/form-formula-linkage.d.ts.map +1 -1
- package/dist/commands/form-formula-linkage.js +4 -4
- package/dist/commands/form-formula-linkage.js.map +1 -1
- package/dist/commands/form-list-filter.d.ts +3 -0
- package/dist/commands/form-list-filter.d.ts.map +1 -1
- package/dist/commands/form-list-filter.js +88 -24
- package/dist/commands/form-list-filter.js.map +1 -1
- package/dist/commands/form-list-search-group.d.ts.map +1 -1
- package/dist/commands/form-list-search-group.js +54 -64
- package/dist/commands/form-list-search-group.js.map +1 -1
- package/dist/commands/form-list-stats.d.ts.map +1 -1
- package/dist/commands/form-list-stats.js +29 -4
- package/dist/commands/form-list-stats.js.map +1 -1
- package/dist/commands/form-list-utils.d.ts +46 -1
- package/dist/commands/form-list-utils.d.ts.map +1 -1
- package/dist/commands/form-list-utils.js +140 -47
- package/dist/commands/form-list-utils.js.map +1 -1
- package/dist/commands/form-list.d.ts.map +1 -1
- package/dist/commands/form-list.js +141 -71
- package/dist/commands/form-list.js.map +1 -1
- package/dist/commands/form-message.d.ts +3 -0
- package/dist/commands/form-message.d.ts.map +1 -0
- package/dist/commands/form-message.js +341 -0
- package/dist/commands/form-message.js.map +1 -0
- package/dist/commands/form-view.d.ts.map +1 -1
- package/dist/commands/form-view.js +31 -4
- package/dist/commands/form-view.js.map +1 -1
- package/dist/commands/matrix.d.ts.map +1 -1
- package/dist/commands/matrix.js +80 -42
- package/dist/commands/matrix.js.map +1 -1
- package/dist/commands/org.d.ts.map +1 -1
- package/dist/commands/org.js +61 -0
- package/dist/commands/org.js.map +1 -1
- package/dist/commands/role.d.ts.map +1 -1
- package/dist/commands/role.js +69 -9
- package/dist/commands/role.js.map +1 -1
- package/dist/commands/wf-form.d.ts.map +1 -1
- package/dist/commands/wf-form.js +5 -5
- package/dist/commands/wf-form.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/services/actionflow/context_preflight.d.ts +3 -3
- package/dist/services/actionflow/context_preflight.d.ts.map +1 -1
- package/dist/services/actionflow/context_preflight.js +45 -24
- package/dist/services/actionflow/context_preflight.js.map +1 -1
- package/dist/services/actionflow/context_provider.d.ts +7 -0
- package/dist/services/actionflow/context_provider.d.ts.map +1 -1
- package/dist/services/actionflow/context_provider.js +13 -1
- package/dist/services/actionflow/context_provider.js.map +1 -1
- package/dist/services/actionflow/formula_service.d.ts +15 -0
- package/dist/services/actionflow/formula_service.d.ts.map +1 -1
- package/dist/services/actionflow/formula_service.js +401 -57
- package/dist/services/actionflow/formula_service.js.map +1 -1
- package/dist/services/actionflow/param_group_dto.d.ts.map +1 -1
- package/dist/services/actionflow/param_group_dto.js +17 -3
- package/dist/services/actionflow/param_group_dto.js.map +1 -1
- package/dist/services/actionflow/param_type.d.ts +14 -0
- package/dist/services/actionflow/param_type.d.ts.map +1 -0
- package/dist/services/actionflow/param_type.js +69 -0
- package/dist/services/actionflow/param_type.js.map +1 -0
- package/dist/services/actionflow/preflight_service.d.ts.map +1 -1
- package/dist/services/actionflow/preflight_service.js +59 -41
- package/dist/services/actionflow/preflight_service.js.map +1 -1
- package/dist/services/actionflow/workflow_compiler.d.ts.map +1 -1
- package/dist/services/actionflow/workflow_compiler.js +65 -29
- package/dist/services/actionflow/workflow_compiler.js.map +1 -1
- package/dist/services/app-publish.d.ts +227 -0
- package/dist/services/app-publish.d.ts.map +1 -0
- package/dist/services/app-publish.js +403 -0
- package/dist/services/app-publish.js.map +1 -0
- package/dist/services/form-button-position.d.ts.map +1 -1
- package/dist/services/form-button-position.js +7 -1
- package/dist/services/form-button-position.js.map +1 -1
- package/dist/services/form-field-drop.d.ts.map +1 -1
- package/dist/services/form-field-drop.js +7 -0
- package/dist/services/form-field-drop.js.map +1 -1
- package/dist/services/form-formula-linkage.d.ts +24 -3
- package/dist/services/form-formula-linkage.d.ts.map +1 -1
- package/dist/services/form-formula-linkage.js +24 -5
- package/dist/services/form-formula-linkage.js.map +1 -1
- package/dist/services/form-list-search-group.d.ts +89 -0
- package/dist/services/form-list-search-group.d.ts.map +1 -0
- package/dist/services/form-list-search-group.js +260 -0
- package/dist/services/form-list-search-group.js.map +1 -0
- package/dist/services/form-list-search.d.ts +110 -0
- package/dist/services/form-list-search.d.ts.map +1 -0
- package/dist/services/form-list-search.js +231 -0
- package/dist/services/form-list-search.js.map +1 -0
- package/dist/services/form-list-stats.d.ts +21 -1
- package/dist/services/form-list-stats.d.ts.map +1 -1
- package/dist/services/form-list-stats.js +86 -12
- package/dist/services/form-list-stats.js.map +1 -1
- package/dist/services/form-message.d.ts +273 -0
- package/dist/services/form-message.d.ts.map +1 -0
- package/dist/services/form-message.js +575 -0
- package/dist/services/form-message.js.map +1 -0
- package/dist/services/form-sub-detail.d.ts.map +1 -1
- package/dist/services/form-sub-detail.js +5 -1
- package/dist/services/form-sub-detail.js.map +1 -1
- package/dist/services/form-view.d.ts +34 -2
- package/dist/services/form-view.d.ts.map +1 -1
- package/dist/services/form-view.js +74 -8
- package/dist/services/form-view.js.map +1 -1
- package/dist/services/matrix-fields.d.ts +42 -0
- package/dist/services/matrix-fields.d.ts.map +1 -0
- package/dist/services/matrix-fields.js +102 -0
- package/dist/services/matrix-fields.js.map +1 -0
- package/dist/services/org-browser.d.ts +60 -0
- package/dist/services/org-browser.d.ts.map +1 -0
- package/dist/services/org-browser.js +62 -0
- package/dist/services/org-browser.js.map +1 -0
- package/dist/services/quick-date-range.d.ts +22 -0
- package/dist/services/quick-date-range.d.ts.map +1 -0
- package/dist/services/quick-date-range.js +134 -0
- package/dist/services/quick-date-range.js.map +1 -0
- package/dist/services/role-member.d.ts +73 -2
- package/dist/services/role-member.d.ts.map +1 -1
- package/dist/services/role-member.js +141 -9
- package/dist/services/role-member.js.map +1 -1
- package/package.json +1 -1
- package/skill-docs/SKILL.md +281 -278
- package/skill-docs/_catalog.md +3 -0
- package/skill-docs/actionflows/SKILL.md +2 -1
- package/skill-docs/actionflows/references/components/message/InnerMQSend.md +6 -0
- package/skill-docs/references/app/guide-app-publish.md +92 -0
- package/skill-docs/references/common/guide-plan-template.md +148 -252
- package/skill-docs/references/common/map.md +2 -1
- package/skill-docs/references/common/ref-cli-commands.md +27 -8
- package/skill-docs/references/form/guide-form-message.md +57 -0
- package/skill-docs/references/form/guide-form-view.md +7 -2
- package/skill-docs/references/form/guide-formula-linkage.md +1 -1
- package/skill-docs/references/form/guide-list-stats.md +55 -2
- package/skill-docs/references/hrm/guide-matrix.md +30 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"param_type.d.ts","sourceRoot":"","sources":["../../../src/services/actionflow/param_type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuCH,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAsBrD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* com.weaver.esb.base.enums.ParamType 的 CLI 侧归一化。
|
|
3
|
+
*
|
|
4
|
+
* ParamType 的合法 value:
|
|
5
|
+
* json/xml/xml_string/int/double/string/date/boolean/time/datetime/
|
|
6
|
+
* binary/password/object/assign/fixvalue/variable。
|
|
7
|
+
*
|
|
8
|
+
* 设计器字段里还会出现 number、integer、NumberComponent 等前端类型名;
|
|
9
|
+
* 这些不是 ParamType value,需要先归一化。平台动作流这里统一把普通
|
|
10
|
+
* 数字保存成 int;Long/BigInt 等长整型为了避免精度丢失统一保存成 string。
|
|
11
|
+
*/
|
|
12
|
+
const PARAM_TYPE_VALUES = new Set([
|
|
13
|
+
'json', 'xml', 'xml_string', 'int', 'double', 'string', 'date', 'boolean',
|
|
14
|
+
'time', 'datetime', 'binary', 'password', 'object', 'assign', 'fixvalue', 'variable',
|
|
15
|
+
]);
|
|
16
|
+
const LONG_TYPE_VALUES = new Set([
|
|
17
|
+
'long', 'longint', 'longinteger', 'bigint', 'big_integer', 'int64', 'uint64',
|
|
18
|
+
'integer64', 'number64', 'longnumber', 'java.lang.long', 'java.math.biginteger',
|
|
19
|
+
]);
|
|
20
|
+
const NUMERIC_TYPE_VALUES = new Set([
|
|
21
|
+
'number', 'numeric', 'integer', 'int', 'double', 'float', 'decimal', 'money',
|
|
22
|
+
'numbercomponent', 'calculation', 'rate', 'formula', 'summary', 'crossstatement',
|
|
23
|
+
]);
|
|
24
|
+
const TYPE_ALIASES = {
|
|
25
|
+
text: 'string', textarea: 'string', string: 'string', autoserial: 'string', barcode: 'string',
|
|
26
|
+
json: 'json', object: 'object', xml: 'xml', xml_string: 'xml_string', xmltext: 'xml_string',
|
|
27
|
+
date: 'date', datecomponent: 'datetime', datetimecomponent: 'datetime', datetime: 'datetime',
|
|
28
|
+
time: 'time', boolean: 'boolean', bool: 'boolean', switch: 'boolean',
|
|
29
|
+
binary: 'binary', password: 'password', assign: 'assign', fixvalue: 'fixvalue', variable: 'variable',
|
|
30
|
+
};
|
|
31
|
+
const TYPE_DESCRIPTIONS = {
|
|
32
|
+
'json': 'json', 'xml': 'xml', 'xml文本': 'xml_string', '整数': 'int', '浮点数': 'int',
|
|
33
|
+
'文本': 'string', '日期': 'date', '布尔型': 'boolean', '时间': 'time', '日期时间': 'datetime',
|
|
34
|
+
'字节流': 'binary', '密码': 'password', '对象': 'object', '动态赋值': 'assign', '固定值': 'fixvalue', '变量': 'variable',
|
|
35
|
+
};
|
|
36
|
+
function normalizedToken(value) {
|
|
37
|
+
return String(value ?? '')
|
|
38
|
+
.trim()
|
|
39
|
+
.replace(/^ParamType[._]/i, '')
|
|
40
|
+
.replace(/[\s-]+/g, '_')
|
|
41
|
+
.toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
/** 将任意字段类型转换为 ParamType 的合法 value。 */
|
|
44
|
+
export function normalizeParamType(value) {
|
|
45
|
+
const raw = String(value ?? '').trim();
|
|
46
|
+
if (!raw)
|
|
47
|
+
return 'string';
|
|
48
|
+
const token = normalizedToken(raw);
|
|
49
|
+
if (LONG_TYPE_VALUES.has(token) || /(?:^|[_\.])(long|bigint|int64|uint64)(?:$|[_\.])/.test(token))
|
|
50
|
+
return 'string';
|
|
51
|
+
if (NUMERIC_TYPE_VALUES.has(token))
|
|
52
|
+
return 'int';
|
|
53
|
+
const description = TYPE_DESCRIPTIONS[raw] || TYPE_DESCRIPTIONS[token];
|
|
54
|
+
if (description)
|
|
55
|
+
return description;
|
|
56
|
+
const alias = TYPE_ALIASES[token];
|
|
57
|
+
if (alias && PARAM_TYPE_VALUES.has(alias))
|
|
58
|
+
return alias;
|
|
59
|
+
if (PARAM_TYPE_VALUES.has(token)) {
|
|
60
|
+
// DOUBLE 是 ParamType 合法值,但动作流字段按约定统一使用整数。
|
|
61
|
+
return token === 'double' ? 'int' : token;
|
|
62
|
+
}
|
|
63
|
+
// ParamType 的枚举名(例如 INT、DOUBLE、XML_STRING)。
|
|
64
|
+
const enumValue = token.toLowerCase();
|
|
65
|
+
if (PARAM_TYPE_VALUES.has(enumValue))
|
|
66
|
+
return enumValue === 'double' ? 'int' : enumValue;
|
|
67
|
+
return 'string';
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=param_type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"param_type.js","sourceRoot":"","sources":["../../../src/services/actionflow/param_type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EA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AM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,KAAK,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxD,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,0CAA0C;QAC1C,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC;IAED,4CAA4C;IAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACtC,IAAI,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight_service.d.ts","sourceRoot":"","sources":["../../../src/services/actionflow/preflight_service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight_service.d.ts","sourceRoot":"","sources":["../../../src/services/actionflow/preflight_service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA2GtD,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAKjF;AAED,uEAAuE;AACvE,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,GAA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MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAsClG;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAYhG;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAcpG;AAED,uDAAuD;AACvD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAiBtG;AAoGD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;CACvB;AAED,kCAAkC;AAClC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAgZ5H"}
|
|
@@ -9,10 +9,11 @@ import { registerTargetFormFields, registerTargetDetailFields, registerWorkflowF
|
|
|
9
9
|
// workflow_id → 目标表单 id(进程缓存)
|
|
10
10
|
const FORM_ID_CACHE = {};
|
|
11
11
|
import { ContextStore, PlatformContextProvider } from './context_provider.js';
|
|
12
|
-
import {
|
|
12
|
+
import { hydrateContextReferences, hydrateQueryResultReferences, queryNodeContext } from './context_preflight.js';
|
|
13
13
|
import { get as getComponent } from './components/index.js';
|
|
14
14
|
import { defaultQueryFieldsAll } from './query_field_defaults.js';
|
|
15
15
|
import { getStepBranches } from './step_branches.js';
|
|
16
|
+
import { normalizeParamGroupSetting } from './param_group_dto.js';
|
|
16
17
|
// 表单字段进程缓存
|
|
17
18
|
const FORM_FIELDS_CACHE = {};
|
|
18
19
|
const FORM_LIST_CACHE = {};
|
|
@@ -796,18 +797,20 @@ export function checkSourceReferences(plan, eventContextFields, errors, availabl
|
|
|
796
797
|
const t = s.trim();
|
|
797
798
|
if (!t || t.startsWith('{'))
|
|
798
799
|
return true;
|
|
799
|
-
if (!t.includes('.'))
|
|
800
|
-
return true;
|
|
801
800
|
return false;
|
|
802
801
|
};
|
|
803
802
|
const checkSourceKey = (sourceKey, where) => {
|
|
804
803
|
const s = sourceKey.trim();
|
|
805
804
|
if (skip(s))
|
|
806
805
|
return;
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
806
|
+
const normalized = s.replace(/\[\]$/, '');
|
|
807
|
+
// getComponentContext 的参数分组字段可能只有 payload、token 这类
|
|
808
|
+
// 无点号的 paramKey;只要它确实出现在 API 上下文中,就同样视为合法。
|
|
809
|
+
// 对未命中的无点号旧写法保留兼容,不把普通显示名误报为路径错误。
|
|
810
|
+
if (realKeys.has(normalized) || !s.includes('.'))
|
|
811
|
+
return;
|
|
812
|
+
const wfId = s.split('.', 1)[0];
|
|
813
|
+
errors.push(`${where}: 源字段 paramKey '${s}' 未在流程 ${wfId} 的真实上下文中找到。请用 workflow-context-fields 确认该流程和字段真实存在。`);
|
|
811
814
|
};
|
|
812
815
|
const checkMapping = (mapping, where) => {
|
|
813
816
|
if (!mapping || typeof mapping !== 'object')
|
|
@@ -918,6 +921,26 @@ export function checkSourceReferences(plan, eventContextFields, errors, availabl
|
|
|
918
921
|
};
|
|
919
922
|
walk(plan.actions || []);
|
|
920
923
|
}
|
|
924
|
+
function loopContextDescriptor(field, fallbackComponent = '') {
|
|
925
|
+
const componentType = String(field?.componentType || field?._context_component_type || fallbackComponent || 'ApproveTrigger');
|
|
926
|
+
const parameterTable = String(field?.tablePrimaryKey
|
|
927
|
+
|| field?.tableKey
|
|
928
|
+
|| field?._context_table_primary_key
|
|
929
|
+
|| field?.raw?.tablePrimaryKey
|
|
930
|
+
|| field?.raw?.tableKey
|
|
931
|
+
|| field?.raw?.primaryKey
|
|
932
|
+
|| '').trim();
|
|
933
|
+
const tablePrimaryKey = parameterTable
|
|
934
|
+
|| (componentType === 'CustomTrigger' ? 'SelectParams' : componentType === 'ApproveTrigger' ? 'ApprovalData' : 'FormData');
|
|
935
|
+
const tableName = String(field?.tableName || field?.raw?.tableName || field?.raw?.name || (tablePrimaryKey === 'SelectParams'
|
|
936
|
+
? '选择参数' : tablePrimaryKey === 'ApprovalData' ? '流程数据' : tablePrimaryKey));
|
|
937
|
+
return {
|
|
938
|
+
componentType,
|
|
939
|
+
tablePrimaryKey,
|
|
940
|
+
tableName,
|
|
941
|
+
parentName: String(field?.parentName || field?.newParentName || field?.label || field?.showName || field?.paramName || ''),
|
|
942
|
+
};
|
|
943
|
+
}
|
|
921
944
|
function hydrateLoopCycleTimes(plan, eventContextFields) {
|
|
922
945
|
const byKey = new Map();
|
|
923
946
|
for (const field of eventContextFields) {
|
|
@@ -943,18 +966,15 @@ function hydrateLoopCycleTimes(plan, eventContextFields) {
|
|
|
943
966
|
formula.label = label;
|
|
944
967
|
formula.valueType = String(field.paramType || field.fieldType || 'string');
|
|
945
968
|
formula.fieldType = String(field.paramType || field.fieldType || 'string');
|
|
946
|
-
const
|
|
947
|
-
const tablePrimaryKey = componentType === 'CustomTrigger'
|
|
948
|
-
? 'SelectParams'
|
|
949
|
-
: componentType === 'ApproveTrigger' ? 'ApprovalData' : 'FormData';
|
|
969
|
+
const descriptor = loopContextDescriptor(field);
|
|
950
970
|
formula._resolvedContext = {
|
|
951
971
|
fieldId: String(field.id || field.paramId || ''),
|
|
952
972
|
fieldType: String(field.paramType || field.fieldType || 'string'),
|
|
953
973
|
label,
|
|
954
|
-
componentType,
|
|
955
|
-
tablePrimaryKey,
|
|
956
|
-
tableName:
|
|
957
|
-
parentName: workflowId ? `${workflowId}.${label}` : label,
|
|
974
|
+
componentType: descriptor.componentType,
|
|
975
|
+
tablePrimaryKey: descriptor.tablePrimaryKey,
|
|
976
|
+
tableName: descriptor.tableName,
|
|
977
|
+
parentName: descriptor.parentName || (workflowId ? `${workflowId}.${label}` : label),
|
|
958
978
|
rawField: { ...field },
|
|
959
979
|
};
|
|
960
980
|
}
|
|
@@ -1040,11 +1060,9 @@ function hydrateLoopSourceReferences(step, context) {
|
|
|
1040
1060
|
|| sourceGroup?.component
|
|
1041
1061
|
|| raw.componentType
|
|
1042
1062
|
|| (/\[\]$/.test(paramKey) ? 'EnquiryForm' : 'ApproveTrigger'));
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
const tableName = tablePrimaryKey === 'SelectParams' ? '选择参数'
|
|
1047
|
-
: tablePrimaryKey === 'ApprovalData' ? '流程数据' : '表单数据';
|
|
1063
|
+
const descriptor = loopContextDescriptor(field, componentType);
|
|
1064
|
+
const tablePrimaryKey = descriptor.tablePrimaryKey;
|
|
1065
|
+
const tableName = descriptor.tableName;
|
|
1048
1066
|
ref.paramKey = paramKey;
|
|
1049
1067
|
ref.label = label;
|
|
1050
1068
|
ref.valueType = String(field.type ?? raw.paramType ?? ref.valueType ?? 'json');
|
|
@@ -1056,7 +1074,7 @@ function hydrateLoopSourceReferences(step, context) {
|
|
|
1056
1074
|
componentType,
|
|
1057
1075
|
tablePrimaryKey,
|
|
1058
1076
|
tableName,
|
|
1059
|
-
parentName: String(field.group || '').replace(/\.$/, '') || label,
|
|
1077
|
+
parentName: descriptor.parentName || String(field.group || '').replace(/\.$/, '') || label,
|
|
1060
1078
|
rawField: { ...raw },
|
|
1061
1079
|
};
|
|
1062
1080
|
}
|
|
@@ -1103,11 +1121,9 @@ function expandLoopDataContext(step, store) {
|
|
|
1103
1121
|
|| sourceGroup?.component
|
|
1104
1122
|
|| source?.raw?.sourceComponentType
|
|
1105
1123
|
|| (/\[\]$/.test(sourceKey) ? 'EnquiryForm' : 'ApproveTrigger'));
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
const sourceTableName = sourceTablePrimaryKey === 'SelectParams' ? '选择参数'
|
|
1110
|
-
: sourceTablePrimaryKey === 'ApprovalData' ? '流程数据' : '表单数据';
|
|
1124
|
+
const sourceDescriptor = loopContextDescriptor(source || {}, sourceComponentType);
|
|
1125
|
+
const sourceTablePrimaryKey = sourceDescriptor.tablePrimaryKey;
|
|
1126
|
+
const sourceTableName = sourceDescriptor.tableName;
|
|
1111
1127
|
const prefix = mode === '4' ? 'cycle.dataDetail[]' : 'cycle.dataDetail';
|
|
1112
1128
|
const expanded = {};
|
|
1113
1129
|
for (const rawField of sourceFields) {
|
|
@@ -1860,22 +1876,24 @@ export async function preflightContext(plan, appId, client) {
|
|
|
1860
1876
|
// 查 event 上下文
|
|
1861
1877
|
let eventContext = {};
|
|
1862
1878
|
try {
|
|
1863
|
-
|
|
1879
|
+
// WebHookTrigger.request 是 ParamGroupSettingBean。先按后端保存 DTO
|
|
1880
|
+
// 规范化参数行,确保新参数获得稳定的数字 id;后续上下文公式的
|
|
1881
|
+
// frontId 必须直接取该参数行 id,不能从 paramKey/paramName 尾段猜测。
|
|
1882
|
+
if (String(event?.type || '') === 'WebHookTrigger') {
|
|
1883
|
+
const request = event?.params?.request;
|
|
1884
|
+
if (request && typeof request === 'object' && !Array.isArray(request)) {
|
|
1885
|
+
event.params.request = normalizeParamGroupSetting(request);
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
const eventResult = await queryNodeContext(event, appId, 'event_1', store, provider, 'event', { allowPlannedDynamicResources, strictComponentContext: true });
|
|
1864
1889
|
errors.push(...eventResult.errors);
|
|
1865
1890
|
eventContext = eventResult.context;
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
//
|
|
1872
|
-
// getComponentContext 静态接口返回;字段选择器已用实时元数据完成
|
|
1873
|
-
// queryFields 回填,因此这里补登记平台确定的运行时输出。
|
|
1874
|
-
const dateRuntimeContext = buildDateTriggerRuntimeContext(event);
|
|
1875
|
-
if (Object.keys(dateRuntimeContext).length) {
|
|
1876
|
-
store.merge(dateRuntimeContext, 'DateTrigger');
|
|
1877
|
-
eventContext = { ...eventContext, ...dateRuntimeContext };
|
|
1878
|
-
}
|
|
1891
|
+
// WebHook 请求参数声明只是 ParamGroupSettingBean,不是运行时上下文。
|
|
1892
|
+
// 动态赋值必须以 getComponentContext 的返回字段为准;不能在这里把
|
|
1893
|
+
// request.tableData 再拼成 Body/Params 上下文,否则 API 未返回字段时
|
|
1894
|
+
// 仍会生成看似合法但平台无法定位的 FormulaBean。
|
|
1895
|
+
// DateTrigger 的 dataResponse 动态字段也只接受 getComponentContext
|
|
1896
|
+
// 返回的上下文,不在 CLI 侧按 queryFields 另造一份字段表。
|
|
1879
1897
|
}
|
|
1880
1898
|
catch (e) {
|
|
1881
1899
|
errors.push(String(e?.message || e));
|
|
@@ -2008,7 +2026,7 @@ export async function preflightContext(plan, appId, client) {
|
|
|
2008
2026
|
const path = `${prefix}[${index}]`;
|
|
2009
2027
|
let result;
|
|
2010
2028
|
try {
|
|
2011
|
-
result = await queryNodeContext(step, appId, 'event_1', branchStore, provider, path, { allowPlannedDynamicResources });
|
|
2029
|
+
result = await queryNodeContext(step, appId, 'event_1', branchStore, provider, path, { allowPlannedDynamicResources, strictComponentContext: true });
|
|
2012
2030
|
}
|
|
2013
2031
|
catch (e) {
|
|
2014
2032
|
errors.push(String(e?.message || e));
|