@josephyan/qingflow-cli 1.1.3 → 1.1.5
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/README.md +7 -3
- package/docs/local-agent-install.md +57 -6
- package/entry_point.py +1 -1
- package/npm/bin/qingflow-skills.mjs +5 -0
- package/npm/bin/qingflow.mjs +1 -34
- package/npm/lib/runtime.mjs +21 -101
- package/npm/scripts/postinstall.mjs +1 -10
- package/package.json +3 -2
- package/pyproject.toml +1 -1
- package/skills/qingflow-cli/SKILL.md +58 -44
- package/skills/qingflow-cli/manifest.yaml +1 -1
- package/skills/qingflow-cli/reference/00-INDEX.md +35 -0
- package/skills/qingflow-cli/reference/builder/10-build-single-app.md +38 -0
- package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +39 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md → builder/30-schema-fields.md} +52 -10
- package/skills/qingflow-cli/reference/builder/40-layout.md +52 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_VIEWS_WORKFLOW.md → builder/50-views.md} +39 -15
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md → builder/60-charts.md} +36 -13
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md → builder/70-portal.md} +36 -13
- package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +41 -0
- package/skills/qingflow-cli/reference/builder/90-workflow.md +34 -0
- package/skills/qingflow-cli/reference/builder/99-publish-verify.md +46 -0
- package/skills/qingflow-cli/reference/builder/README.md +41 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/README.md +130 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +66 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +77 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md → builder/reference/app-delivery-sop.md} +26 -16
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/README.md +293 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-complete-system.md +809 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-single-app.md +830 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/complete-system-development-guide.md +123 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/create-app.md +182 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/environments.md +63 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/flow-actors-and-permissions.md +142 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/gotchas.md +108 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/match-rules.md +114 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/public-surface-sync.md +75 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/single-app-development-guide.md +58 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/solution-playbooks.md +52 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/tool-selection.md +107 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-flow.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-layout.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-schema.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-views.md +7 -0
- package/skills/qingflow-cli/reference/builder/workflow/01-overview.md +45 -0
- package/skills/qingflow-cli/reference/builder/workflow/02-update-mode.md +53 -0
- package/skills/qingflow-cli/reference/builder/workflow/03-flow-patterns.md +57 -0
- package/skills/qingflow-cli/reference/builder/workflow/04-stage1-business-modeling.md +131 -0
- package/skills/qingflow-cli/reference/builder/workflow/05-stage2-members-roles.md +29 -0
- package/skills/qingflow-cli/reference/builder/workflow/06-stage3-build-spec.md +165 -0
- package/skills/qingflow-cli/reference/builder/workflow/07-stage4-validate-spec.md +33 -0
- package/skills/qingflow-cli/reference/builder/workflow/08-stage5-apply-verify.md +51 -0
- package/skills/qingflow-cli/reference/builder/workflow/09-stage6-summary.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/10-node-config-reference.md +93 -0
- package/skills/qingflow-cli/reference/builder/workflow/11-troubleshooting.md +15 -0
- package/skills/qingflow-cli/reference/builder/workflow/README.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/workflow-schema.json +1754 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ADMIN_CHEATSHEET.md → core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md} +3 -3
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md → core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md} +6 -6
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_EXPLORATION_REPORT.md → core/QINGFLOW_CLI_EXPLORATION_REPORT.md} +2 -2
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_FIELD_DATA_TYPES.md → core/QINGFLOW_CLI_FIELD_DATA_TYPES.md} +11 -11
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_MEMBER_CHEATSHEET.md → core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md → core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md} +3 -3
- package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_DELETE_WORKFLOW.md +31 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md} +7 -7
- package/skills/qingflow-cli/reference/record/analysis/README.md +130 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +91 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +112 -0
- package/skills/qingflow-cli/reference/record/analysis/business-context.md +74 -0
- package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +69 -0
- package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +106 -0
- package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +172 -0
- package/skills/qingflow-cli/reference/record/analysis/report-format.md +76 -0
- package/skills/qingflow-cli/reference/record/insert/README.md +75 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md → task/QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md} +5 -5
- package/skills/qingflow-cli/reference/task/ops/README.md +131 -0
- package/skills/qingflow-cli/reference/task/ops/environments.md +43 -0
- package/skills/qingflow-cli/reference/task/ops/workflow-usage.md +26 -0
- package/skills/qingflow-cli/scripts/validate_system_build_summary.py +124 -0
- package/skills/qingflow-cli/scripts/workflow/diff_flow_spec.py +275 -0
- package/skills/qingflow-cli/scripts/workflow/validate_flow_spec.py +605 -0
- package/skills/qingflow-mcp-setup/SKILL.md +115 -0
- package/skills/qingflow-mcp-setup/agents/openai.yaml +4 -0
- package/skills/qingflow-mcp-setup/references/claude-desktop.md +34 -0
- package/skills/qingflow-mcp-setup/references/environments.md +62 -0
- package/skills/qingflow-mcp-setup/references/generic-stdio.md +32 -0
- package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +38 -0
- package/src/qingflow_mcp/__init__.py +1 -1
- package/src/qingflow_mcp/__main__.py +6 -2
- package/src/qingflow_mcp/builder_facade/models.py +287 -25
- package/src/qingflow_mcp/builder_facade/service.py +4195 -856
- package/src/qingflow_mcp/cli/commands/builder.py +316 -247
- package/src/qingflow_mcp/cli/commands/chart.py +1 -1
- package/src/qingflow_mcp/cli/commands/common.py +12 -3
- package/src/qingflow_mcp/cli/commands/exports.py +2 -2
- package/src/qingflow_mcp/cli/commands/imports.py +3 -3
- package/src/qingflow_mcp/cli/commands/portal.py +2 -2
- package/src/qingflow_mcp/cli/commands/record.py +101 -27
- package/src/qingflow_mcp/cli/commands/task.py +28 -47
- package/src/qingflow_mcp/cli/commands/view.py +1 -1
- package/src/qingflow_mcp/cli/context.py +0 -3
- package/src/qingflow_mcp/cli/formatters.py +784 -16
- package/src/qingflow_mcp/cli/main.py +117 -33
- package/src/qingflow_mcp/errors.py +43 -2
- package/src/qingflow_mcp/public_surface.py +26 -17
- package/src/qingflow_mcp/response_trim.py +81 -17
- package/src/qingflow_mcp/server.py +14 -12
- package/src/qingflow_mcp/server_app_builder.py +65 -21
- package/src/qingflow_mcp/server_app_user.py +22 -16
- package/src/qingflow_mcp/session_store.py +11 -7
- package/src/qingflow_mcp/solution/compiler/__init__.py +3 -1
- package/src/qingflow_mcp/solution/compiler/workflow_compiler.py +173 -0
- package/src/qingflow_mcp/solution/executor.py +245 -18
- package/src/qingflow_mcp/tools/ai_builder_tools.py +1782 -399
- package/src/qingflow_mcp/tools/app_tools.py +184 -43
- package/src/qingflow_mcp/tools/approval_tools.py +197 -35
- package/src/qingflow_mcp/tools/auth_tools.py +92 -16
- package/src/qingflow_mcp/tools/code_block_tools.py +298 -40
- package/src/qingflow_mcp/tools/custom_button_tools.py +64 -10
- package/src/qingflow_mcp/tools/directory_tools.py +236 -72
- package/src/qingflow_mcp/tools/export_tools.py +244 -34
- package/src/qingflow_mcp/tools/feedback_tools.py +9 -0
- package/src/qingflow_mcp/tools/file_tools.py +9 -3
- package/src/qingflow_mcp/tools/import_tools.py +336 -49
- package/src/qingflow_mcp/tools/navigation_tools.py +91 -12
- package/src/qingflow_mcp/tools/package_tools.py +118 -6
- package/src/qingflow_mcp/tools/portal_tools.py +39 -3
- package/src/qingflow_mcp/tools/qingbi_report_tools.py +116 -7
- package/src/qingflow_mcp/tools/record_tools.py +1141 -356
- package/src/qingflow_mcp/tools/resource_read_tools.py +188 -39
- package/src/qingflow_mcp/tools/role_tools.py +80 -9
- package/src/qingflow_mcp/tools/solution_tools.py +59 -45
- package/src/qingflow_mcp/tools/task_context_tools.py +662 -158
- package/src/qingflow_mcp/tools/task_tools.py +113 -29
- package/src/qingflow_mcp/tools/view_tools.py +106 -3
- package/src/qingflow_mcp/tools/workflow_tools.py +48 -4
- package/src/qingflow_mcp/tools/workspace_tools.py +71 -3
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_MATCH_RULES.md → builder/reference/match-rules.md} +0 -0
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_WORKSPACE_ICONS.md → builder/reference/workspace-icons.md} +0 -0
- /package/skills/qingflow-cli/reference/{charts_remove.example.json → examples/charts/charts_remove.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_reorder.example.json → examples/charts/charts_reorder.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_bar.example.json → examples/charts/charts_upsert_bar.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_dashboard_starter.example.json → examples/charts/charts_upsert_dashboard_starter.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_minimal.example.json → examples/charts/charts_upsert_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_all_types.example.json → examples/portal/portal_sections_all_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_five_types.example.json → examples/portal/portal_sections_five_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_standard_workbench.example.json → examples/portal/portal_sections_standard_workbench.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_complex.json → examples/schema/_batch_schema_complex.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_scalar.json → examples/schema/_batch_schema_scalar.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_add_fields_minimal.example.json → examples/schema/schema_add_fields_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_apply_add_fields_all_types.json → examples/schema/schema_apply_add_fields_all_types.json} +0 -0
- /package/skills/qingflow-cli/reference/{views_upsert_table_minimal.example.json → examples/views/views_upsert_table_minimal.example.json} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# 阶段 1:提取业务建模
|
|
2
|
+
|
|
3
|
+
从用户上下文(对话文本、上传的流程图图片、需求描述等)中提取业务建模。
|
|
4
|
+
|
|
5
|
+
## 若上下文包含流程图图片
|
|
6
|
+
|
|
7
|
+
1. 优先使用当前客户端已暴露的图片理解能力读取流程图;不要假定某个跨插件工具名一定存在
|
|
8
|
+
2. 如果当前环境没有图片理解能力,要求用户补充流程文字说明或节点/分支清单
|
|
9
|
+
3. 从图片理解结果或用户补充中提取:节点名称、节点类型、流转顺序、分支条件(字段→选项→目标)
|
|
10
|
+
|
|
11
|
+
## 建模输出格式
|
|
12
|
+
|
|
13
|
+
保存到 `tmp/业务建模_<应用名>.md`:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# 业务建模:<流程名称>
|
|
17
|
+
|
|
18
|
+
## 应用信息
|
|
19
|
+
- APP_KEY: <xxx>
|
|
20
|
+
- 应用名称: <xxx>
|
|
21
|
+
|
|
22
|
+
## 节点清单
|
|
23
|
+
| id | 名称 | 类型 | 审批人/处理人 | 说明 |
|
|
24
|
+
|----|------|------|--------------|------|
|
|
25
|
+
| n1 | 员工提交申请 | applicant | — | 工作流入门 |
|
|
26
|
+
| n2 | 部门经理审批 | approval | 部门经理 | 或签 |
|
|
27
|
+
| ... | ... | ... | ... | ... |
|
|
28
|
+
|
|
29
|
+
## 流转路径
|
|
30
|
+
n1 → n2 → [分支:字段=选项]
|
|
31
|
+
├─ 选项A → n3
|
|
32
|
+
└─ 选项B → n4
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
## 分支条件明细
|
|
36
|
+
| 分支来源 | 条件字段 | 判断符 | 选项值 | 目标节点 |
|
|
37
|
+
|----------|---------|--------|--------|----------|
|
|
38
|
+
| 服务类型 | 服务类型(单选) | equals | 客诉 | 质量部负责人接单 |
|
|
39
|
+
| ... | ... | ... | ... | ... |
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**无法提取时**:明确告知用户缺少哪些信息(节点、角色、条件等),要求补充,**禁止臆测**。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 业务完整性自检(建模完成后必须逐项确认)
|
|
47
|
+
|
|
48
|
+
> ⚠️ **用户指令优先**:如果用户给出了明确的流程设计指令,以用户指令为准,本自检仅作为补充建议。与用户指令冲突的项标记为「用户已明确」并跳过。
|
|
49
|
+
>
|
|
50
|
+
> 当用户未给出明确指令时,本自检从以下七个维度引导思考。回答「否」的项需在建模文件中说明理由。**禁止为了通过自检而添加无业务意义的节点。**
|
|
51
|
+
|
|
52
|
+
### 一、审批强度与风险匹配
|
|
53
|
+
- 审批层数是否与业务风险匹配?
|
|
54
|
+
- 低风险场景是否走了简化路径?
|
|
55
|
+
- 是否存在冗余审批节点?
|
|
56
|
+
|
|
57
|
+
### 二、角色策略与审批人指派
|
|
58
|
+
- 审批人是否基于角色而非个人?
|
|
59
|
+
- 不同审批层级是否代表不同能力或权限?
|
|
60
|
+
- 关键节点是否需要多人会签?审批人缺席时是否有替代方案?
|
|
61
|
+
|
|
62
|
+
### 三、执行顺序与效率
|
|
63
|
+
- 互不依赖的审批是否并行?
|
|
64
|
+
- 是否存在可合并的冗余环节?
|
|
65
|
+
- 串行审批链是否过长?
|
|
66
|
+
|
|
67
|
+
### 四、条件路由与分支设计
|
|
68
|
+
- 是否需要根据业务数据动态路由?
|
|
69
|
+
- 分支条件是否覆盖所有可能?是否有默认兜底?
|
|
70
|
+
|
|
71
|
+
### 五、异常处理与纠错机制
|
|
72
|
+
- 审批不通过时是否可以修正重提?
|
|
73
|
+
- 驳回后回到哪个节点?
|
|
74
|
+
- 是否考虑了审批超时?
|
|
75
|
+
- 异常升级是否有终态?
|
|
76
|
+
|
|
77
|
+
### 六、信息透明与闭环
|
|
78
|
+
- 关键决策节点完成后是否需要抄送?
|
|
79
|
+
- 流程结束后提交人是否能明确知道结果?
|
|
80
|
+
- 是否需要自动化节点更新状态字段?
|
|
81
|
+
|
|
82
|
+
### 七、流程嵌入与业务衔接
|
|
83
|
+
- 审批通过后是否有后续业务动作?
|
|
84
|
+
- 是否有前置校验需求?
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 自检结果格式
|
|
89
|
+
|
|
90
|
+
追加到建模文件末尾:
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
## 业务完整性自检
|
|
94
|
+
|
|
95
|
+
| 维度 | 检查项 | 结果 | 说明 |
|
|
96
|
+
|------|--------|:----:|------|
|
|
97
|
+
| 一、审批强度 | 审批层数是否与风险匹配? | ✅/❌ | |
|
|
98
|
+
| 一、审批强度 | 低风险是否简化路径? | ✅/❌ | |
|
|
99
|
+
| 一、审批强度 | 是否存在冗余审批节点? | ✅/❌ | |
|
|
100
|
+
| 二、角色策略 | 审批人是否基于角色? | ✅/❌ | |
|
|
101
|
+
| 二、角色策略 | 不同层级是否代表不同能力? | ✅/❌ | |
|
|
102
|
+
| 二、角色策略 | 是否考虑缺席替代方案? | ✅/❌ | |
|
|
103
|
+
| 三、执行效率 | 独立审批是否并行化? | ✅/❌ | |
|
|
104
|
+
| 三、执行效率 | 串行链是否过长? | ✅/❌ | |
|
|
105
|
+
| 三、执行效率 | 是否存在可合并环节? | ✅/❌ | |
|
|
106
|
+
| 四、条件路由 | 是否需要动态路由? | ✅/❌ | |
|
|
107
|
+
| 四、条件路由 | 分支条件是否全覆盖? | ✅/❌ | |
|
|
108
|
+
| 四、条件路由 | 是否有默认兜底? | ✅/❌ | |
|
|
109
|
+
| 五、异常处理 | 驳回后是否可修正重提? | ✅/❌ | |
|
|
110
|
+
| 五、异常处理 | 是否考虑审批超时? | ✅/❌ | |
|
|
111
|
+
| 五、异常处理 | 异常升级是否有终态? | ✅/❌ | |
|
|
112
|
+
| 六、信息透明 | 关键节点是否抄送? | ✅/❌ | |
|
|
113
|
+
| 六、信息透明 | 提交人能否明确结果? | ✅/❌ | |
|
|
114
|
+
| 六、信息透明 | 状态字段是否自动更新? | ✅/❌ | |
|
|
115
|
+
| 七、业务衔接 | 是否有前置校验? | ✅/❌ | |
|
|
116
|
+
| 七、业务衔接 | 审批后是否有后续动作? | ✅/❌ | |
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 自检不通过时的处理
|
|
120
|
+
|
|
121
|
+
- 某个维度确实需要但设计中遗漏了 → 回到建模环节补充
|
|
122
|
+
- 某个维度在业务上确实不需要 → 在「说明」列记录理由后放行
|
|
123
|
+
- 与用户明确指令冲突 → 标记「用户已明确」,以用户指令为准
|
|
124
|
+
|
|
125
|
+
**无法提取时**:明确告知用户缺少哪些信息,要求补充,**禁止臆测**。
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
← 上一步:[03-flow-patterns.md](03-flow-patterns.md)
|
|
130
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
131
|
+
→ 下一步:[05-stage2-members-roles.md](05-stage2-members-roles.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 阶段 2:获取成员/角色信息
|
|
2
|
+
|
|
3
|
+
在配置节点负责人(`responsible`)前,需要搜索可用成员与角色:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# 搜索成员
|
|
7
|
+
qingflow --json builder member search --query "<姓名/关键词>" --page-size 20
|
|
8
|
+
# 搜索角色
|
|
9
|
+
qingflow --json builder role search --keyword "<角色名>" --page-size 20
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## 注意事项
|
|
13
|
+
|
|
14
|
+
- `responsible` 是 **MemberRefDTO 数组**,不是单值对象
|
|
15
|
+
- `type` 字段可取:
|
|
16
|
+
- `user`(指定人)
|
|
17
|
+
- `role`(角色)
|
|
18
|
+
- `dept`(部门)
|
|
19
|
+
- `applicant` / `leader` / `formEmail` / `formMember` / `formDept` / `nodeLeader`
|
|
20
|
+
- 指定人时使用 `uid` 传入成员 UID(整数)
|
|
21
|
+
- 角色时使用 `roleId` 传入角色 ID(整数)
|
|
22
|
+
- 部门时使用 `deptId` 传入部门 ID(整数),可选 `havingSubDept`
|
|
23
|
+
- 避免硬编码 UID/角色 ID/部门 ID,始终从搜索结果中提取
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
← 上一步:[04-stage1-business-modeling.md](04-stage1-business-modeling.md)
|
|
28
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
29
|
+
→ 下一步:[06-stage3-build-spec.md](06-stage3-build-spec.md)
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# 阶段 3:获取 Schema + 构建 Spec
|
|
2
|
+
|
|
3
|
+
## 3.1 获取当前工作流 Schema
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
qingflow builder flow schema --json > tmp/flow_schema.json
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
> 注意:若已在阶段 1 前执行过,可复用。建议每次搭建前刷新以获取最新 schema。
|
|
10
|
+
|
|
11
|
+
## 3.2 读取现有 Flow Spec(更新模式下必须执行)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
qingflow --json builder flow get --app-key <APP_KEY> > tmp/current_flow.json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
从返回的 `spec` 中提取 `nodes` 和 `edges` 作为修改基础。
|
|
18
|
+
|
|
19
|
+
**更新模式下**:构建新 spec 后,用 diff 脚本确认变更范围是否符合预期:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python3 scripts/diff_flow_spec.py tmp/current_flow.json tmp/flow_spec.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
新建场景可跳过此步。
|
|
26
|
+
|
|
27
|
+
## 3.3 构建 WorkflowSpec
|
|
28
|
+
|
|
29
|
+
按照以下结构构建 `spec.json`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"nodes": [
|
|
34
|
+
{
|
|
35
|
+
"id": "n1",
|
|
36
|
+
"type": "applicant",
|
|
37
|
+
"name": "员工提交申请",
|
|
38
|
+
"attrs": {}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "n2",
|
|
42
|
+
"type": "approval",
|
|
43
|
+
"name": "部门经理审批",
|
|
44
|
+
"attrs": {
|
|
45
|
+
"responsible": [
|
|
46
|
+
{"type": "role", "roleId": 123}
|
|
47
|
+
],
|
|
48
|
+
"approveType": "or_signed",
|
|
49
|
+
"auditUserType": "role",
|
|
50
|
+
"revert": true,
|
|
51
|
+
"revertScope": "all",
|
|
52
|
+
"transferScope": "all"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "g1",
|
|
57
|
+
"type": "gateway",
|
|
58
|
+
"name": "服务类型判断",
|
|
59
|
+
"attrs": {"mode": "parallel"}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "n3",
|
|
63
|
+
"type": "filling",
|
|
64
|
+
"name": "补充信息",
|
|
65
|
+
"attrs": {
|
|
66
|
+
"responsible": [
|
|
67
|
+
{"type": "user", "uid": 456}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"edges": {
|
|
73
|
+
"edges": [
|
|
74
|
+
{"from": "n1", "to": "n2"},
|
|
75
|
+
{"from": "n2", "to": "g1"},
|
|
76
|
+
{
|
|
77
|
+
"from": "g1",
|
|
78
|
+
"to": "n3",
|
|
79
|
+
"label": "客诉",
|
|
80
|
+
"condition": {
|
|
81
|
+
"kind": "rules",
|
|
82
|
+
"autoJudges": [
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"fieldId": 343290994,
|
|
86
|
+
"fieldType": "single_select",
|
|
87
|
+
"matchType": "literal",
|
|
88
|
+
"judgeType": "equals",
|
|
89
|
+
"values": ["客诉"]
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"from": "g1",
|
|
97
|
+
"to": "n4",
|
|
98
|
+
"label": "技术服务",
|
|
99
|
+
"condition": {
|
|
100
|
+
"kind": "rules",
|
|
101
|
+
"autoJudges": [
|
|
102
|
+
[
|
|
103
|
+
{
|
|
104
|
+
"fieldId": 343290994,
|
|
105
|
+
"fieldType": "single_select",
|
|
106
|
+
"matchType": "literal",
|
|
107
|
+
"judgeType": "equals",
|
|
108
|
+
"values": ["技术服务"]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 节点类型速查
|
|
120
|
+
|
|
121
|
+
| type | 说明 | 必要 attrs |
|
|
122
|
+
|------|------|-----------|
|
|
123
|
+
| `applicant` | 工作流入口(仅1个) | 可选: `commentStatus`, `submitText`, `fieldPermissions` |
|
|
124
|
+
| `approval` | 审批节点 | `responsible`, `approveType`, `auditUserType` |
|
|
125
|
+
| `filling` | 填写节点 | `responsible` |
|
|
126
|
+
| `gateway` | 分支/汇合 | `mode`: `parallel`(分支)或 `join`(汇合) |
|
|
127
|
+
| `cc` | 抄送节点 | `receivers` |
|
|
128
|
+
| `automation` | 自动化/Q-Robot | `subType` + 对应配置 |
|
|
129
|
+
|
|
130
|
+
## 边条件体系
|
|
131
|
+
|
|
132
|
+
| condition.kind | 含义 | 要求 |
|
|
133
|
+
|---------------|------|------|
|
|
134
|
+
| `rules` | 条件选路 | 必须含 `autoJudges`(OR-of-AND 二维数组) |
|
|
135
|
+
| `default` | 兜底边 | 无 `autoJudges` |
|
|
136
|
+
| 省略 | 无条件线性边 | — |
|
|
137
|
+
|
|
138
|
+
## autoJudges 结构
|
|
139
|
+
|
|
140
|
+
OR-of-AND 二维数组:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
"autoJudges": [
|
|
144
|
+
[ // OR 组 1
|
|
145
|
+
{"fieldId": N, "fieldType": "single_select", "matchType": "literal", "judgeType": "equals", "values": ["选项"]}
|
|
146
|
+
],
|
|
147
|
+
[ // OR 组 2
|
|
148
|
+
{"fieldId": M, "fieldType": "single_select", "matchType": "literal", "judgeType": "equals", "values": ["另一个选项"]}
|
|
149
|
+
]
|
|
150
|
+
]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**关键约束:`autoJudges` 必须是 `[[{...}]]` 二维数组!一维数组 `[{...}]` 格式会被后端静默吞掉。**
|
|
154
|
+
|
|
155
|
+
**judgeType 常用值**:`equals`, `not_equals`, `equals_any`, `includes`, `greater_than` 等(共21种,详见 schema)。
|
|
156
|
+
|
|
157
|
+
## 3.4 保存 Spec 到文件
|
|
158
|
+
|
|
159
|
+
将构建好的完整 Spec 以 JSON 格式保存到文件 `tmp/flow_spec.json`,确保使用 UTF-8 编码、缩进格式化,以便后续验证和 apply 使用。
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
← 上一步:[05-stage2-members-roles.md](05-stage2-members-roles.md)
|
|
164
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
165
|
+
→ 下一步:[07-stage4-validate-spec.md](07-stage4-validate-spec.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 阶段 4:验证 Spec
|
|
2
|
+
|
|
3
|
+
使用本 Skill 自带的验证脚本:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# 新建模式
|
|
7
|
+
python3 scripts/validate_flow_spec.py \
|
|
8
|
+
tmp/flow_spec.json --schema tmp/flow_schema.json
|
|
9
|
+
|
|
10
|
+
# 更新模式(同时校验最小修改原则)
|
|
11
|
+
python3 scripts/validate_flow_spec.py \
|
|
12
|
+
tmp/flow_spec.json --schema tmp/flow_schema.json --previous tmp/current_flow.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 验证内容
|
|
16
|
+
|
|
17
|
+
1. JSON Schema 结构校验(基于 `qingflow builder flow schema` 的官方 schema)
|
|
18
|
+
2. DAG 无环检查
|
|
19
|
+
3. 单 applicant 节点检查
|
|
20
|
+
4. Gateway 出边条件完整性检查(rules 边必须有 autoJudges)
|
|
21
|
+
5. 审批/填写/抄送节点必要字段检查
|
|
22
|
+
6. 自动化节点配置检查
|
|
23
|
+
7. 孤立节点检查
|
|
24
|
+
|
|
25
|
+
## 验证不通过时的处理
|
|
26
|
+
|
|
27
|
+
根据错误信息修正 spec,重新验证,直到全部通过再进入 apply。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
← 上一步:[06-stage3-build-spec.md](06-stage3-build-spec.md)
|
|
32
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
33
|
+
→ 下一步:[08-stage5-apply-verify.md](08-stage5-apply-verify.md)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 阶段 5:Apply + 验证循环
|
|
2
|
+
|
|
3
|
+
## 5.1 部署工作流
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
qingflow builder flow apply \
|
|
7
|
+
--app-key <APP_KEY> \
|
|
8
|
+
--spec-file tmp/flow_spec.json \
|
|
9
|
+
--publish
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### 解读响应
|
|
13
|
+
|
|
14
|
+
- `status: success` → 进入验证
|
|
15
|
+
- `status: failed` → 查看 `error_code` / `message` / `blocking_issues`,修正后重试
|
|
16
|
+
- `missing_input_node_ids` 警告(新建时常见)→ 可忽略,是正常现象
|
|
17
|
+
|
|
18
|
+
## 5.2 验证部署结果
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
qingflow --json builder flow get --app-key <APP_KEY> > tmp/deployed_flow.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 逐项对比
|
|
25
|
+
|
|
26
|
+
1. **节点数量与类型**:`nodes` 数量是否一致,每个节点的 `type` 和 `name` 是否正确
|
|
27
|
+
2. **边连通性**:`edges` 数量是否一致,`from`/`to` 关系是否正确
|
|
28
|
+
3. **分支条件**(核心关注点):每个 gateway 出边是否有正确的 `autoJudges`
|
|
29
|
+
- 检查 `condition.kind` 是否为 `rules`
|
|
30
|
+
- 检查 `autoJudges` 中的 `fieldId`、`judgeType`、`values` 是否正确
|
|
31
|
+
- **`autoJudges` 必须是非空二维数组 `[[{...}]]`,空数组或一维数组说明条件未生效**
|
|
32
|
+
4. **自动化节点**:`automation` 节点的 `subType`、`appKey`、`fieldMappings` 等是否正确
|
|
33
|
+
- 必要时拉取其他应用数据验证:`qingflow --json builder app get --app-key <目标APP_KEY> fields`
|
|
34
|
+
5. **审批节点**:`responsible`、`approveType`、`revert` 等是否与建模一致
|
|
35
|
+
|
|
36
|
+
## 5.3 不一致时的循环
|
|
37
|
+
|
|
38
|
+
若验证发现不一致:
|
|
39
|
+
1. 分析差异原因(条件格式错误、节点缺失、边遗漏等)
|
|
40
|
+
2. 修正 `tmp/flow_spec.json`
|
|
41
|
+
3. 重新验证 → apply → 对比
|
|
42
|
+
4. **最多循环 3 次**;若 3 次后仍有不可修复的差异,告知用户并列出:
|
|
43
|
+
- 已成功配置的部分
|
|
44
|
+
- 仍存在差异的部分及可能原因
|
|
45
|
+
- 建议用户在 Web 端手动调整的部分
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
← 上一步:[07-stage4-validate-spec.md](07-stage4-validate-spec.md)
|
|
50
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
51
|
+
→ 下一步:[09-stage6-summary.md](09-stage6-summary.md)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# 阶段 6:总结搭建结果
|
|
2
|
+
|
|
3
|
+
搭建完成后,输出结构化的总结报告到文件 `tmp/工作流搭建报告_<应用名>.md`:
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# 工作流搭建报告
|
|
7
|
+
|
|
8
|
+
## 业务描述
|
|
9
|
+
<一段话概括流程业务场景,如"工单从员工提交开始,经部门领导审批,根据服务类型分流至不同处理部门...">
|
|
10
|
+
|
|
11
|
+
## 应用信息
|
|
12
|
+
- 应用名称: <xxx>
|
|
13
|
+
- APP_KEY: <xxx>
|
|
14
|
+
|
|
15
|
+
## Mermaid 流程图
|
|
16
|
+
|
|
17
|
+
\`\`\`mermaid
|
|
18
|
+
graph TD
|
|
19
|
+
n1[员工提交工单申请] --> n2[申请部门领导逐级审批]
|
|
20
|
+
n2 --> g1{服务类型}
|
|
21
|
+
g1 -->|客诉| n3[质量部负责人接单]
|
|
22
|
+
g1 -->|技术服务| n4[技术服务部负责人接单]
|
|
23
|
+
...
|
|
24
|
+
\`\`\`
|
|
25
|
+
|
|
26
|
+
## 节点统计
|
|
27
|
+
- 总节点数: N
|
|
28
|
+
- applicant: 1
|
|
29
|
+
- approval: X
|
|
30
|
+
- filling: Y
|
|
31
|
+
- gateway: Z
|
|
32
|
+
- cc: W
|
|
33
|
+
|
|
34
|
+
## 分支条件配置
|
|
35
|
+
| Gateway | 分支 | 字段 | 条件 | 目标 |
|
|
36
|
+
|---------|------|------|------|------|
|
|
37
|
+
| ... | ... | ... | ... | ... |
|
|
38
|
+
|
|
39
|
+
## 业务完整性回顾
|
|
40
|
+
|
|
41
|
+
> 对照阶段 1 的七维度自检清单,逐项回顾部署结果。如有不一致,说明原因(如后端不支持、用户要求修改等)。
|
|
42
|
+
|
|
43
|
+
| 维度 | 检查项 | 建模时 | 部署后 | 一致 |
|
|
44
|
+
|------|--------|:------:|:------:|:----:|
|
|
45
|
+
| 一、审批强度 | 审批层数是否与风险匹配? | ✅/❌ | ✅/❌ | ✅ |
|
|
46
|
+
| 一、审批强度 | 低风险是否简化路径? | ✅/❌ | ✅/❌ | ✅ |
|
|
47
|
+
| 一、审批强度 | 是否存在冗余审批节点? | ✅/❌ | ✅/❌ | ✅ |
|
|
48
|
+
| 二、角色策略 | 审批人是否基于角色? | ✅/❌ | ✅/❌ | ✅ |
|
|
49
|
+
| 二、角色策略 | 不同层级是否代表不同能力? | ✅/❌ | ✅/❌ | ✅ |
|
|
50
|
+
| 二、角色策略 | 是否考虑缺席替代方案? | ✅/❌ | ✅/❌ | ✅ |
|
|
51
|
+
| 三、执行效率 | 独立审批是否并行化? | ✅/❌ | ✅/❌ | ✅ |
|
|
52
|
+
| 三、执行效率 | 串行链是否过长? | ✅/❌ | ✅/❌ | ✅ |
|
|
53
|
+
| 三、执行效率 | 是否存在可合并环节? | ✅/❌ | ✅/❌ | ✅ |
|
|
54
|
+
| 四、条件路由 | 是否需要动态路由? | ✅/❌ | ✅/❌ | ✅ |
|
|
55
|
+
| 四、条件路由 | 分支条件是否全覆盖? | ✅/❌ | ✅/❌ | ✅ |
|
|
56
|
+
| 四、条件路由 | 是否有默认兜底? | ✅/❌ | ✅/❌ | ✅ |
|
|
57
|
+
| 五、异常处理 | 驳回后是否可修正重提? | ✅/❌ | ✅/❌ | ✅ |
|
|
58
|
+
| 五、异常处理 | 是否考虑审批超时? | ✅/❌ | ✅/❌ | ✅ |
|
|
59
|
+
| 五、异常处理 | 异常升级是否有终态? | ✅/❌ | ✅/❌ | ✅ |
|
|
60
|
+
| 六、信息透明 | 关键节点是否抄送? | ✅/❌ | ✅/❌ | ✅ |
|
|
61
|
+
| 六、信息透明 | 提交人能否明确结果? | ✅/❌ | ✅/❌ | ✅ |
|
|
62
|
+
| 六、信息透明 | 状态字段是否自动更新? | ✅/❌ | ✅/❌ | ✅ |
|
|
63
|
+
| 七、业务衔接 | 是否有前置校验? | ✅/❌ | ✅/❌ | ✅ |
|
|
64
|
+
| 七、业务衔接 | 审批后是否有后续动作? | ✅/❌ | ✅/❌ | ✅ |
|
|
65
|
+
| 七、业务衔接 | 是否涉及上下游系统? | ✅/❌ | ✅/❌ | ✅ |
|
|
66
|
+
|
|
67
|
+
## 部署状态
|
|
68
|
+
- ✅ 部署成功 / ⚠️ 部分差异 / ❌ 失败
|
|
69
|
+
- <详情>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 搭建失败时的回退策略
|
|
73
|
+
|
|
74
|
+
| 失败类型 | 处理 |
|
|
75
|
+
|----------|------|
|
|
76
|
+
| 应用不存在 | 先完成应用搭建和字段配置,再继续工作流搭建 |
|
|
77
|
+
| 字段缺失 | 查阅 qingflow CLI 相关 Skill 先补充缺失字段 |
|
|
78
|
+
| 条件多次无法生效(autoJudges 被吞) | 告知用户这是已知限制,需在 Web 端手动补条件 |
|
|
79
|
+
| 验证脚本持续性报错 | 检查 schema 是否需要刷新(`builder flow schema --json`) |
|
|
80
|
+
| apply 返回 blocking_issues | 逐一排查并修复 |
|
|
81
|
+
|
|
82
|
+
**回退原则**:不删除用户应用、不修改已有字段,仅告知差异和推荐操作。
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
← 上一步:[08-stage5-apply-verify.md](08-stage5-apply-verify.md)
|
|
87
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
88
|
+
→ 扩展参考:[10-node-config-reference.md](10-node-config-reference.md)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# 节点配置参考
|
|
2
|
+
|
|
3
|
+
## `responsible` 数组结构
|
|
4
|
+
|
|
5
|
+
审批、填写节点的 `responsible` 必须是 **MemberRefDTO 数组**(`minItems: 1`),而不是单值对象。
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
"responsible": [
|
|
9
|
+
{"type": "role", "roleId": 123},
|
|
10
|
+
{"type": "user", "uid": 456},
|
|
11
|
+
{"type": "dept", "deptId": 789, "havingSubDept": true}
|
|
12
|
+
]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### MemberRefDTO 字段
|
|
16
|
+
|
|
17
|
+
| 字段 | 类型 | 必填场景 | 说明 |
|
|
18
|
+
|------|------|----------|------|
|
|
19
|
+
| `type` | string | always | `user` / `dept` / `role` / `applicant` / `leader` / `formEmail` / `formMember` / `formDept` / `nodeLeader` |
|
|
20
|
+
| `uid` | integer | `type="user"` | 成员 ID |
|
|
21
|
+
| `deptId` | integer | `type="dept"` | 部门 ID |
|
|
22
|
+
| `roleId` | integer | `type="role"` | 角色 ID |
|
|
23
|
+
| `queId` | integer | `leader` / `formEmail` / `formMember` / `formDept` | 字段/队列 ID |
|
|
24
|
+
| `havingSubDept` | boolean | `type="dept"` | 是否包含子部门 |
|
|
25
|
+
|
|
26
|
+
> ⚠️ **关键区别**:
|
|
27
|
+
> - 成员类型 `type` 必须是 `"user"`,不是 `"member"`
|
|
28
|
+
> - 用户 ID 字段是 `"uid"`(整数),不是 `"uids"`(字符串数组)
|
|
29
|
+
> - 角色 ID 字段是 `"roleId"`(整数),不是 `"roleIds"`(字符串数组)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 审批节点(approval)完整 attrs
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"responsible": [
|
|
38
|
+
{"type": "role", "roleId": 123}
|
|
39
|
+
],
|
|
40
|
+
"approveType": "or_signed",
|
|
41
|
+
"auditUserType": "role",
|
|
42
|
+
"revert": true,
|
|
43
|
+
"revertScope": "all",
|
|
44
|
+
"transferScope": "all",
|
|
45
|
+
"auditFeedback": false,
|
|
46
|
+
"commentStatus": "not_required",
|
|
47
|
+
"timeoutConfig": {"duration": {"value": 24, "unit": "hour"}, "autoExecute": "approved"}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
| 字段 | 说明 | 可选值 |
|
|
52
|
+
|------|------|--------|
|
|
53
|
+
| `responsible` | 审批人(MemberRefDTO 数组) | 见上方 MemberRefDTO |
|
|
54
|
+
| `approveType` | 审批模式 | `or_signed`(或签) / `countersigned`(会签) |
|
|
55
|
+
| `auditUserType` | 审批人来源 | `role` / `user` / `dept` |
|
|
56
|
+
| `revert` | 允许驳回 | `true` / `false` |
|
|
57
|
+
| `revertScope` | 驳回范围 | `all`(可回退到任意节点) |
|
|
58
|
+
| `transferScope` | 转交范围 | `all` |
|
|
59
|
+
|
|
60
|
+
## 填写节点(filling)完整 attrs
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"responsible": [
|
|
65
|
+
{"type": "user", "uid": 456}
|
|
66
|
+
],
|
|
67
|
+
"auditFeedback": false,
|
|
68
|
+
"timeoutConfig": null,
|
|
69
|
+
"fieldPermissions": [
|
|
70
|
+
{"fieldId": 343290996, "permission": "editable"}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Gateway 节点
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"id": "g1",
|
|
80
|
+
"type": "gateway",
|
|
81
|
+
"name": "分支名称",
|
|
82
|
+
"attrs": {"mode": "parallel"}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`mode` 取值:
|
|
87
|
+
- `parallel`:并行分支(出边 ≥ 2,每条边可选择 `rules` 或 `default`)
|
|
88
|
+
- `join`:汇合节点(多入边、单出边)
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|
|
93
|
+
→ 排障参考:[11-troubleshooting.md](11-troubleshooting.md)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 常见问题与排障
|
|
2
|
+
|
|
3
|
+
| 问题 | 原因 | 解决 |
|
|
4
|
+
|------|------|------|
|
|
5
|
+
| `autoJudges` apply 后为空 | 使用了一维数组 `[{...}]` 格式 | 改为二维 `[[{...}]]` |
|
|
6
|
+
| 条件分支不生效 | `autoJudges` 中的 `values` 与表单选项 label 不一致 | 核对字段选项文本,确保完全一致 |
|
|
7
|
+
| apply 返回 `missing_input_node_ids` | 新建 flow 首次 apply 的正常提示 | 可忽略,再次 get 验证即可 |
|
|
8
|
+
| 回退边(gateway → 前序节点)不生效 | 引擎不支持通过 gateway 实现回退 | 改用审批节点 `revert: true` |
|
|
9
|
+
| 审批节点无审批人 | `responsible` 中的 UID/角色 ID 无效或缺失 | 使用 `builder member search` / `role search` 确认 |
|
|
10
|
+
| `fieldType` 不匹配 | 单选用了 `text` 而非 `single_select` | 确认字段实际类型后更正 |
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
← 上一步:[10-node-config-reference.md](10-node-config-reference.md)
|
|
15
|
+
← 返回主流程:[../SKILL.md](../../../SKILL.md)
|