weaver-e10-builder 1.1.6 → 1.1.8
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/actionflow.d.ts.map +1 -1
- package/dist/commands/actionflow.js +93 -10
- package/dist/commands/actionflow.js.map +1 -1
- package/dist/commands/designer-common.d.ts +12 -2
- package/dist/commands/designer-common.d.ts.map +1 -1
- package/dist/commands/designer-common.js +89 -22
- package/dist/commands/designer-common.js.map +1 -1
- package/dist/commands/designer.d.ts.map +1 -1
- package/dist/commands/designer.js +7 -2
- package/dist/commands/designer.js.map +1 -1
- package/dist/commands/form-association-manage.js +1 -1
- package/dist/commands/form-association-manage.js.map +1 -1
- package/dist/commands/form-association.d.ts.map +1 -1
- package/dist/commands/form-association.js +1 -6
- package/dist/commands/form-association.js.map +1 -1
- package/dist/commands/form-field-lang.d.ts +3 -0
- package/dist/commands/form-field-lang.d.ts.map +1 -0
- package/dist/commands/form-field-lang.js +148 -0
- package/dist/commands/form-field-lang.js.map +1 -0
- package/dist/commands/form-table-view.d.ts.map +1 -1
- package/dist/commands/form-table-view.js +28 -9
- package/dist/commands/form-table-view.js.map +1 -1
- package/dist/commands/form.d.ts.map +1 -1
- package/dist/commands/form.js +10 -4
- package/dist/commands/form.js.map +1 -1
- package/dist/commands/interface.d.ts.map +1 -1
- package/dist/commands/interface.js +7 -3
- package/dist/commands/interface.js.map +1 -1
- package/dist/commands/matrix.d.ts.map +1 -1
- package/dist/commands/matrix.js +78 -16
- package/dist/commands/matrix.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +4 -2
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/workflow-create-workflow.d.ts.map +1 -1
- package/dist/commands/workflow-create-workflow.js +20 -5
- package/dist/commands/workflow-create-workflow.js.map +1 -1
- package/dist/commands/workflow-odoc.d.ts +3 -0
- package/dist/commands/workflow-odoc.d.ts.map +1 -0
- package/dist/commands/workflow-odoc.js +288 -0
- package/dist/commands/workflow-odoc.js.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/services/actionflow/build_workflow_draft.d.ts.map +1 -1
- package/dist/services/actionflow/build_workflow_draft.js +17 -7
- package/dist/services/actionflow/build_workflow_draft.js.map +1 -1
- package/dist/services/actionflow/command_output.d.ts +4 -0
- package/dist/services/actionflow/command_output.d.ts.map +1 -1
- package/dist/services/actionflow/command_output.js +92 -1
- package/dist/services/actionflow/command_output.js.map +1 -1
- package/dist/services/actionflow/component_registry.d.ts.map +1 -1
- package/dist/services/actionflow/component_registry.js +11 -2
- package/dist/services/actionflow/component_registry.js.map +1 -1
- package/dist/services/actionflow/components/action_eb_add.js +1 -1
- package/dist/services/actionflow/components/action_eb_add.js.map +1 -1
- package/dist/services/actionflow/components/action_eb_update.js +1 -1
- package/dist/services/actionflow/components/action_eb_update.js.map +1 -1
- package/dist/services/actionflow/components/dml_execute.d.ts +11 -0
- package/dist/services/actionflow/components/dml_execute.d.ts.map +1 -0
- package/dist/services/actionflow/components/dml_execute.js +172 -0
- package/dist/services/actionflow/components/dml_execute.js.map +1 -0
- package/dist/services/actionflow/components/enquiry_form.d.ts +7 -0
- package/dist/services/actionflow/components/enquiry_form.d.ts.map +1 -1
- package/dist/services/actionflow/components/enquiry_form.js +57 -7
- package/dist/services/actionflow/components/enquiry_form.js.map +1 -1
- package/dist/services/actionflow/components/http.d.ts +12 -0
- package/dist/services/actionflow/components/http.d.ts.map +1 -0
- package/dist/services/actionflow/components/http.js +216 -0
- package/dist/services/actionflow/components/http.js.map +1 -0
- package/dist/services/actionflow/components/index.d.ts.map +1 -1
- package/dist/services/actionflow/components/index.js +7 -0
- package/dist/services/actionflow/components/index.js.map +1 -1
- package/dist/services/actionflow/components/send_message.d.ts.map +1 -1
- package/dist/services/actionflow/components/send_message.js +9 -1
- package/dist/services/actionflow/components/send_message.js.map +1 -1
- package/dist/services/actionflow/context_preflight.d.ts +2 -0
- package/dist/services/actionflow/context_preflight.d.ts.map +1 -1
- package/dist/services/actionflow/context_preflight.js +127 -16
- package/dist/services/actionflow/context_preflight.js.map +1 -1
- package/dist/services/actionflow/datasource_source.d.ts +18 -0
- package/dist/services/actionflow/datasource_source.d.ts.map +1 -0
- package/dist/services/actionflow/datasource_source.js +19 -0
- package/dist/services/actionflow/datasource_source.js.map +1 -0
- package/dist/services/actionflow/design_client.d.ts +0 -2
- package/dist/services/actionflow/design_client.d.ts.map +1 -1
- package/dist/services/actionflow/design_client.js +0 -19
- package/dist/services/actionflow/design_client.js.map +1 -1
- package/dist/services/actionflow/dynamic_resources.d.ts +69 -0
- package/dist/services/actionflow/dynamic_resources.d.ts.map +1 -0
- package/dist/services/actionflow/dynamic_resources.js +259 -0
- package/dist/services/actionflow/dynamic_resources.js.map +1 -0
- package/dist/services/actionflow/form_source.d.ts +6 -0
- package/dist/services/actionflow/form_source.d.ts.map +1 -1
- package/dist/services/actionflow/form_source.js +16 -0
- package/dist/services/actionflow/form_source.js.map +1 -1
- package/dist/services/actionflow/formula_service.d.ts +2 -0
- package/dist/services/actionflow/formula_service.d.ts.map +1 -1
- package/dist/services/actionflow/formula_service.js +126 -6
- package/dist/services/actionflow/formula_service.js.map +1 -1
- package/dist/services/actionflow/generation_service.d.ts +17 -1
- package/dist/services/actionflow/generation_service.d.ts.map +1 -1
- package/dist/services/actionflow/generation_service.js +105 -8
- package/dist/services/actionflow/generation_service.js.map +1 -1
- package/dist/services/actionflow/http_input_params.d.ts +17 -0
- package/dist/services/actionflow/http_input_params.d.ts.map +1 -0
- package/dist/services/actionflow/http_input_params.js +98 -0
- package/dist/services/actionflow/http_input_params.js.map +1 -0
- package/dist/services/actionflow/http_source.d.ts +41 -0
- package/dist/services/actionflow/http_source.d.ts.map +1 -0
- package/dist/services/actionflow/http_source.js +261 -0
- package/dist/services/actionflow/http_source.js.map +1 -0
- package/dist/services/actionflow/plan_constraints.d.ts.map +1 -1
- package/dist/services/actionflow/plan_constraints.js +4 -2
- package/dist/services/actionflow/plan_constraints.js.map +1 -1
- package/dist/services/actionflow/preflight_service.d.ts +8 -0
- package/dist/services/actionflow/preflight_service.d.ts.map +1 -1
- package/dist/services/actionflow/preflight_service.js +105 -27
- package/dist/services/actionflow/preflight_service.js.map +1 -1
- package/dist/services/actionflow/readback_verifier.d.ts.map +1 -1
- package/dist/services/actionflow/readback_verifier.js +34 -1
- package/dist/services/actionflow/readback_verifier.js.map +1 -1
- package/dist/services/actionflow/save_workflow_draft.d.ts +1 -0
- package/dist/services/actionflow/save_workflow_draft.d.ts.map +1 -1
- package/dist/services/actionflow/save_workflow_draft.js +61 -16
- package/dist/services/actionflow/save_workflow_draft.js.map +1 -1
- package/dist/services/actionflow/step_branches.d.ts +18 -0
- package/dist/services/actionflow/step_branches.d.ts.map +1 -0
- package/dist/services/actionflow/step_branches.js +26 -0
- package/dist/services/actionflow/step_branches.js.map +1 -0
- package/dist/services/actionflow/update_service.d.ts.map +1 -1
- package/dist/services/actionflow/update_service.js +24 -53
- package/dist/services/actionflow/update_service.js.map +1 -1
- package/dist/services/actionflow/workflow_compiler.d.ts +1 -1
- package/dist/services/actionflow/workflow_compiler.d.ts.map +1 -1
- package/dist/services/actionflow/workflow_compiler.js +47 -11
- package/dist/services/actionflow/workflow_compiler.js.map +1 -1
- package/dist/services/esb-interface/document-parser.d.ts.map +1 -1
- package/dist/services/esb-interface/document-parser.js +17 -1
- package/dist/services/esb-interface/document-parser.js.map +1 -1
- package/dist/services/esb-interface/importer.d.ts +4 -1
- package/dist/services/esb-interface/importer.d.ts.map +1 -1
- package/dist/services/esb-interface/importer.js +10 -4
- package/dist/services/esb-interface/importer.js.map +1 -1
- package/dist/services/esb-interface/postman-collection.d.ts +6 -0
- package/dist/services/esb-interface/postman-collection.d.ts.map +1 -1
- package/dist/services/esb-interface/postman-collection.js +12 -1
- package/dist/services/esb-interface/postman-collection.js.map +1 -1
- package/dist/services/esb-interface/types.d.ts +1 -0
- package/dist/services/esb-interface/types.d.ts.map +1 -1
- package/dist/services/form-association.d.ts +1 -0
- package/dist/services/form-association.d.ts.map +1 -1
- package/dist/services/form-association.js +28 -4
- package/dist/services/form-association.js.map +1 -1
- package/dist/services/form-table-view.d.ts +24 -4
- package/dist/services/form-table-view.d.ts.map +1 -1
- package/dist/services/form-table-view.js +144 -133
- package/dist/services/form-table-view.js.map +1 -1
- package/dist/services/rich-types.d.ts.map +1 -1
- package/dist/services/rich-types.js +149 -9
- package/dist/services/rich-types.js.map +1 -1
- package/dist/services/skill-provision.d.ts +9 -3
- package/dist/services/skill-provision.d.ts.map +1 -1
- package/dist/services/skill-provision.js +36 -7
- package/dist/services/skill-provision.js.map +1 -1
- package/package.json +3 -2
- package/skill-docs/SKILL.md +261 -252
- package/skill-docs/_catalog.md +66 -0
- package/skill-docs/actionflows/CONTEXT.md +71 -0
- package/skill-docs/actionflows/SKILL.md +159 -0
- package/skill-docs/actionflows/references/components/database/DMLExecute.md +38 -0
- package/skill-docs/actionflows/references/components/ebuilder/ActionEbAdd.md +2 -0
- package/skill-docs/actionflows/references/components/ebuilder/ActionEbUpdate.md +2 -0
- package/skill-docs/actionflows/references/components/ebuilder/EnquiryForm.md +2 -2
- package/skill-docs/actionflows/references/components/http/Http.md +77 -0
- package/skill-docs/actionflows/references/components/message/SendMessage.md +14 -1
- package/skill-docs/actionflows/references/condition_rules.md +1 -0
- package/skill-docs/actionflows/references/dynamic_resources.md +41 -0
- package/skill-docs/actionflows/references/function_rules.md +15 -13
- package/skill-docs/references/common/guide-plan-template.md +21 -7
- package/skill-docs/references/common/ref-cli-commands.md +13 -6
- package/skill-docs/references/esb-interface/guide-import.md +31 -0
- package/skill-docs/references/form/guide-create-form.md +126 -376
- package/skill-docs/references/form/guide-form-association.md +6 -3
- package/skill-docs/references/form/guide-form-layout-planning.md +68 -0
- package/skill-docs/references/form/guide-form-serial-mark.md +47 -0
- package/skill-docs/references/form/guide-form-view.md +22 -3
- package/skill-docs/references/form/ref-form-fields.md +147 -0
- package/skill-docs/references/hrm/guide-matrix.md +54 -3
- package/skill-docs/references/workflow/guide-workflow-action.md +2 -0
- package/skill-docs/references/workflow/guide-workflow-condition.md +48 -6
- package/skill-docs/references/workflow/guide-workflow-odoc.md +76 -0
- package/skill-docs/references/workflow/guide-workflow.md +467 -461
- package/skill-docs/references/workflow/operator-matrix.md +2 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Skill Ebcoder 目录索引
|
|
2
|
+
|
|
3
|
+
> 此文件列出所有子文档的加载条件,供 Agent 按需加载。不要一次性加载全部。
|
|
4
|
+
>
|
|
5
|
+
> 以下所有路径统一写作 `references/...`:相对工作区根目录(`skill copy` 拷出的位置),或本机 skill 根目录(完整安装自带)。
|
|
6
|
+
|
|
7
|
+
## Guides(编码指南)
|
|
8
|
+
|
|
9
|
+
| 用户意图关键词 | 加载文档 |
|
|
10
|
+
|---------------|---------|
|
|
11
|
+
| 表单CRUD、增删改查、getSimpleData、withDisplayNames、getFieldOptions、saveFormData、updateFormData、deleteFormData、字段类型 | `references/coding/guide-form-crud.md`(前端代码) |
|
|
12
|
+
| 编辑、修改、回显、handleEdit、getAllData、rawData、selectedPerson、editForm、数据回填 | `references/coding/guide-edit-backfill.md`(前端代码) |
|
|
13
|
+
| 字段联动、显隐联动、条件显示、form linkage | `references/form/guide-form-linkage.md` |
|
|
14
|
+
| 新建表单、form create、EB 表单标准创建流程 | `references/form/guide-create-form.md` |
|
|
15
|
+
| 字段定义、字段类型、关联字段码表、DateRange、multiple | `references/form/ref-form-fields.md` |
|
|
16
|
+
| FLOW/EXCEL、布局样表、布局蓝图、字段分组、singleRow | `references/form/guide-form-layout-planning.md` |
|
|
17
|
+
| 表单复杂编号、serial-mark、流水号、代字 | `references/form/guide-form-serial-mark.md` |
|
|
18
|
+
| 表单数据读写、form data、写入数据、查询数据、删除数据 | `references/form/guide-form-data.md` |
|
|
19
|
+
| 流程、审批、workflow、提交流程、flowpage、预填、URL传参、节点、操作者、审批人、连线 | `references/workflow/guide-workflow.md` |
|
|
20
|
+
| 公文流程、公文审批、收文、发文、公文设置、正文设置 | `references/workflow/guide-workflow-odoc.md` + `references/workflow/guide-workflow.md` |
|
|
21
|
+
| 分支条件、出口条件、条件JSON、save-condition、连线条件、condition add | `references/workflow/guide-workflow-condition.md` |
|
|
22
|
+
| 条件操作符编码、字段类型矩阵、关系符 | `references/workflow/operator-matrix.md` |
|
|
23
|
+
| 动作流、跨表单、写入台账、ActionEbAdd/ActionEbUpdate/ActionEbDelete、提交事件、自定义事件触发、内置MQ监听/发送、HTTP/HTTPS、DML/数仓 | `references/workflow/guide-workflow-action.md`;复杂动作流组件契约按需读取 `actionflows/SKILL.md` 及其 `references/components/` |
|
|
24
|
+
| 鉴权、登录、auth、ETEAMSID、多环境、profile、切换环境 | `references/auth/guide-auth.md` |
|
|
25
|
+
| HRM矩阵、条件矩阵、matrix、映射表 | `references/hrm/guide-matrix.md` |
|
|
26
|
+
| 新页面、导出、路由、entry.js、regOvProps、regReactChildren、asyncImport、publicUrl、Suspense | `references/coding/guide-page-export.md`(前端代码) |
|
|
27
|
+
| 写页面、页面代码、React编码、组件、entry.js模板 | `references/coding/guide-page-code.md`(前端代码) |
|
|
28
|
+
|
|
29
|
+
## Reference(参考手册)
|
|
30
|
+
|
|
31
|
+
| 用户意图关键词 | 加载文档 |
|
|
32
|
+
|---------------|---------|
|
|
33
|
+
| CLI、命令、打包、build、import、创建应用、创建表单、菜单、project、form create、app create、matrix | `references/common/ref-cli-commands.md` |
|
|
34
|
+
| 接口文档导入、Postman、系统接口、连接器接口、createSystemInterfaceByAi、接口批量创建 | `references/esb-interface/guide-import.md` |
|
|
35
|
+
| 编译、语法、报错、不支持、babel、打包、var、const、let、es2015、stage-2 | `references/coding/ref-compile-rules.md`(前端代码) |
|
|
36
|
+
|
|
37
|
+
## Components(组件文档)
|
|
38
|
+
|
|
39
|
+
| 用户意图关键词 | 加载文档 |
|
|
40
|
+
|---------------|---------|
|
|
41
|
+
| Button、按钮 | `references/components/@weapp-Button.md` |
|
|
42
|
+
| Table、表格 | `references/components/display-Table.md` |
|
|
43
|
+
| List、列表 | `references/components/display-List.md` |
|
|
44
|
+
| Pagination、分页 | `references/components/display-Pagination.md` |
|
|
45
|
+
| Icon、图标 | `references/components/display-Icon.md` |
|
|
46
|
+
| Avatar、头像 | `references/components/display-Avatar.md` |
|
|
47
|
+
| EChart、图表、Echarts | `references/components/generic-Echarts.md` |
|
|
48
|
+
| 文件预览、CorsComponent | `references/components/display-FilePreview.md` |
|
|
49
|
+
| Input、输入框、文本框 | `references/components/form-Input.md` |
|
|
50
|
+
| 人员选择、Browser Employee、resource | `references/components/form-EmployeeBrowser-api.md` |
|
|
51
|
+
| 部门选择、Browser Department、department | `references/components/form-DepartmentBrowser-api.md` |
|
|
52
|
+
| Upload、文件上传、附件、FileComponent | `references/components/form-Upload.md` |
|
|
53
|
+
| Badge、徽标 | `references/components/base-Badge.md` |
|
|
54
|
+
| Tag、标签 | `references/components/base-Tag.md` |
|
|
55
|
+
|
|
56
|
+
## 组合场景
|
|
57
|
+
|
|
58
|
+
| 场景 | 需加载的文档 |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| CRUD 列表页 | `references/coding/guide-form-crud.md`(前端代码) + `references/components/display-Table.md` + `references/components/display-Pagination.md` |
|
|
61
|
+
| 表单新增/编辑弹窗 | `references/coding/guide-form-crud.md`(前端代码) + `references/coding/guide-edit-backfill.md` + 对应表单组件文档 |
|
|
62
|
+
| 新建完整应用 | `references/common/ref-cli-commands.md` + `references/form/guide-create-form.md` + `references/coding/guide-page-export.md`(前端代码) |
|
|
63
|
+
| 流程触发页面 | `references/workflow/guide-workflow.md` + `references/coding/guide-form-crud.md`(前端代码) |
|
|
64
|
+
| 流程分支条件 | `references/workflow/guide-workflow.md` + `references/workflow/guide-workflow-condition.md` |
|
|
65
|
+
| 跨表单动作流 | `references/workflow/guide-workflow.md` + `references/workflow/guide-workflow-action.md` |
|
|
66
|
+
| 编译报错排查 | `references/coding/ref-compile-rules.md`(前端代码) |
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Ubiquitous Language
|
|
2
|
+
|
|
3
|
+
## Component Support
|
|
4
|
+
|
|
5
|
+
**Supported component** — A component registered in this Skill that has passed
|
|
6
|
+
the real platform temporary-save and temporary-snapshot-readback verification.
|
|
7
|
+
It may be selected and generated by the Skill.
|
|
8
|
+
|
|
9
|
+
The registry and the supported-component list contain supported components only.
|
|
10
|
+
There is no experimental or partially-supported registry state.
|
|
11
|
+
|
|
12
|
+
A component is supported only when all of the following hold: its real frontend
|
|
13
|
+
fields and dynamic required/exclusive rules are documented; every public
|
|
14
|
+
parameter has a verified native DTO conversion; conversion and validation have
|
|
15
|
+
automated tests; at least one real temporary-save and temporary-snapshot
|
|
16
|
+
readback succeeds; and its documentation states the supported property scope.
|
|
17
|
+
|
|
18
|
+
An individual supported component exposes only its verified properties. An
|
|
19
|
+
unverified property is absent from its public parameter contract and is rejected
|
|
20
|
+
when requested; it does not make already-verified properties unavailable.
|
|
21
|
+
|
|
22
|
+
**Component contract** — The machine-readable source of truth for a supported
|
|
23
|
+
component's name, public properties, types, required rules, and context
|
|
24
|
+
inputs/outputs. Derived component lists are updated by an explicit sync command
|
|
25
|
+
and checked for drift before a change is accepted.
|
|
26
|
+
|
|
27
|
+
**Core capability** — A stable shared operation such as temporary save/readback
|
|
28
|
+
or workflow compilation. Component-specific logic remains private by default;
|
|
29
|
+
it is promoted to the core only after a second real component needs the same
|
|
30
|
+
operation.
|
|
31
|
+
|
|
32
|
+
**Unsupported capability** — A platform capability lacking the required
|
|
33
|
+
component contract or verified native DTO. It is not registered in the Skill;
|
|
34
|
+
the Skill must report it as unsupported rather than fabricate a value.
|
|
35
|
+
|
|
36
|
+
## Generation Lifecycle
|
|
37
|
+
|
|
38
|
+
**Generation attempt** — An actionflow application created by one execution of
|
|
39
|
+
the generator for a semantic plan; a failed attempt may be disabled and
|
|
40
|
+
removed, while an old unmarked attempt remains a manual-cleanup candidate.
|
|
41
|
+
|
|
42
|
+
**Formal actionflow** — The one current generated application whose save,
|
|
43
|
+
enablement, and formal readback have all succeeded.
|
|
44
|
+
|
|
45
|
+
**Duplicate generated actionflow** — A non-current `AI-` application carrying
|
|
46
|
+
the same generator identity as the current formal actionflow, even when its
|
|
47
|
+
display name is different.
|
|
48
|
+
|
|
49
|
+
**Generator identity** — The stable identity derived from the semantic plan
|
|
50
|
+
while excluding only its display name and description; it is distinct from the
|
|
51
|
+
human-readable actionflow name.
|
|
52
|
+
|
|
53
|
+
## Existing Actionflow Modification
|
|
54
|
+
|
|
55
|
+
**Modification target actionflow** — The exact existing application identified
|
|
56
|
+
by `appId`; a display name or fuzzy search is never sufficient to select it.
|
|
57
|
+
|
|
58
|
+
**Original formal design** — The current design returned by the target
|
|
59
|
+
actionflow's active scene before an update. It is the update baseline and is
|
|
60
|
+
backed up before any write.
|
|
61
|
+
|
|
62
|
+
**Preserving update** — An update that applies only explicitly declared
|
|
63
|
+
operations to the original formal design and retains every unmentioned node
|
|
64
|
+
and property. The save request keeps the baseline IDs, but the platform may
|
|
65
|
+
reallocate action/output IDs when creating a new version; readback must match
|
|
66
|
+
the new version by tree position/type when an ID changes.
|
|
67
|
+
|
|
68
|
+
**Modification backup** — The complete original formal-design response stored
|
|
69
|
+
before a preserving update. It is evidence for review and manual recovery; the
|
|
70
|
+
CLI does not silently use it to overwrite the target after a failed save or
|
|
71
|
+
readback.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generating-actionflows
|
|
3
|
+
description: "将业务需求编译为 Weaver ESB 动作流,或读取已有动作流后按原 ID 保留式修改:查询真实对象、正式保存、回读校验并返回设计器链接。运行能力来自 e10-cli 的 actionflow 命令组(复用 e10-cli 登录态)。新建默认保存并启用;仅当用户明确要求暂存时传 mode:stash。已有动作流修改走 update。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Weaver 动作流生成
|
|
7
|
+
|
|
8
|
+
将需求编译为「触发器 → 动作链 → 结束」的 ESB 动作流。先发现真实平台数据,再生成;不根据名称、历史场景或示例猜测任何平台对象。
|
|
9
|
+
|
|
10
|
+
运行能力来自 `e10-cli actionflow` 命令组(已合并进 e10-cli 本体,复用其登录态,无需单独导出环境变量)。默认**保存并启用**(saveDesign saveAndStart=true);仅当用户明确要求暂存时传 `mode:"stash"` 走暂存(saveStashSnapshot)。
|
|
11
|
+
|
|
12
|
+
## 运行与维护边界
|
|
13
|
+
|
|
14
|
+
- **运行模式(默认)**:只运行 `e10-cli actionflow <命令>`、读取本 Skill 的当前阶段/当前组件说明;不得读取或修改 e10-cli 源码(`packages/cli/src/services/actionflow/`)。
|
|
15
|
+
- **维护模式**:仅在用户明确要求修复、审计或新增组件时编辑实现;修改后必须跑类型检查、测试、构建和本 Skill 校验。校验目标固定为 `skill/actionflows`:不要把上层 `skill` 或发布目录 `skill-docs` 当作这个动作流 Skill 的标准目录校验。上层入口包含 E10 包的自定义元数据(如 `author`、`category`、`version`、`display_name`),不因通用校验器不认识这些扩展字段而改写、删除或迁移它们。
|
|
16
|
+
- 参数、默认值、动态必填、真实对象结构的唯一权威是 `e10-cli actionflow component-describe <type>`,参考文件不重复属性表。
|
|
17
|
+
|
|
18
|
+
## 生成 SOP
|
|
19
|
+
|
|
20
|
+
按顺序推进;只读取当前步骤需要的信息。每个场景是独立事务。
|
|
21
|
+
|
|
22
|
+
### 1. 识别与选择
|
|
23
|
+
|
|
24
|
+
1. 拆出触发器、动作顺序、条件/循环、固定资源与动态来源。
|
|
25
|
+
2. 运行 `e10-cli actionflow component-list`,选择已登记组件。
|
|
26
|
+
3. 对每一个选中的组件运行 `e10-cli actionflow component-describe <type>`,再只读取下方目录中该组件的 Markdown。
|
|
27
|
+
4. 若存在多个业务选择会改变结果,或用户明确指定的资源找不到,暂停说明差异并询问;其余可查询的信息直接查询。
|
|
28
|
+
|
|
29
|
+
### 2. 发现真实数据
|
|
30
|
+
|
|
31
|
+
按 `component-describe` 的 `propertySources` 查询本次租户数据:
|
|
32
|
+
|
|
33
|
+
- 流程:`e10-cli actionflow workflow-browser-list` / `workflow-search` / `workflow-nodes`。
|
|
34
|
+
- 流程动态字段:`e10-cli actionflow workflow-context-fields`。默认每页 20 条;按需求字段名先传 `query`(例如 `{"workflowId":"<id>","query":"数据ID"}`),只使用本次返回的 `fields[].paramKey`。完整响应过大时用 `--out context.json` 落盘,禁止依赖终端截断后的片段。
|
|
35
|
+
- e-builder:`e10-cli actionflow form-applications` → `form-list` → `form-fields`。`form-applications` 返回的业务应用 `id` 用于下一步:`e10-cli actionflow form-list '{"groupId":"<业务应用ID>"}'`;这里必须是 `groupId`,不能传 `appId`。表单字段查询才使用 `{"tableId":"<表单ID>","appId":"<业务应用ID>"}`。
|
|
36
|
+
- 人员:`e10-cli actionflow recipient-search`。
|
|
37
|
+
- 人员入职/更新字段:`e10-cli actionflow hrm-onboarding-fields`。
|
|
38
|
+
- 文档状态:`e10-cli actionflow document-statuses`。
|
|
39
|
+
|
|
40
|
+
查不到真实对象、字段或前端 DTO 时,不猜测 ID 或对象结构,说明未支持字段并停止该字段的生成。
|
|
41
|
+
|
|
42
|
+
### 3. 组装语义计划
|
|
43
|
+
|
|
44
|
+
1. 写入 `event`、`actions`,条件和循环作为动作拓扑的一部分。
|
|
45
|
+
2. 只传 `component-describe` 声明的参数;固定值与动态值根据业务需求选择,不能为了动态而动态。
|
|
46
|
+
3. 中文 plan 写入当前工作区 `.actionflow-plans/`,以 `planFile` 传给 CLI;不在 Skill 目录写临时文件。CLI 不会自动删除 plan;确认 `valid=true`、`saved=true`、`readBackVerified=true` 后才允许手工清理。
|
|
47
|
+
4. 不手写 `Output`、平台内部字段或 FormulaBean DTO,除非组件契约明确要求前端原对象。
|
|
48
|
+
5. 定时组件只使用 Quartz Cron:传 `cornString`,不传 `rate`、`hour`、`cycle`、`day` 等历史调度参数。
|
|
49
|
+
6. 触发器或查询组件未被需求明确限制输出字段时,不传 `queryFields`(或传空数组):CLI 会默认全选,包含“数据ID”。如果需求明确引用某个业务字段,必须从当前租户的实时字段接口/字段选择器获取完整字段对象并保存真实 `id`,不能凭字段名、临时 ID 或只拼 `id/content`。查询节点还必须使用自身真实节点 ID 作为 `dataSource.enquiryId`,否则平台可能静默丢弃业务字段。正式回读必须确认每个声明的 `queryFields` 仍存在;缺失即生成失败,不能仅凭接口 `code=200`、`saved=true` 判定成功。e-builder 数据触发后发送消息且未显式给链接时,CLI 自动补 PC/移动端当前记录详情链接;不手写 `{formId}` / `{dataId}` 的 FormulaBean。查询结果字段动态赋值必须按手工设计器对象编译:普通业务字段使用 `FormField.<查询表单ID>.field_<真实字段ID>`,`config.paramKey` 使用 `<查询表单ID>.field_<真实字段ID>`,`config.fieldInfo.tablePrimaryKey` 为 `FormField`;系统字段按平台真实字段键(例如 `id`)保留。禁止使用 `FormData.<表单ID>[临时位置]...`,也禁止把临时公式 ID 当作 `frontId`。
|
|
50
|
+
7. `ActionEbAdd` 批量新增以 `basisValue` 为明细行上下文:来源于该行的字段都用 `mapping`,编译为“依据值下级”(`switchType:"sub"`),下拉字段也同样处理。只有已核实来源/目标选项 ID 不同且语义需要转换时,才使用 `SWITCH`。关联 e-builder 字段应引用查询结果的 `数据ID`,固定格式为 `{target,kind:"query_result",source:"<EnquiryForm ref>",formId,fieldId:"id",index:0}`;`kind:"enquiry"`、`sourceId` 等旧写法会直接报错,绝不降级为空固定值。
|
|
51
|
+
8. 动态赋值可使用或新建动作流变量、租户常量:已有资源必须用真实 ID;计划新建变量写顶层 `variables[]`,新建常量写 `constantDefinitions[]`,常量分组可传 `groupPk` 或 `groupName`。变量按当前 `applicationId + sceneId` 隔离,常量按分组跨动作流复用。生成时先调用真实接口创建/解析资源,再编译为变量 `type:"7"` 或常量 `type:"5"` FormulaBean;详细格式见 `references/dynamic_resources.md`。消息 `parts` 也支持 `variable`/`constant` 动态片段。
|
|
52
|
+
8. 自定义事件和内置 MQ 的参数必须按对应平台组件说明提供原生参数对象;`CustomTrigger.customData`、`InnerMQListener.receiveParams`、`InnerMQSend.sendParams` 不能用猜测的字段替代。若验证要求“输入参数里有字段”,必须在生成前提供至少一行真实原生参数;`tables:[]`、`tableList:[]` 或省略 `receiveParams` 只能表示无输入参数,不能作为有参数的占位。`InnerMQListener` 与 `InnerMQSend` 是动作流级互斥组件,同一计划(包括条件/循环嵌套)同时出现时,CLI 在任何平台写接口前直接报错。
|
|
53
|
+
9. 根触发节点的 `event.attr.icon` 必须使用平台真实图标:`CustomTrigger` 为 `Icon-N-Triggerrul`,`InnerMQListener` 为 `Icon-built-in-mq-listening-mcolor`;组件目录里的动作图标不能覆盖根触发器图标。保存后回读必须同时检查触发器图标、已声明输入参数的数量和查询字段,不能仅凭 `valid=true` / `saved=true` 判定配置正确。
|
|
54
|
+
10. `InnerMQSend.sendParams.tableData` 必须遵循“参数类型决定数据类型候选”的平台规则:普通非数组标量通常只有“属性”一个选项,不应伪造可下拉状态;数组或 `json/xml/xml_string` 结构化参数才按真实候选设置 `dataType`,结构化参数的下级用 `parentId` 表达,并保留父子约束。具体规则见 `references/components/message/InnerMQSend.md`。
|
|
55
|
+
|
|
56
|
+
### 4. 生成与逐场景反馈
|
|
57
|
+
|
|
58
|
+
1. 一次只运行一个 `generate`。
|
|
59
|
+
2. 成功保存并启用后立即返回名称、状态与 `workflowUrl`,再处理下一个场景。
|
|
60
|
+
3. 批量任务完成后再给汇总表;一个场景失败不阻断其他场景。
|
|
61
|
+
|
|
62
|
+
### 4.1 修改已有动作流
|
|
63
|
+
|
|
64
|
+
已有动作流必须走独立的 `update` 命令,不得把已有 `appId` 塞进 `generate`,也不得按名称猜测目标:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
e10-cli actionflow update '@update-plan.json' --out update-result.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
修改计划必须使用以下结构:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"appId": "已有动作流的精确 ID",
|
|
75
|
+
"operations": [
|
|
76
|
+
{"op":"edit-node", "nodeId":"原节点 ID", "patch":{"data":{"...":"..."}}},
|
|
77
|
+
{"op":"delete-node", "nodeId":"要删除的原节点 ID"},
|
|
78
|
+
{"op":"add-node", "parentPath":"/actions", "index":1, "node":{"type":"平台节点类型","data":{}}},
|
|
79
|
+
{"op":"replace", "path":"/actions/0/data/...", "value":"新值"},
|
|
80
|
+
{"op":"remove", "path":"/actions/0/data/..."}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
操作必须显式声明;`edit-node` 深合并 `patch`,原节点 `id/wId` 不允许修改;`delete-node` 会从设计树移除节点并填充 `deleteActions`;`add-node` 使用 `read-design --out` 得到的平台原生节点结构,可用 `index` 插入指定位置,自动补雪花 ID 并填充 `addIds`。新增执行节点必须插在终止节点之前,且同步修改终止节点的 `sources`。回读对象中的平台展示字段会先转换为 `saveDesign` 接受的写入 DTO(例如 EventButton 的 `eventButtonId` 和按钮对象),不能把回读 JSON 原样作为接口体。更新计划中的节点 ID 必须来自本次正式 `read-design`,不能复用更早版本的 ID。保存新版时平台可能为动作/出口重新分配内部 ID;回读校验优先按 ID,ID 变化时按动作树路径和类型匹配,不能因版本复制产生新 ID 就误判失败。`sources[].id` 由平台保存时动态分配/回读时可能省略,必须通过稳定的 `sources[].wId` 校验。未操作的节点和属性从正式回读原样作为保存基线,不会被新建编译器重建;新建动作流的 `assistLayer` 只写平台空骨架 `{"nodes":[],"layout":{}}`,更新已有动作流保留原生 X6 画布节点,不得伪造扁平 `{id,type,layout}` 节点,也不能把旧版本悬空节点带入新版。更新前自动备份完整正式设计到 `.actionflow-plans/backups/`;也可以传 `backupFile` 指定路径。
|
|
86
|
+
|
|
87
|
+
更新默认根据目标动作流当前状态决定 `saveAndStart`,保持启用/未启用状态;只有计划显式传 `saveAndStart` 才改变它。触发器 `event` 必须原样保留,禁止通过 `replace/remove` 修改 `/event` 或其子路径;如果要改变触发类型、触发表单、触发时机或触发器参数,必须新建动作流。正式更新固定带 `saveNewVersion:true`,保存为原动作流的新版本。保存响应未返回新版 ID 时,CLI 必须重新查询版本列表定位版本号更大的新场景,再对新版正式回读;定位不到新版时不能拿旧版冒充校验通过。保存后必须正式回读并检查编辑、新增、删除及未修改节点是否仍在;接口失败或回读失败只返回原因和备份位置,不自动回滚、覆盖或删除目标动作流。
|
|
88
|
+
|
|
89
|
+
### 5. 回读与异常分流
|
|
90
|
+
|
|
91
|
+
- 预检/编译失败:修正计划或报告缺失真实对象;不会创建动作流。
|
|
92
|
+
- 保存并启用成功但正式回读不一致:不得宣称验证通过;根据回读定位计划或组件问题,修复后重试,旧测试流由 CLI 回收。
|
|
93
|
+
- 保存并启用成功且正式回读通过:返回链接。
|
|
94
|
+
- 保存失败:返回平台错误原因;不自动退回暂存。
|
|
95
|
+
- 平台接口或前端编辑器不可用:明确区分「JSON/readBack 已验证」和「UI 待确认」。
|
|
96
|
+
|
|
97
|
+
## 流程节点触发绑定
|
|
98
|
+
|
|
99
|
+
`generate` 的 event 节点(`ApproveTrigger`)自带流程节点触发绑定:单条规则用 `workflowPath`(流程 id)+ `triggerTiming`;同一流程有多个触发时机时用 `triggerRules` 数组,编译为一个 `singleApproveConfigs[workflowId]` 规则数组。节点型时机使用 `approveNode`,出口型 `link` 必须使用真实 `approveLink`;编译器逐条校验可选节点类型与执行时间,不走 pathdef/addaction。多规则需要不同后续动作时,先按触发器上下文 `triggerType` / `executeTime` / `triggerNodeOrLinkId` 放 `Condition` 分支。完整联动表见 `references/components/workflow/ApproveTrigger.md`。
|
|
100
|
+
|
|
101
|
+
`generate` 默认**保存并启用**(saveDesign saveAndStart=true,正式版本生效),正式回读用 `getDesignBySceneId`。仅 `mode:"stash"` 时走暂存(saveStashSnapshot,非正式生效,需设计器手动发布)。
|
|
102
|
+
|
|
103
|
+
## CLI
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
e10-cli actionflow component-list
|
|
107
|
+
e10-cli actionflow component-describe <type>
|
|
108
|
+
e10-cli actionflow generate '{"planFile":"@<绝对路径>","appName":"AI-名称"}' --out generate-result.json # 默认保存并启用
|
|
109
|
+
e10-cli actionflow generate '{"planFile":"@...","mode":"stash"}' # 显式暂存(不启用)
|
|
110
|
+
e10-cli actionflow update '@update-plan.json' --out update-result.json # 读取后按原 ID 保留式修改
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
常用发现命令:`form-applications`、`form-list`、`form-fields`、`workflow-browser-list`、`workflow-search`、`workflow-nodes`、`workflow-context-fields`、`recipient-search`、`document-statuses`、`hrm-onboarding-fields`、`variable-list`、`variable-create`、`constant-list`、`constant-group-list`、`constant-group-create`、`constant-create`、`http-connectors`、`http-resources`、`http-interfaces`、`http-interface-detail`、`design-versions`、`read-stash`。变量/常量计划定义和引用见 `references/dynamic_resources.md`。
|
|
114
|
+
|
|
115
|
+
## 触发器边界
|
|
116
|
+
|
|
117
|
+
当前可生成的事件触发器:`ApproveTrigger`(流程事件)、`EventFormData`(e-builder 数据新增/更新/删除/字段变化)、`EventButton`(点击 e-builder 指定按钮)、`DateTrigger`、`TimeBatchTrigger`、`SimpleScheduler`、`CustomTrigger`(自定义事件)和 `InnerMQListener`(内置 MQ 监听)。`EventButton` 必须先用 `e10-cli actionflow form-buttons '{"tableId":"<表单ID>","appId":"<应用ID>"}'` 查询真实按钮,再以 `targetForm`、`buttonType:[{id,name,buttonLocation:"before"|"after"}]` 和可选 `triggerType` 生成;不得用 `EventFormData` 冒充按钮点击。`CustomTrigger` 和 `InnerMQListener` 的原生参数要求见 `references/components/trigger/CustomTrigger.md`、`references/components/trigger/InnerMQListener.md`。
|
|
118
|
+
|
|
119
|
+
动作 `Http` 用于调用当前租户已配置的 HTTP/HTTPS 接口,参数要求见 `references/components/http/Http.md`;HTTPS 使用同一个 `Http` 组件,不能把协议地址当成新的组件类型。生成前会实时读取并校验“连接器 → 资源 → 接口 → 接口详情”,节点标题按“当前连接器: 当前接口”回填,图标按当前连接器目录回填;不存在、跨租户或归属不一致时拒绝生成,不信任旧环境的 E9 等名称、地址、图标或原生映射。HTTP 请求字段通过 `inputParams` 配置,必须用接口详情真实返回的 `table`/`paramKey`,CLI 写入参数行的 `formulaData`,支持统一的固定值、上下文、系统变量及函数/公式赋值;不能猜参数或直接改写 `request.tables`。动作 `InnerMQSend` 用于向平台内置 MQ 发送消息,参数要求见 `references/components/message/InnerMQSend.md`。`InnerMQListener` 和 `InnerMQSend` 不能放在同一个动作流中;该约束也适用于 `update` 修改后的完整设计。
|
|
120
|
+
|
|
121
|
+
动作 `DMLExecute` 用于执行自定义 SQL 或存储过程,参数要求见 `references/components/database/DMLExecute.md`。只支持新版数仓结构,`operateType` 固定为 `0`;数据源连接 ID 必须通过 `actionflow datasource-list` 从当前环境取得,SQL 占位符与 `fieldSet` 必须严格对应。含 DML 的生成结果还要检查 `sqlAnalysisOk=true`,因为平台 SQL 分析失败可能不会阻断保存。
|
|
122
|
+
|
|
123
|
+
含复杂 JSON 时优先用 `generate` 的 `planFile` 参数,且必须写为 `@plan.json` 或 `@绝对路径`,避免 shell 转义改变内容。只以终端摘要的 `valid/saved/readBackVerified/workflowUrl` 判断成功;完整结果用 `--out` 保存,禁止依据截断输出重试。
|
|
124
|
+
|
|
125
|
+
`update` 同样只以终端摘要的 `valid/saved/readBack.ok/workflowUrl` 判断成功;完整设计和回读结果使用 `--out` 保存。修改计划只接受 `@文件名` 形式,不兼容裸文件名。已有动作流更新时 `event` 触发器是不可变边界:更新计划不得替换或修改 `/event`,若需求要改变触发类型、触发表单、触发时机或触发器参数,CLI 必须在 `check/saveDesign` 前拒绝,并提示新建动作流。通过更新校验后,正式保存固定发送 `saveNewVersion:true`,在原动作流下创建平台新版本;保存后按新版场景 ID 回读,不能因平台重分配动作节点 ID 或终止节点 ID 而误报失败;`saveAndStart` 只继承/控制启用状态,不改变这一版本策略。
|
|
126
|
+
|
|
127
|
+
成功生成后,CLI 会在应用描述中写入稳定的 `e10-cli:actionflow:v1:<plan指纹>` 标识,并仅清理**同一标识、`AI-` 前缀且不是当前应用**的旧生成尝试;名称可以不同。每条都执行“禁用 → 回收删除 → getAppById 确认不存在”。没有该标识的历史动作流不自动删除,避免误删人工流;清理结果/失败原因返回在 `duplicateCleanup`,当前失败应用的回收失败返回 `cleanupWarning`,不把接口失败归因于 Skill。
|
|
128
|
+
|
|
129
|
+
## 组件目录
|
|
130
|
+
|
|
131
|
+
选中类型后只读取 `references/components/<分类>/<type>.md` 对应文件;不读取同分类的其他组件文件。
|
|
132
|
+
|
|
133
|
+
| 设计器分类 | 组件文件目录 |
|
|
134
|
+
|---|---|
|
|
135
|
+
| e-builder 数据与表单触发 | `references/components/ebuilder/` |
|
|
136
|
+
| 流程 | `references/components/workflow/` |
|
|
137
|
+
| 文档 | `references/components/document/` |
|
|
138
|
+
| 人员 | `references/components/personnel/` |
|
|
139
|
+
| 逻辑 | `references/components/logic/` |
|
|
140
|
+
| HTTP/HTTPS 接口 | `references/components/http/` |
|
|
141
|
+
| 消息提醒 | `references/components/message/` |
|
|
142
|
+
| 内置 MQ / 自定义事件 | `references/components/trigger/`、`references/components/message/` |
|
|
143
|
+
| 会议、日程 | `references/components/calendar/` |
|
|
144
|
+
| 简单定时器 | `references/components/trigger/` |
|
|
145
|
+
|
|
146
|
+
额外按需规则:
|
|
147
|
+
|
|
148
|
+
- 使用流程/表单触发器的系统字段、数据 ID 或动态引用时,读取 `references/trigger_runtime_notes.md`。
|
|
149
|
+
- 使用 `Condition` 或 e-builder 筛选条件时,读取 `references/condition_rules.md`。
|
|
150
|
+
- 组件需要计算、转换或函数树时,读取 `references/function_rules.md`;仅在该组件的说明允许函数树时使用。
|
|
151
|
+
|
|
152
|
+
筛选条件左值的字段身份必须按实时 `componentKey` 生成,不能只按字段 ID 是否为数字判断。普通 e-builder 业务字段才使用 `field_<id>`;`Workflow` 关联流程字段使用原始数字 `fieldName`、`fieldType:"String"`、空 `module`/`originBrowserType`、`formInfo.formId/layoutId`、顶层 `sformId` 和仅含 `fieldId` 的 `config`。Workflow 的 `sformId` 必须由 `workflowPath.formIds` 反查真实流程表单对象;查不到就停止,不能用目标表单版本 ID兜底。保存后正式回读必须检查左值没有出现“已删除”。
|
|
153
|
+
|
|
154
|
+
## 不变约束
|
|
155
|
+
|
|
156
|
+
- 动作流名称默认 `AI-` 前缀。
|
|
157
|
+
- 所有流程、表单、字段、人员、目录、规则和身份均取自当前租户。
|
|
158
|
+
- 不支持的组件或缺少真实前端对象的属性明确拒绝,不走保底伪造。
|
|
159
|
+
- 凭据只复用 e10-cli 登录态,不写入 Skill、计划或输出。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# DML 操作(`DMLExecute`)
|
|
2
|
+
|
|
3
|
+
用于执行自定义 SQL 或存储过程。它不是 e-builder 表单数据操作;表单数据请使用 `ActionEbAdd`、`ActionEbUpdate`、`ActionEbDelete`。
|
|
4
|
+
|
|
5
|
+
## 组件约束
|
|
6
|
+
|
|
7
|
+
- 只支持新版数仓结构,`operateType` 固定为 `"0"`。
|
|
8
|
+
- `sqlContentDw` 必填,必须包含 `dataset.sqlQuery.sql` 和 `dataSetConn.id`。
|
|
9
|
+
- `dataSetConn.id` 应先通过 `e10-cli actionflow datasource-list` 查询当前环境的真实数据源连接;不要用其他环境的 ID。
|
|
10
|
+
- SQL 使用明文,参数占位符写成 `[${参数名}]` 或 `[ ${参数名} ]`。
|
|
11
|
+
- 每个占位符必须在 `fieldSet` 中有同名 `assignName`,`assign` 必须是平台原生 FormulaBean 数组。
|
|
12
|
+
- SQL 为空、占位符与 `fieldSet` 不匹配、结果集结构非法时,CLI 会在保存前拒绝生成。
|
|
13
|
+
|
|
14
|
+
## 最小计划
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"type": "DMLExecute",
|
|
19
|
+
"params": {
|
|
20
|
+
"sqlContentDw": {
|
|
21
|
+
"dataSetConn": { "id": "<当前环境真实数据源ID>" },
|
|
22
|
+
"dataset": {
|
|
23
|
+
"sqlQuery": {
|
|
24
|
+
"sql": "update t_demo set name = [${name}] where id = [${id}]"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"fieldSet": [
|
|
29
|
+
{ "assignName": "id", "assign": ["<平台原生 FormulaBean>"] },
|
|
30
|
+
{ "assignName": "name", "assign": ["<平台原生 FormulaBean>"] }
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`dataset.module`、`dataset.type`、`sqlQuery.fields` 缺失时由 CLI 按平台结构补齐;存储过程的输出参数使用 `resultSets`。SQL 不能凭空编造,表名、字段、条件不明确时先确认,CLI 不查询数据库表结构。
|
|
37
|
+
|
|
38
|
+
平台保存 DML 时的 SQL 分析失败不一定阻止保存和启用,因此含 DML 的生成结果会额外回读 `analysisSql`。终端摘要中的 `sqlAnalysisOk` 必须为 `true`,否则只能说明动作流已保存,不能说明 SQL 可执行。
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
`targetForm`、人员和字段 ID 必须来自当前租户。动态来源只能使用本次触发器的真实 `paramKey`。
|
|
35
35
|
|
|
36
|
+
赋值值可以是固定值、上下文、动作流变量、租户常量或函数/公式;变量/常量必须先按 `references/dynamic_resources.md` 使用真实 ID 或顶层定义解析,不能把名称直接当作固定文本。
|
|
37
|
+
|
|
36
38
|
## 最小计划
|
|
37
39
|
|
|
38
40
|
`targetForm`、`person`,以及至少一项 `mapping`、`constants`、`formula` 或 `setting`。
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
`id`、`updateData`、`fieldUpdate` 三种定位方式互不替代。`basisValue` 只用于真实上游明细依据值。
|
|
14
14
|
|
|
15
|
+
更新赋值可以使用固定值、上下文、动作流变量、租户常量或函数/公式;变量必须属于当前动作流场景,常量必须是当前租户真实常量 ID。新建资源和名称引用见 `references/dynamic_resources.md`。
|
|
16
|
+
|
|
15
17
|
## 最小计划
|
|
16
18
|
|
|
17
19
|
`targetForm`、`person`、更新赋值,以及与 `opType` 对应的定位参数。
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## 最小计划
|
|
16
16
|
|
|
17
|
-
`dataSource`、`person`;按 `opType` 补充查询字段和筛选条件。未明确限制 `queryFields` 时不要传它(或传空数组),CLI 会默认全选主表和系统字段,包含“数据ID
|
|
17
|
+
`dataSource`、`person`;按 `opType` 补充查询字段和筛选条件。未明确限制 `queryFields` 时不要传它(或传空数组),CLI 会默认全选主表和系统字段,包含“数据ID”。未指定 `filter` 时,CLI 会生成平台必填的中性条件“数据ID不为空”,不改变业务筛选范围;只有明确指定 `filter` 时才使用业务条件。
|
|
18
18
|
|
|
19
19
|
## 分组/汇总查询
|
|
20
20
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
- assign:`type=3`,`value = "FormData.{查询表id}[{positionId}].id"`(**数组下标用 positionId 而非 `[]`**)
|
|
59
59
|
- `config.comType = "EnquiryForm"`、`config.comId = EnquiryForm 节点 id`、`config.paramKey = "{查询表id}[].id"`(paramKey 保持 `[]` 数组标记)
|
|
60
60
|
- **childs 必须带固定值取下标**:`[{ type: "1", value: "0", position: "{positionId}" }]`(value=0 取第一条)
|
|
61
|
-
- `frontId` =
|
|
61
|
+
- `frontId` = 查询结果字段的真实 `fieldId`(不能使用公式对象临时 id);前端用它定位查询节点输出字段,否则会回显为“数据源查询(已删除)”并标红。
|
|
62
62
|
|
|
63
63
|
3. 其余明细字段仍用依据值下级 type=10 直连(paramKey `{wfId}.{明细表id}[].{子字段id}`,source=event 节点 id)。
|
|
64
64
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# 执行 HTTP(`Http`)
|
|
2
|
+
|
|
3
|
+
执行已经在当前租户连接器中配置好的 HTTP/HTTPS 接口。平台前端组件类型是 `Http`;HTTPS 不是另一个组件类型,而是资源接口地址的协议。
|
|
4
|
+
|
|
5
|
+
先运行:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
e10-cli actionflow component-describe Http
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
按以下顺序发现真实对象,并把接口详情完整保存下来,避免终端摘要或截断输出造成误判:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
e10-cli actionflow http-connectors --out http-connectors.json
|
|
15
|
+
e10-cli actionflow http-resources '{"systemId":"<连接器ID>"}' --out http-resources.json
|
|
16
|
+
e10-cli actionflow http-interfaces '{"systemId":"<连接器ID>","resourceId":"<资源ID>"}' --out http-interfaces.json
|
|
17
|
+
e10-cli actionflow http-interface-detail '{"interfaceId":"<接口ID>"}' --out http-interface-detail.json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`http-interface-detail` 的 `request`、`response`、`address`、`requestMethod` 和 `type` 是生成计划的真实来源。正式 `generate` 还会在保存前再次按三个 ID 实时读取并校验这条链路:连接器名称/图标来自当前租户的 connector 列表,资源名称来自当前连接信息列表,接口名称和原生映射来自当前接口详情;找不到或归属不一致就停止,不会用旧环境的名称、图标或 DTO 继续生成。计划可以省略 `request`/`response`,但必须提供当前租户的三个 ID,CLI 会从接口详情补齐;如果显式传入原生映射,其 mapping ID 必须与当前接口详情一致。`type=http` 时地址可以是 `http://` 或 `https://`;`type=webservice` 时才考虑 `selectMethod`/`soapVersion`。
|
|
21
|
+
|
|
22
|
+
## 必填对象
|
|
23
|
+
|
|
24
|
+
- `systemId`:HTTP 连接器 ID。
|
|
25
|
+
- `resourceId`:连接信息/资源 ID,必须属于 `systemId`。
|
|
26
|
+
- `interfaceId`:执行接口 ID,必须属于 `resourceId`。
|
|
27
|
+
- `request`:当前租户接口详情返回的原生 `ParamGroupMappingBean`。它是保存 HTTP 动作时的请求参数映射,不能用空数组或自行猜测的 `tables`/`tableData` 代替。
|
|
28
|
+
|
|
29
|
+
这四项必须来自同一租户、同一条“连接器 → 资源 → 接口”链路。CLI 不根据名称猜 ID,也不把 HTTPS 地址改写成 HTTP。
|
|
30
|
+
|
|
31
|
+
## 可选对象
|
|
32
|
+
|
|
33
|
+
- `response`:接口详情返回的原生响应参数映射。传入后保留在节点数据中,供上下文字段和回读使用。
|
|
34
|
+
- `address`:接口详情的回显地址;如果是 `https://`,必须原样保留。它不是替代 `resourceId/interfaceId` 的连接配置。
|
|
35
|
+
- `requestMethod`:`GET`、`POST`、`PUT`、`PATCH` 或 `DELETE`。通常直接采用接口详情返回值。
|
|
36
|
+
- `selectMethod`、`soapVersion`:只用于 WebService 兼容回显,普通 HTTP/HTTPS 接口不要填写。
|
|
37
|
+
- `basisValue`:当请求 Body 是明细参数时传 `{ "paramKey": "<明细上下文paramKey>", "label": "<明细名>" }`,编译器写入平台 `basisValue` 和 `basisValueFormula`。
|
|
38
|
+
- `inputParams`:请求参数赋值列表。每项必须指定真实的参数分组、参数名和赋值表达式;CLI 会把它写入对应请求参数行的 `formulaData`,保留接口详情原有的 `request.tables` 及参数元数据。
|
|
39
|
+
|
|
40
|
+
输入参数格式是固定的:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"inputParams": [
|
|
45
|
+
{ "table": "Header", "paramKey": "Authorization", "value": { "kind": "fixed", "value": "Bearer xxx" } },
|
|
46
|
+
{ "table": "Params", "paramKey": "requestId", "value": { "kind": "context", "paramKey": "requestId", "label": "流程ID" } },
|
|
47
|
+
{ "table": "Header", "paramKey": "userid", "value": { "kind": "system_variable", "key": "{userid}" } }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`table` 只能是接口详情实际返回的 `Params`、`Header`、`Body`、`Url` 或 `Cookie`;`paramKey` 必须精确匹配该分组的真实参数(包括 JSON/明细字段的完整路径)。`value` 使用统一赋值类型,除上例外还可使用已支持的 `function`、`formula`、`variable`、`constant`、`transform` 和 `query_result`;变量/常量必须先按 `references/dynamic_resources.md` 解析,函数参数仍按函数目录的真实参数名和数量填写。CLI 会在保存前校验分组和参数是否存在,不能猜参数或静默新增参数。
|
|
53
|
+
|
|
54
|
+
## 示例
|
|
55
|
+
|
|
56
|
+
以下只展示结构,ID 和 `request` 必须替换为当前租户真实接口详情回读值:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"type": "Http",
|
|
61
|
+
"params": {
|
|
62
|
+
"systemId": "<当前租户HTTP连接器ID>",
|
|
63
|
+
"resourceId": "<该连接器的资源ID>",
|
|
64
|
+
"interfaceId": "<该资源的接口ID>",
|
|
65
|
+
"address": "https://api.example.com/project",
|
|
66
|
+
"requestMethod": "POST",
|
|
67
|
+
"request": {
|
|
68
|
+
"<接口详情返回的原生字段>": "<按平台参数设计器保存的原值>"
|
|
69
|
+
},
|
|
70
|
+
"response": {
|
|
71
|
+
"<接口详情返回的原生响应字段>": "<按平台参数设计器保存的原值>"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`response` 仍必须使用接口详情返回的原生对象。`request` 的结构和参数元数据不能用通用对象替换;但请求字段的赋值可以通过 `inputParams` 使用统一的固定值、上下文、系统变量或函数/公式语义,CLI 会转换成前端真实的 `formulaData` 协议。没有真实原生对象或参数不在接口详情中时,停止生成并先补齐接口上下文。
|
|
@@ -10,7 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
## 不可猜测
|
|
12
12
|
|
|
13
|
-
标题和内容按需求选固定文本或 `parts` 模板;纯字符串保持固定值,只有 `parts`
|
|
13
|
+
标题和内容按需求选固定文本或 `parts` 模板;纯字符串保持固定值,只有 `parts` 模板才进入设计器的消息专用编辑器。模板会编译成“正文文本 + `#{paramN}` 占位符 + 每个占位符的独立绑定”,对应手动配置时右侧的形式。**本 Skill 生成消息标题/内容时统一使用 `parts` 模板**,不要把通用函数/公式对象直接作为消息正文输入;这只是本 Skill 的生成约定,不代表平台其他场景不能使用函数。`parts` 的动态项支持 `context`、`system_variable`、`variable`、`constant`,后两者必须按 `references/dynamic_resources.md` 使用真实资源或计划定义。需要拼接上下文时,必须拆成 `parts`,例如:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"parts": [
|
|
18
|
+
{"type":"text","value":"批次任务:"},
|
|
19
|
+
{"type":"context","paramKey":"<真实任务编号paramKey>","label":"任务编号"},
|
|
20
|
+
{"type":"text","value":",设备:"},
|
|
21
|
+
{"type":"context","paramKey":"<真实设备编号paramKey>","label":"设备编号"}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
需要动态接收人时传 `receiver: {"type":"context","paramKey":"<真实人员字段paramKey>","label":"<字段名>"}`,不能把人员字段当固定人员 ID,也不能省略 `paramKey`。模板上下文只传 `paramKey` 和 `label`,由 CLI 按消息编辑器的动态片段结构编译,并绑定当前触发节点。对定时批量、按日期字段、表单数据等 e-builder 记录触发器,未显式提供链接时 CLI 自动生成 PC/移动端详情链接:`formId` 为触发表单 ID 固定值,`dataId` 为上游“数据ID”动态上下文。显式 `pcLink` / `mobileLink` 会覆盖该默认行为。
|
|
14
27
|
|
|
15
28
|
## 最小计划
|
|
16
29
|
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
分支条件和 `filterCondition` 共用 AND/OR 业务语义,但保存协议不同,不能互相复制 DTO。
|
|
26
26
|
|
|
27
|
+
- **分支位置**:`branches` 写在节点顶层或 `params.branches` 都会被受理(`component-describe Condition` 声明的就是 `params.branches`);归一化后草稿只保留顶层 `branches`。**同一节点不要两处各写一份**——读分支的实现统一走同一入口,两份写法只会让人误判哪份生效。
|
|
27
28
|
- 计划用 `condition: { relationship: "and|or", conditions: [...] }`;叶子为 `{left, operator, right}`。顶层 `relationship` 直接作为条件树根关系;编译器不会额外套同关系 AND/OR,只有条件中明确嵌套的规则组才保留子组。
|
|
28
29
|
- `left` 只能是当前上游组件的实时字段;`operator` 由字段类型限制,未知或不兼容时编译失败。
|
|
29
30
|
- `right` 只用 `fixed`、`system`、`context`,或 `formula` 完整回读对象。`context` 必须写真实 `paramKey`,由运行时生成 FormulaBean;禁止把字段名作为固定值。
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 动态赋值资源:变量与常量
|
|
2
|
+
|
|
3
|
+
动态赋值中的变量、常量不是普通文本,也不能直接把名称写进 `value`。CLI 会在生成阶段读取当前租户资源,必要时先创建资源,再把真实 ID 编译为平台 FormulaBean:变量是 `type:"7"`,常量是 `type:"5"`。
|
|
4
|
+
|
|
5
|
+
## 使用已有资源
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{"kind":"variable","id":"<当前动作流已有变量ID>","name":"批次号"}
|
|
9
|
+
{"kind":"constant","id":"<当前租户常量ID>","name":"接口地址"}
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
变量必须属于当前动作流的 `applicationId + sceneId`;常量按租户范围读取,可跨动作流使用。不能只传名称冒充 ID。生成时找不到真实资源会在保存前失败。
|
|
13
|
+
|
|
14
|
+
## 按计划新建资源
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"variables": [{"ref":"批次变量","name":"批次变量","type":"string","value":""}],
|
|
19
|
+
"constantDefinitions": [{"ref":"服务地址","name":"服务地址","groupName":"接口配置","contentType":"string","content":"https://example.test"}],
|
|
20
|
+
"actions": [{"type":"ActionEbUpdate","params":{"constants":{"<目标字段>":{"kind":"variable","name":"批次变量"}}}}]
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- `variables[]` 调用 `application/variable/addVariable`,变量绑定本次新建动作流场景;类型使用平台值 `string`、`int`、`double`、`boolean`、`date`、`time`、`datetime`。
|
|
25
|
+
- `constantDefinitions[]` 调用 `constant/save`;填写 `groupPk` 使用已有分组,填写 `groupName` 时按精确名称复用已有分组,不存在才调用 `constant/saveConstGroup` 新建分组。
|
|
26
|
+
- 新建定义用 `{kind:"variable",name:"..."}` 或 `{kind:"constant",name:"..."}` 引用;也可以直接传平台真实 `id`。
|
|
27
|
+
- `constants` 仍表示“目标字段 → 固定/动态赋值”的属性名,不与顶层 `constantDefinitions` 混用。固定值继续写 `{kind:"fixed",value:"..."}`。
|
|
28
|
+
- 同一个动作流只能用自身变量;更新已有动作流时使用当前版本的变量 ID,CLI 不会把另一个动作流的变量 ID 自动迁移。
|
|
29
|
+
|
|
30
|
+
## CLI 发现与创建
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
e10-cli actionflow variable-list '{"applicationId":"<应用ID>","sceneId":"<场景ID>"}'
|
|
34
|
+
e10-cli actionflow variable-create '{"applicationId":"<应用ID>","sceneId":"<场景ID>","name":"批次变量","type":"string","value":""}'
|
|
35
|
+
e10-cli actionflow constant-list
|
|
36
|
+
e10-cli actionflow constant-group-list
|
|
37
|
+
e10-cli actionflow constant-group-create '{"groupName":"接口配置"}'
|
|
38
|
+
e10-cli actionflow constant-create '{"groupPk":"<分组ID>","name":"服务地址","contentType":"string","content":"..."}'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
完整平台响应可用 CLI 的 `--out` 保存,终端只看摘要;不要根据截断输出判断资源是否创建成功。凭据和敏感常量值不写入 Skill、计划或 Git。
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
# 标准函数规则
|
|
2
|
-
|
|
3
|
-
`custom`(自定义 JS)和 `code`(编码函数)不支持跨环境生成。其余标准函数内置名称、类别和参数约束。
|
|
4
|
-
|
|
5
|
-
需要计算、转换或拼接时,函数树可用于组件明确支持的公式属性:e-builder 的 `formula` 字段、流程/文档的 `formula_or_reference` 字段,以及 `ApproveCreate.requestName`。写法统一为:
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{"kind":"function","name":"CONCAT","args":[{"kind":"fixed","value":"项目-"},{"kind":"context","paramKey":"<真实字段paramKey>","label":"项目名称"}]}
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
函数参数可为 `fixed`、`context`、`system_variable` 或嵌套 `function
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
# 标准函数规则
|
|
2
|
+
|
|
3
|
+
`custom`(自定义 JS)和 `code`(编码函数)不支持跨环境生成。其余标准函数内置名称、类别和参数约束。
|
|
4
|
+
|
|
5
|
+
需要计算、转换或拼接时,函数树可用于组件明确支持的公式属性:e-builder 的 `formula` 字段、流程/文档的 `formula_or_reference` 字段,以及 `ApproveCreate.requestName`。写法统一为:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{"kind":"function","name":"CONCAT","args":[{"kind":"fixed","value":"项目-"},{"kind":"context","paramKey":"<真实字段paramKey>","label":"项目名称"}]}
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
函数参数可为 `fixed`、`context`、`variable`、`constant`、`system_variable` 或嵌套 `function`。其中 `variable`/`constant` 必须先按 `references/dynamic_resources.md` 解析为当前租户的真实资源 ID;不能把名称或默认值当作引用。
|
|
12
|
+
|
|
13
|
+
生成时仅对实际使用的函数调用当前租户接口,校验可用性并获取当次函数 ID。
|
|
14
|
+
|
|
15
|
+
消息标题/内容、循环和条件各有专用 DTO;只有对应组件说明明确支持函数树时才使用,不能因为它们也显示“动态赋值”就套用通用函数结构。
|