@stalfh233/omc-cli 0.6.53 → 0.6.54
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/coverage/m1-coverage-manifest-v1.json +34 -0
- package/dist/capability-overview.js +1 -1
- package/dist/endpoints.js +9 -0
- package/dist/lanes/datarule.js +1 -1
- package/dist/lanes/dictionary.js +2 -2
- package/dist/lanes/field.js +2 -2
- package/dist/lanes/form.js +1 -1
- package/dist/lanes/list-view.js +1 -1
- package/dist/lanes/model.js +1 -1
- package/dist/lanes/report.js +2 -2
- package/dist/lanes/runtime-data.js +3 -3
- package/dist/lanes/workflow-contract.js +17 -0
- package/dist/lanes/workflow-coverage.js +16 -0
- package/dist/lanes/workflow.js +203 -2
- package/dist/tool-search.js +7 -4
- package/package.json +3 -3
- package/skills/omc-capabilities.md +2 -2
|
@@ -1508,6 +1508,40 @@
|
|
|
1508
1508
|
"scopes": [
|
|
1509
1509
|
"rule execution log search (trigger-time desc, row match client-side)"
|
|
1510
1510
|
]
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"capability": "r64 runtime workflow admin operations (transfer/activate/finish)",
|
|
1514
|
+
"status": "executable",
|
|
1515
|
+
"scope": "Admin workflow-ops trio for test acceleration: ADJUST_PARTICIPANT (reassign current approver), ACTIVATE_ACTIVITY (jump to a chosen node), finish_instance_by_post (manual finish; end-handler rules still fire). Live-proven r64 2026-11-14 (sandbox r64ops_wfo).",
|
|
1516
|
+
"excluded_or_unsupported_reason": "Live-proven 2026-09-11: startWorkflow -> workitem.list discovered workItemId 970fe802baba463d97c1d97f3695bb3a + bizObjectId c607b77af4ab4293a1f6ce314ec9327c -> approval submit -> list count 0 and record COMPLETED. Evidence in .scratch/omc-app-management/issues/06-workitem-list-capability.md. r4-training 2026-10-20: a stalled instance (data.submit -> PROCESSING, no next todo) exposed nothing; list_workflow_instance_activity (WorkflowMaintenanceAssembler.listActivateActivity) now backs workflow.instanceActivity with per-activity status/participants so \"where did it stop\" is a read, not a MySQL+container-log dig.",
|
|
1517
|
+
"version_family": "8.6",
|
|
1518
|
+
"anchor_version": "8.6.26",
|
|
1519
|
+
"evidence": [
|
|
1520
|
+
{
|
|
1521
|
+
"path": "packages/omc-cli/src/lanes/workflow.ts",
|
|
1522
|
+
"anchor": "workitem.list"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"path": ".scratch/omc-app-management/issues/06-workitem-list-capability.md",
|
|
1526
|
+
"anchor": "静态取证"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"path": "packages/omc-cli/src/workflow-support.ts",
|
|
1530
|
+
"anchor": "listInstanceActivities"
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
"lane": "W7-S29-greenfield",
|
|
1534
|
+
"tools": [
|
|
1535
|
+
"workflow.transfer",
|
|
1536
|
+
"workflow.activate",
|
|
1537
|
+
"workflow.finish"
|
|
1538
|
+
],
|
|
1539
|
+
"scopes": [
|
|
1540
|
+
"runtime workflow admin adjust participant",
|
|
1541
|
+
"runtime workflow admin activate activity",
|
|
1542
|
+
"runtime workflow admin finish instance"
|
|
1543
|
+
],
|
|
1544
|
+
"revision_note": "r64(2026-11-14)新增:用户需求的流程运维三件套,真机全链实证(workflow_operation approval 对象形状 / adjust_workItem=加签面 / finish=正常完结语义)。定位=测试提速:运维过的实例不能用于真实流程/权限验证。"
|
|
1511
1545
|
}
|
|
1512
1546
|
]
|
|
1513
1547
|
}
|
|
@@ -142,7 +142,7 @@ const SURFACES = [
|
|
|
142
142
|
operations: ["create", "update", "publish", "bindRule", "delete"],
|
|
143
143
|
requires: ["model"],
|
|
144
144
|
intent: { level: "partial", note: "声明式支持 workflow.create/update/publish 与 bindRules(事件处理器规则绑定,merge/ensure-present);runtime workitem(提交/审批)仍走 escape hatch。" },
|
|
145
|
-
notes: "greenfield 首版;publish/bindRule 不得在 ValidateMessage[] 拒绝时报告成功。组织读写(org.*)挂在本能力下,别名 org/organization/organisation。",
|
|
145
|
+
notes: "greenfield 首版;publish/bindRule 不得在 ValidateMessage[] 拒绝时报告成功。组织读写(org.*)挂在本能力下,别名 org/organization/organisation。r64 起含**流程运维三件套**(workflow.transfer 换审批人 / workflow.activate 跳转节点 / workflow.finish 手动结束·end 规则照常触发)——测试提速定位:运维过的实例权限语义已变,不能用于真实流程/权限验证。",
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
id: "onlinejs",
|
package/dist/endpoints.js
CHANGED
|
@@ -221,6 +221,15 @@ export const ENDPOINTS = {
|
|
|
221
221
|
workflowDeleteInstance: "/api/api/runtime/workflow/delete_instance",
|
|
222
222
|
workflowGetBizObjectByWfInstanceId: "/api/api/runtime/workflow/getBizObjectByWfInstanceId",
|
|
223
223
|
workflowListInstanceActivity: "/api/api/runtime/workflow/list_workflow_instance_activity",
|
|
224
|
+
// r64(流程运维三件套,真机实证):管理面统一操作端点是 workflow_operation
|
|
225
|
+
// (operationType:ADJUST_PARTICIPANT 换审批人 / ACTIVATE_ACTIVITY 运维跳转节点
|
|
226
|
+
// / MODIFY_OWNER / PAUSE_INSTANCE / RESUME_INSTANCE;approval 是对象
|
|
227
|
+
// {activityCode,commonSet,deleted,resources,content},传字符串 10009)。
|
|
228
|
+
// 注意 adjust_workItem_participators 是**加签**面(402512「不允许加签给自己」),
|
|
229
|
+
// 不是换人。finish_instance_by_post 是发起人「手动结束」(正常完结语义,
|
|
230
|
+
// end 规则照常触发);abort_instance 才是终止(规则不一定跑)。
|
|
231
|
+
workflowOperation: "/api/api/runtime/workflow/workflow_operation",
|
|
232
|
+
workflowFinishInstance: "/api/api/runtime/workflow/finish_instance_by_post",
|
|
224
233
|
workflowListFinishedWorkItems: "/api/api/runtime/workflow/list_finished_workitems",
|
|
225
234
|
workflowGetInstanceBaseInfo: "/api/api/runtime/workflow/get_instance_baseinfo",
|
|
226
235
|
organizationRoleList: "/api/api/organization/role/list",
|
package/dist/lanes/datarule.js
CHANGED
|
@@ -874,7 +874,7 @@ export function registerDataRuleLane(tools) {
|
|
|
874
874
|
writeTool({
|
|
875
875
|
tools,
|
|
876
876
|
name: "datarule.create",
|
|
877
|
-
search: { intents: ["字段级校验", "给字段加校验", "给金额字段加校验", "校验规则", "提交校验", "字段校验", "金额校验", "必填才能提交", "必须填", "不填不让提交"] },
|
|
877
|
+
search: { intents: ["字段级校验", "给字段加校验", "给金额字段加校验", "校验规则", "提交校验", "字段校验", "金额校验", "必填才能提交", "必须填", "不填不让提交", "必须附件", "不然就提交不了"] },
|
|
878
878
|
lane: DATARULE_LANE,
|
|
879
879
|
scope: DATARULE_TOOLS["datarule.create"].scope,
|
|
880
880
|
description: DATARULE_TOOLS["datarule.create"].description,
|
package/dist/lanes/dictionary.js
CHANGED
|
@@ -309,7 +309,7 @@ export function registerDictionaryLane(tools) {
|
|
|
309
309
|
writeTool({
|
|
310
310
|
tools,
|
|
311
311
|
name: "dictionary.save",
|
|
312
|
-
search: { intents: ["建数据字典", "新建字典", "保存字典"] },
|
|
312
|
+
search: { intents: ["建数据字典", "新建字典", "保存字典", "说法统一", "统一叫法", "统一一下"] },
|
|
313
313
|
lane: LANE,
|
|
314
314
|
scope: TOOLS["dictionary.save"].scope,
|
|
315
315
|
description: TOOLS["dictionary.save"].description,
|
|
@@ -370,7 +370,7 @@ export function registerDictionaryLane(tools) {
|
|
|
370
370
|
writeTool({
|
|
371
371
|
tools,
|
|
372
372
|
name: "dictionary.status",
|
|
373
|
-
search: { intents: ["停用字典记录", "启用字典记录", "字典记录停用", "停用字典", "启用字典"] },
|
|
373
|
+
search: { intents: ["停用字典记录", "启用字典记录", "字典记录停用", "停用字典", "启用字典", "选错", "老选错", "撤掉的部门"] },
|
|
374
374
|
lane: LANE,
|
|
375
375
|
scope: TOOLS["dictionary.status"].scope,
|
|
376
376
|
description: TOOLS["dictionary.status"].description,
|
package/dist/lanes/field.js
CHANGED
|
@@ -324,7 +324,7 @@ async function assertNoChildSchemaAggregation(session, schemaCode, propertyType,
|
|
|
324
324
|
export function registerFieldLane(tools) {
|
|
325
325
|
tools.push(defineTool({
|
|
326
326
|
name: "field.list",
|
|
327
|
-
search: { intents: ["看字段", "查字段", "字段清单", "模型有哪些字段", "字段列表"] },
|
|
327
|
+
search: { intents: ["看字段", "查字段", "字段清单", "模型有哪些字段", "字段列表", "跳号"] },
|
|
328
328
|
layer: "low",
|
|
329
329
|
kind: "read",
|
|
330
330
|
lane: FIELD_LANE,
|
|
@@ -639,7 +639,7 @@ export function registerFieldLane(tools) {
|
|
|
639
639
|
writeTool({
|
|
640
640
|
tools,
|
|
641
641
|
name: "field.update",
|
|
642
|
-
search: { intents: ["改字段", "改字段配置", "字段改名", "字段设只读", "字段设必填", "字段改精度"] },
|
|
642
|
+
search: { intents: ["改字段", "改字段配置", "字段改名", "字段设只读", "字段设必填", "字段改精度", "小数位", "小数点", "小数点太多", "自动带出", "带出", "手动填"] },
|
|
643
643
|
lane: FIELD_LANE,
|
|
644
644
|
scope: FIELD_TOOLS["field.update"].scope,
|
|
645
645
|
description: FIELD_TOOLS["field.update"].description,
|
package/dist/lanes/form.js
CHANGED
|
@@ -80,7 +80,7 @@ function smallLayoutSummary(draftCodes, publishedCodes, sheet) {
|
|
|
80
80
|
export function registerFormLane(tools) {
|
|
81
81
|
tools.push(defineTool({
|
|
82
82
|
name: "form.get",
|
|
83
|
-
search: { intents: ["看表单", "查表单", "表单有哪些控件", "表单发布状态", "读表单"] },
|
|
83
|
+
search: { intents: ["看表单", "查表单", "表单有哪些控件", "表单发布状态", "读表单", "打开是空", "打开空白", "打印", "是空的"] },
|
|
84
84
|
layer: "low",
|
|
85
85
|
kind: "read",
|
|
86
86
|
lane: FORM_LANE,
|
package/dist/lanes/list-view.js
CHANGED
|
@@ -570,7 +570,7 @@ export function registerListViewLane(tools) {
|
|
|
570
570
|
writeTool({
|
|
571
571
|
tools,
|
|
572
572
|
name: "listview.configure",
|
|
573
|
-
search: { intents: ["配置列表列", "配列表", "列表列", "只显示", "不显示哪些列"] },
|
|
573
|
+
search: { intents: ["配置列表列", "配列表", "列表列", "只显示", "不显示哪些列", "合计数", "列合计", "底部合计", "排个序", "排序", "放前面", "就留"] },
|
|
574
574
|
lane: LIST_VIEW_LANE,
|
|
575
575
|
scope: LIST_VIEW_TOOLS["listview.configure"].scope,
|
|
576
576
|
description: LIST_VIEW_TOOLS["listview.configure"].description,
|
package/dist/lanes/model.js
CHANGED
|
@@ -530,7 +530,7 @@ export function registerModelLane(tools) {
|
|
|
530
530
|
writeTool({
|
|
531
531
|
tools,
|
|
532
532
|
name: "model.create",
|
|
533
|
-
search: { intents: ["新建模型", "建模型", "创建模型", "建模"] },
|
|
533
|
+
search: { intents: ["新建模型", "建模型", "创建模型", "建模", "做个新表", "做个表", "建个表"] },
|
|
534
534
|
lane: MODEL_LANE,
|
|
535
535
|
scope: MODEL_TOOLS["model.create"].scope,
|
|
536
536
|
description: MODEL_TOOLS["model.create"].description,
|
package/dist/lanes/report.js
CHANGED
|
@@ -415,7 +415,7 @@ export function registerReportLane(tools) {
|
|
|
415
415
|
}));
|
|
416
416
|
tools.push(defineTool({
|
|
417
417
|
name: "report.chartdata",
|
|
418
|
-
search: { intents: ["查报表数据", "报表数据", "图表数据"] },
|
|
418
|
+
search: { intents: ["查报表数据", "报表数据", "图表数据", "趋势图"] },
|
|
419
419
|
layer: "low",
|
|
420
420
|
kind: "read",
|
|
421
421
|
lane: LANE,
|
|
@@ -538,7 +538,7 @@ export function registerReportLane(tools) {
|
|
|
538
538
|
writeTool({
|
|
539
539
|
tools,
|
|
540
540
|
name: "report.create",
|
|
541
|
-
search: { intents: ["建报表", "新建报表", "创建报表", "建图表"] },
|
|
541
|
+
search: { intents: ["建报表", "新建报表", "创建报表", "建图表", "一份报表"] },
|
|
542
542
|
lane: LANE,
|
|
543
543
|
scope: TOOLS["report.create"].scope,
|
|
544
544
|
description: TOOLS["report.create"].description,
|
|
@@ -1065,7 +1065,7 @@ async function diagnoseDbException(session, schemaCode, error) {
|
|
|
1065
1065
|
export function registerRuntimeDataLane(tools) {
|
|
1066
1066
|
tools.push(defineTool({
|
|
1067
1067
|
name: "data.list",
|
|
1068
|
-
search: { intents: ["查业务数据", "查询数据", "查数据", "查记录", "查单据", "统计数据", "汇总数据", "分组统计", "数条数", "总条数", "导出数据", "多少条", "有几条", "统计", "导出", "查合同列表", "查单据列表"] },
|
|
1068
|
+
search: { intents: ["查业务数据", "查询数据", "查数据", "查记录", "查单据", "统计数据", "汇总数据", "分组统计", "数条数", "总条数", "导出数据", "多少条", "有几条", "统计", "导出", "查合同列表", "查单据列表", "名单", "拉个名单"] },
|
|
1069
1069
|
layer: "low",
|
|
1070
1070
|
kind: "read",
|
|
1071
1071
|
lane: RUNTIME_LANE,
|
|
@@ -1871,7 +1871,7 @@ export function registerRuntimeDataLane(tools) {
|
|
|
1871
1871
|
writeTool({
|
|
1872
1872
|
tools,
|
|
1873
1873
|
name: "data.update",
|
|
1874
|
-
search: { intents: ["改一条记录", "编辑单据", "更新业务数据", "改数据", "录错了改回来", "修正数据", "改成", "改为"] },
|
|
1874
|
+
search: { intents: ["改一条记录", "编辑单据", "更新业务数据", "改数据", "录错了改回来", "修正数据", "改成", "改为", "录错了", "改回来"] },
|
|
1875
1875
|
lane: RUNTIME_LANE,
|
|
1876
1876
|
scope: RUNTIME_TOOLS["data.update"].scope,
|
|
1877
1877
|
description: RUNTIME_TOOLS["data.update"].description,
|
|
@@ -2083,7 +2083,7 @@ export function registerRuntimeDataLane(tools) {
|
|
|
2083
2083
|
writeTool({
|
|
2084
2084
|
tools,
|
|
2085
2085
|
name: "data.submit",
|
|
2086
|
-
search: { intents: ["造测试数据", "造数据", "录数据", "造单据", "提交数据"] },
|
|
2086
|
+
search: { intents: ["造测试数据", "造数据", "录数据", "造单据", "提交数据", "撤回", "提错了", "手滑"] },
|
|
2087
2087
|
lane: RUNTIME_LANE,
|
|
2088
2088
|
scope: RUNTIME_TOOLS["data.submit"].scope,
|
|
2089
2089
|
description: RUNTIME_TOOLS["data.submit"].description,
|
|
@@ -217,6 +217,19 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
217
217
|
scope: "runtime workflow instance node-state diagnosis",
|
|
218
218
|
description: "按实例查全部节点状态(`activities[].status` 数字枚举:`1=当前激活/持有待办`、`0=已完成或尚未到达`,别与实例级 `instanceStatus:\"PROCESSING\"` 混用——后者只表示流程仍在运行)。返回每个节点 `{activityCode,activityName,activityType,status,participantCount,participants:[{name,id}],sheetTrigger?}`(`GET /api/api/runtime/workflow/list_workflow_instance_activity`,WorkflowMaintenanceAssembler.listActivateActivity)。用于「data.submit 回 PROCESSING 但没有下一待办」的自诊断:例子 `omc call workflow.instanceActivity --args '{\"workflowInstanceId\":\"<id>\"}'`。当没有任何节点 status=1 时,readback 的 diagnosis.code=no-active-activity 并列出排查顺序(参与人为空的审批节点 → 参与人写法 → 容器日志 GetParticipantInfo error)。审批推进正常时该工具不需要——data.submit 的 readback.nextSubmit 已给出下一级参数。",
|
|
219
219
|
}),
|
|
220
|
+
// r64 流程运维三件套(测试提速定位,真机实证形状)。
|
|
221
|
+
"workflow.transfer": Object.freeze({
|
|
222
|
+
scope: "runtime workflow admin adjust participant",
|
|
223
|
+
description: "流程运维·换当前审批人(`POST /api/api/runtime/workflow/workflow_operation`,operationType=ADJUST_PARTICIPANT;approval 是对象 {activityCode,commonSet,deleted,resources,content}——传字符串 10009;adjust_workItem_participators 是加签面 402512 不是换人)。测试提速工具:换过审批人的实例权限语义已变,不能用于真实流程/权限验证;正常审批链走 data.submit。参与者收 userId 或姓名(user/search 精确解析)。",
|
|
224
|
+
}),
|
|
225
|
+
"workflow.activate": Object.freeze({
|
|
226
|
+
scope: "runtime workflow admin activate activity",
|
|
227
|
+
description: "流程运维·跳转到指定节点(workflow_operation operationType=ACTIVATE_ACTIVITY:激活目标节点并取消当前待办,可带 participants 指定新节点审批人)。测试提速工具:跳过节点的实例不能用于真实流程/权限验证——正常审批走 data.submit。目标节点须在实例活动清单里(status:0 的未到达节点也能跳)。",
|
|
228
|
+
}),
|
|
229
|
+
"workflow.finish": Object.freeze({
|
|
230
|
+
scope: "runtime workflow admin finish instance",
|
|
231
|
+
description: "流程运维·手动结束流程(`POST /api/api/runtime/workflow/finish_instance_by_post`,正常完结语义):实例到 COMPLETED,workflow.bindRules 的 end handler 规则照常触发(与 abort_instance 终止的本质区别——终止不保证跑规则;验证用 rule.log)。测试提速工具:手动结束的实例不能用于真实流程推进/权限验证。",
|
|
232
|
+
}),
|
|
220
233
|
}),
|
|
221
234
|
});
|
|
222
235
|
export function assertWorkflowContract() {
|
|
@@ -262,6 +275,10 @@ export function assertWorkflowContract() {
|
|
|
262
275
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "configure_workflow", ["workflow.create", "workflow.update", "workflow.publish", "workflow.bindRule", "bindRules"]);
|
|
263
276
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workitem.list", ["search_workitems", "workItemId", "workflowInstanceId", "bizObjectId", "getBizObjectByWfInstanceId", "filterWorkflowInstanceId"]);
|
|
264
277
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.instanceActivity", ["list_workflow_instance_activity", "status", "participants", "no-active-activity"]);
|
|
278
|
+
// r64:运维三件套的端点/语义钉子(含「测试提速」定位)。
|
|
279
|
+
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.transfer", ["workflow_operation", "ADJUST_PARTICIPANT", "data.submit"]);
|
|
280
|
+
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.activate", ["ACTIVATE_ACTIVITY", "data.submit"]);
|
|
281
|
+
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.finish", ["finish_instance_by_post", "end handler", "abort"]);
|
|
265
282
|
if (!workflowTemplateArg.description?.includes("routes"))
|
|
266
283
|
throw new Error("workflow template arg must document the routes->rules mapping");
|
|
267
284
|
if (workflowTemplateArg.description?.includes('\\"templateType\\":\\"BusinessProcess\\"') || workflowTemplateArg.description?.includes('"templateType":"BusinessProcess"'))
|
|
@@ -55,6 +55,22 @@ export const WORKFLOW_COVERAGE = declareLaneCoverage(WORKFLOW_LANE_CONTRACT.lane
|
|
|
55
55
|
],
|
|
56
56
|
tools: [claim("workitem.list", T["workitem.list"].scope), claim("workflow.instanceActivity", T["workflow.instanceActivity"].scope)],
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
// r64 流程运维三件套(用户需求 2026-11-14;测试提速定位)。端点形状真机
|
|
60
|
+
// 实证:workflow_operation approval 必须是对象(字符串 10009)、
|
|
61
|
+
// adjust_workItem_participators 是加签面(402512)、finish_instance_by_post
|
|
62
|
+
// 正常完结语义(end 规则照常触发)。回执档案见 r64 TASK-RESULT。
|
|
63
|
+
capability: "r64 runtime workflow admin operations (transfer/activate/finish)",
|
|
64
|
+
evidence: [
|
|
65
|
+
"packages/omc-cli/src/lanes/workflow.ts",
|
|
66
|
+
"r64 2026-11-14 (8.6 真机): ADJUST_PARTICIPANT 换审批人(A2 付文彬→赵财务 回执)、ACTIVATE_ACTIVITY 跳转 A2→A3、finish_instance_by_post COMPLETED——全链沙盒 r64ops_wfo 实证",
|
|
67
|
+
],
|
|
68
|
+
tools: [
|
|
69
|
+
claim("workflow.transfer", T["workflow.transfer"].scope),
|
|
70
|
+
claim("workflow.activate", T["workflow.activate"].scope),
|
|
71
|
+
claim("workflow.finish", T["workflow.finish"].scope),
|
|
72
|
+
],
|
|
73
|
+
},
|
|
58
74
|
{
|
|
59
75
|
capability: "workflow participant resolution (org roles/departments)",
|
|
60
76
|
evidence: [
|
package/dist/lanes/workflow.js
CHANGED
|
@@ -2617,7 +2617,7 @@ export function registerWorkflowLane(tools) {
|
|
|
2617
2617
|
writeTool({
|
|
2618
2618
|
tools,
|
|
2619
2619
|
name: "workflow.update",
|
|
2620
|
-
search: { intents: ["更新流程", "修改流程", "改流程", "加审批节点", "退回给", "退回到"] },
|
|
2620
|
+
search: { intents: ["更新流程", "修改流程", "改流程", "加审批节点", "退回给", "退回到", "签一下", "自己批"] },
|
|
2621
2621
|
lane: WORKFLOW_LANE,
|
|
2622
2622
|
scope: WORKFLOW_TOOLS["workflow.update"].scope,
|
|
2623
2623
|
description: WORKFLOW_TOOLS["workflow.update"].description,
|
|
@@ -3272,7 +3272,7 @@ export function registerWorkflowLane(tools) {
|
|
|
3272
3272
|
});
|
|
3273
3273
|
tools.push(defineTool({
|
|
3274
3274
|
name: "workitem.list",
|
|
3275
|
-
search: { intents: ["查我的待办", "我的待办", "待办列表", "查待办"] },
|
|
3275
|
+
search: { intents: ["查我的待办", "我的待办", "待办列表", "查待办", "等审批"] },
|
|
3276
3276
|
layer: "low",
|
|
3277
3277
|
kind: "read",
|
|
3278
3278
|
lane: WORKFLOW_LANE,
|
|
@@ -4075,6 +4075,207 @@ export function registerWorkflowLane(tools) {
|
|
|
4075
4075
|
}, { compact: userSearchCompact });
|
|
4076
4076
|
},
|
|
4077
4077
|
}));
|
|
4078
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
4079
|
+
// r64 流程运维三件套(用户需求 2026-11-14:「流程运维把当前审批人换成我自己 /
|
|
4080
|
+
// 手动结束流程触发规则 / 运维到指定节点」)。**定位:测试提速工具**——快速
|
|
4081
|
+
// 造/推测试数据用;真实流程与权限验证必须走 data.submit 正常链(换过审批人/
|
|
4082
|
+
// 跳过节点的实例,权限语义已变)。端点形状全部真机实证(详见 r64 TASK-RESULT)。
|
|
4083
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
4084
|
+
/** 把 participants(userId 或姓名,混收)解析成 userId 列表;姓名走 user/search。 */
|
|
4085
|
+
const resolveOpsParticipants = async (session, participants) => {
|
|
4086
|
+
const ids = [];
|
|
4087
|
+
const resolved = [];
|
|
4088
|
+
const unresolved = [];
|
|
4089
|
+
for (const entry of participants) {
|
|
4090
|
+
if (/^[0-9a-f]{16,}$/i.test(entry)) {
|
|
4091
|
+
ids.push(entry);
|
|
4092
|
+
resolved.push({ name: entry, id: entry });
|
|
4093
|
+
continue;
|
|
4094
|
+
}
|
|
4095
|
+
const data = (await wireCall(session, { path: ENDPOINTS.organizationUserSearch, method: "POST", body: { wd: entry, page: 0, size: 5 } })).data;
|
|
4096
|
+
const rows = Array.isArray(data?.content) ? data.content : [];
|
|
4097
|
+
const exact = rows.find((row) => String(row.name ?? "") === entry) ?? rows[0];
|
|
4098
|
+
if (exact && typeof exact.id === "string") {
|
|
4099
|
+
ids.push(exact.id);
|
|
4100
|
+
resolved.push({ name: String(exact.name ?? entry), id: exact.id });
|
|
4101
|
+
}
|
|
4102
|
+
else {
|
|
4103
|
+
unresolved.push(entry);
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4106
|
+
return { ids, resolved, unresolved };
|
|
4107
|
+
};
|
|
4108
|
+
const opsApproval = (activityCode, comment) => ({
|
|
4109
|
+
activityCode,
|
|
4110
|
+
commonSet: false,
|
|
4111
|
+
deleted: false,
|
|
4112
|
+
resources: [],
|
|
4113
|
+
content: comment ?? null,
|
|
4114
|
+
});
|
|
4115
|
+
const activeActivitiesOf = async (session, instanceId) => {
|
|
4116
|
+
const rows = await listInstanceActivities(session, instanceId);
|
|
4117
|
+
return rows
|
|
4118
|
+
.filter((row) => Number(row.status) === 1)
|
|
4119
|
+
.map((row) => ({
|
|
4120
|
+
activityCode: wireString(row.activityCode),
|
|
4121
|
+
activityName: wireString(row.activityName),
|
|
4122
|
+
participants: (Array.isArray(row.participantors) ? row.participantors : []).map((person) => ({ id: wireString(person.id), name: wireString(person.name) })),
|
|
4123
|
+
}));
|
|
4124
|
+
};
|
|
4125
|
+
writeTool({
|
|
4126
|
+
tools,
|
|
4127
|
+
name: "workflow.transfer",
|
|
4128
|
+
search: { intents: ["换审批人", "转办", "改审批人", "调整审批人", "审批人换成"] },
|
|
4129
|
+
lane: WORKFLOW_LANE,
|
|
4130
|
+
scope: "runtime workflow admin adjust participant",
|
|
4131
|
+
description: "流程运维·换当前审批人(`POST /api/api/runtime/workflow/workflow_operation`,operationType=ADJUST_PARTICIPANT;真机实证 approval 是**对象** {activityCode,commonSet,deleted,resources,content},传字符串 10009;adjust_workItem_participators 是加签面不是换人)。**测试提速工具**:换过审批人的实例权限语义已变,不能用于真实流程/权限验证——正常审批链走 data.submit。实例必须在途且有激活节点;默认取第一个激活节点,也可显式 activityCode。",
|
|
4132
|
+
inputSchema: {
|
|
4133
|
+
workflowInstanceId: z.string().min(1).describe("流程实例 id(data.submit 读回 / workflow.instanceActivity)"),
|
|
4134
|
+
participants: z.array(z.string().min(1)).min(1).describe("目标审批人:userId 或姓名(混收;姓名按 organization/user/search 精确匹配解析)"),
|
|
4135
|
+
activityCode: z.string().optional().describe("目标节点 code;省略=当前第一个激活节点"),
|
|
4136
|
+
comment: z.string().optional().describe("运维意见(进审批记录)"),
|
|
4137
|
+
},
|
|
4138
|
+
execute: async (session, args) => {
|
|
4139
|
+
const base = await getInstanceBaseInfo(session, args.workflowInstanceId);
|
|
4140
|
+
if (base === null)
|
|
4141
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-not-found", workflowInstanceId: args.workflowInstanceId, message: `流程实例 ${args.workflowInstanceId} 不存在(get_instance_baseinfo 空)——实例 id 来自 data.submit 读回的 workflowInstanceId` });
|
|
4142
|
+
const status = wireString(base.status);
|
|
4143
|
+
if (status === "COMPLETED")
|
|
4144
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-completed", workflowInstanceId: args.workflowInstanceId, message: `实例已 COMPLETED,没有可换的审批人` });
|
|
4145
|
+
const active = await activeActivitiesOf(session, args.workflowInstanceId);
|
|
4146
|
+
if (active.length === 0)
|
|
4147
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-no-active-activity", workflowInstanceId: args.workflowInstanceId, message: "实例没有任何激活节点(参与者解析失败/引擎异常),无审批人可换——先 workflow.instanceActivity 诊断" });
|
|
4148
|
+
const target = args.activityCode !== undefined ? active.find((row) => row.activityCode === args.activityCode) : active[0];
|
|
4149
|
+
if (target === undefined)
|
|
4150
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-activity-not-active", activityCode: args.activityCode, activeActivities: active.map((row) => row.activityCode), message: `节点 ${args.activityCode} 不是当前激活节点;激活中的是 ${active.map((row) => row.activityCode).join("、")}` });
|
|
4151
|
+
const { ids, resolved, unresolved } = await resolveOpsParticipants(session, args.participants);
|
|
4152
|
+
if (unresolved.length > 0 || ids.length === 0)
|
|
4153
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-participant-unresolved", unresolved, message: `participants 里 ${unresolved.join("、")} 在 organization/user/search 解析不到(精确姓名优先);直接传 userId 可跳过解析` });
|
|
4154
|
+
const currentIds = new Set(target.participants.map((person) => person.id));
|
|
4155
|
+
if (ids.every((id) => currentIds.has(id)))
|
|
4156
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-transfer-noop", message: `目标审批人与当前完全相同(${[...currentIds].join("、")})——换成同一批人是 no-op,平台可能拒绝;要真实换人请给不同的用户` });
|
|
4157
|
+
const performed = await wireCall(session, {
|
|
4158
|
+
path: ENDPOINTS.workflowOperation,
|
|
4159
|
+
method: "POST",
|
|
4160
|
+
body: {
|
|
4161
|
+
workflowInstanceId: args.workflowInstanceId,
|
|
4162
|
+
activityCode: target.activityCode,
|
|
4163
|
+
approval: opsApproval(target.activityCode, args.comment),
|
|
4164
|
+
batchOperation: false,
|
|
4165
|
+
operationType: "ADJUST_PARTICIPANT",
|
|
4166
|
+
participantors: ids,
|
|
4167
|
+
},
|
|
4168
|
+
});
|
|
4169
|
+
const after = await activeActivitiesOf(session, args.workflowInstanceId);
|
|
4170
|
+
return {
|
|
4171
|
+
performed: { errcode: performed.errcode, operationType: "ADJUST_PARTICIPANT", activityCode: target.activityCode, participantors: ids },
|
|
4172
|
+
readback: {
|
|
4173
|
+
activeActivities: after,
|
|
4174
|
+
transferred: after.some((row) => row.activityCode === target.activityCode && row.participants.some((person) => ids.includes(person.id ?? ""))),
|
|
4175
|
+
boundaryNote: "测试提速工具:换过审批人的实例权限语义已变,勿用于真实流程/权限验证;正常审批链走 data.submit(workItemId)。",
|
|
4176
|
+
},
|
|
4177
|
+
};
|
|
4178
|
+
},
|
|
4179
|
+
});
|
|
4180
|
+
writeTool({
|
|
4181
|
+
tools,
|
|
4182
|
+
name: "workflow.activate",
|
|
4183
|
+
search: { intents: ["跳转节点", "运维到节点", "指定节点", "调整节点", "流程跳转"] },
|
|
4184
|
+
lane: WORKFLOW_LANE,
|
|
4185
|
+
scope: "runtime workflow admin activate activity",
|
|
4186
|
+
description: "流程运维·跳转到指定节点(`POST /api/api/runtime/workflow/workflow_operation`,operationType=ACTIVATE_ACTIVITY:激活目标节点并取消当前待办,可带 participantors 指定新节点审批人)。**测试提速工具**——跳过节点的实例不能用于真实流程/权限验证;正常审批走 data.submit。目标节点必须在实例的活动清单里(workflow.instanceActivity 可查全部节点,status:0 的未到达节点也能跳)。",
|
|
4187
|
+
inputSchema: {
|
|
4188
|
+
workflowInstanceId: z.string().min(1).describe("流程实例 id"),
|
|
4189
|
+
activityCode: z.string().min(1).describe("目标节点 code(如回到 A2 或直跳 A3;全部节点用 workflow.instanceActivity 查)"),
|
|
4190
|
+
participants: z.array(z.string().min(1)).optional().describe("新节点的审批人(userId 或姓名);省略则用节点模板自身的参与者解析"),
|
|
4191
|
+
comment: z.string().optional().describe("运维意见"),
|
|
4192
|
+
},
|
|
4193
|
+
execute: async (session, args) => {
|
|
4194
|
+
const base = await getInstanceBaseInfo(session, args.workflowInstanceId);
|
|
4195
|
+
if (base === null)
|
|
4196
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-not-found", workflowInstanceId: args.workflowInstanceId, message: `流程实例 ${args.workflowInstanceId} 不存在` });
|
|
4197
|
+
const status = wireString(base.status);
|
|
4198
|
+
if (status === "COMPLETED")
|
|
4199
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-completed", workflowInstanceId: args.workflowInstanceId, message: `实例已 COMPLETED,不能跳转节点` });
|
|
4200
|
+
const rows = await listInstanceActivities(session, args.workflowInstanceId);
|
|
4201
|
+
const known = rows.map((row) => wireString(row.activityCode));
|
|
4202
|
+
if (!known.includes(args.activityCode))
|
|
4203
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-activity-unknown", activityCode: args.activityCode, knownActivities: known, message: `节点 ${args.activityCode} 不在实例活动清单里;清单:${known.join("、")}` });
|
|
4204
|
+
const activeBefore = rows.filter((row) => Number(row.status) === 1).map((row) => wireString(row.activityCode));
|
|
4205
|
+
let participantIds;
|
|
4206
|
+
if (args.participants !== undefined) {
|
|
4207
|
+
const { ids, unresolved } = await resolveOpsParticipants(session, args.participants);
|
|
4208
|
+
if (unresolved.length > 0)
|
|
4209
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-participant-unresolved", unresolved, message: `participants 里 ${unresolved.join("、")} 解析不到(精确姓名优先);直接传 userId 可跳过解析` });
|
|
4210
|
+
participantIds = ids;
|
|
4211
|
+
}
|
|
4212
|
+
const activeRow = rows.find((row) => Number(row.status) === 1);
|
|
4213
|
+
const performed = await wireCall(session, {
|
|
4214
|
+
path: ENDPOINTS.workflowOperation,
|
|
4215
|
+
method: "POST",
|
|
4216
|
+
body: {
|
|
4217
|
+
workflowInstanceId: args.workflowInstanceId,
|
|
4218
|
+
activityCode: args.activityCode,
|
|
4219
|
+
approval: opsApproval(wireString(activeRow?.activityCode) ?? args.activityCode, args.comment),
|
|
4220
|
+
batchOperation: false,
|
|
4221
|
+
operationType: "ACTIVATE_ACTIVITY",
|
|
4222
|
+
...(participantIds !== undefined ? { participantors: participantIds } : {}),
|
|
4223
|
+
},
|
|
4224
|
+
});
|
|
4225
|
+
const after = await activeActivitiesOf(session, args.workflowInstanceId);
|
|
4226
|
+
return {
|
|
4227
|
+
performed: { errcode: performed.errcode, operationType: "ACTIVATE_ACTIVITY", activityCode: args.activityCode, activatedFrom: activeBefore },
|
|
4228
|
+
readback: {
|
|
4229
|
+
activeActivities: after,
|
|
4230
|
+
activated: after.some((row) => row.activityCode === args.activityCode),
|
|
4231
|
+
boundaryNote: "测试提速工具:跳过节点的实例不能用于真实流程/权限验证。",
|
|
4232
|
+
},
|
|
4233
|
+
};
|
|
4234
|
+
},
|
|
4235
|
+
});
|
|
4236
|
+
writeTool({
|
|
4237
|
+
tools,
|
|
4238
|
+
name: "workflow.finish",
|
|
4239
|
+
search: { intents: ["结束流程", "手动结束", "流程结束", "直接完结"] },
|
|
4240
|
+
lane: WORKFLOW_LANE,
|
|
4241
|
+
scope: "runtime workflow admin finish instance",
|
|
4242
|
+
description: "流程运维·手动结束流程(`POST /api/api/runtime/workflow/finish_instance_by_post`,发起人「结束流程」语义):实例直接到 COMPLETED,**workflow.bindRules 的 end handler 规则照常触发**(这是 finish 与 abort_instance 终止的本质区别——终止不保证跑规则;验证规则跑了没有用 rule.log 查)。**测试提速工具**:手动结束的实例不能用于真实流程推进/权限验证;正常审批走 data.submit。",
|
|
4243
|
+
inputSchema: {
|
|
4244
|
+
workflowInstanceId: z.string().min(1).describe("流程实例 id"),
|
|
4245
|
+
comment: z.string().optional().describe("结束意见(进审批记录)"),
|
|
4246
|
+
},
|
|
4247
|
+
execute: async (session, args) => {
|
|
4248
|
+
const base = await getInstanceBaseInfo(session, args.workflowInstanceId);
|
|
4249
|
+
if (base === null)
|
|
4250
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-not-found", workflowInstanceId: args.workflowInstanceId, message: `流程实例 ${args.workflowInstanceId} 不存在` });
|
|
4251
|
+
const status = wireString(base.status);
|
|
4252
|
+
if (status === "COMPLETED")
|
|
4253
|
+
throw new ToolRefusalError({ status: "refused", blocker: "workflow-instance-completed", workflowInstanceId: args.workflowInstanceId, message: "实例已 COMPLETED,无需结束(幂等拒绝;如需重开走 workflow.activate 回指定节点)" });
|
|
4254
|
+
const activeBefore = await activeActivitiesOf(session, args.workflowInstanceId);
|
|
4255
|
+
const performed = await wireCall(session, {
|
|
4256
|
+
path: ENDPOINTS.workflowFinishInstance,
|
|
4257
|
+
method: "POST",
|
|
4258
|
+
body: { workflowInstanceId: args.workflowInstanceId, comment: args.comment ?? null, resources: [] },
|
|
4259
|
+
});
|
|
4260
|
+
const afterBase = await getInstanceBaseInfo(session, args.workflowInstanceId);
|
|
4261
|
+
const afterStatus = wireString(afterBase?.status);
|
|
4262
|
+
const afterActive = await activeActivitiesOf(session, args.workflowInstanceId);
|
|
4263
|
+
// r64 真机:finish 受理后 baseinfo 投影可能停在 TOPPING_OFF(收尾态)而
|
|
4264
|
+
// DB 终态已是 COMPLETED——两态都算「结束已受理」,别当成失败重试。
|
|
4265
|
+
const finished = afterStatus === "COMPLETED" || afterStatus === "TOPPING_OFF";
|
|
4266
|
+
return {
|
|
4267
|
+
performed: { errcode: performed.errcode, finishedActivities: activeBefore.map((row) => row.activityCode) },
|
|
4268
|
+
readback: {
|
|
4269
|
+
instanceStatus: afterStatus,
|
|
4270
|
+
finished,
|
|
4271
|
+
...(afterStatus === "TOPPING_OFF" ? { toppingOffNote: "TOPPING_OFF=收尾态(真机实证:DB 终态此时已是 COMPLETED,baseinfo 投影滞后)——end 规则在收尾时触发,勿当失败重试" } : {}),
|
|
4272
|
+
activeActivities: afterActive,
|
|
4273
|
+
endRulesNote: "finish=正常完结语义:workflow.bindRules 绑在 end handler 的业务规则照常触发(查 rule.log / rulelog 面);abort 终止不保证跑规则——本工具不走 abort。",
|
|
4274
|
+
boundaryNote: "测试提速工具:手动结束的实例不能用于真实流程推进/权限验证。",
|
|
4275
|
+
},
|
|
4276
|
+
};
|
|
4277
|
+
},
|
|
4278
|
+
});
|
|
4078
4279
|
}
|
|
4079
4280
|
/** Flatten a role-group/role row into the participant-construction fields. */
|
|
4080
4281
|
/**
|
package/dist/tool-search.js
CHANGED
|
@@ -141,7 +141,7 @@ const READ_LEADING_VERBS = Object.freeze(["读", "看", "查", "列出", "列",
|
|
|
141
141
|
*/
|
|
142
142
|
const OBJECT_LEXICON = Object.freeze({
|
|
143
143
|
model: ["模型", "业务模型", "登记表", "申请单", "申请表", "台账", "单表"],
|
|
144
|
-
field: ["字段"],
|
|
144
|
+
field: ["字段", "栏"],
|
|
145
145
|
form: ["表单"],
|
|
146
146
|
listview: ["列表视图", "列表", "视图", "查询列"],
|
|
147
147
|
datarule: ["字段级规则", "数据规则", "校验规则", "控件规则", "字段校验", "字段级校验"],
|
|
@@ -154,8 +154,8 @@ const OBJECT_LEXICON = Object.freeze({
|
|
|
154
154
|
department: ["部门"],
|
|
155
155
|
user: ["用户", "员工", "账号", "成员"],
|
|
156
156
|
dictionary: ["数据字典", "字典", "选项"],
|
|
157
|
-
report: ["报表", "图表", "看板"],
|
|
158
|
-
data: ["业务数据", "运行数据", "记录", "单据"],
|
|
157
|
+
report: ["报表", "图表", "看板", "趋势图"],
|
|
158
|
+
data: ["业务数据", "运行数据", "记录", "单据", "单子", "单号"],
|
|
159
159
|
service: ["集成服务", "业务服务", "服务"],
|
|
160
160
|
method: ["接口方法", "接口", "方法"],
|
|
161
161
|
category: ["所属目录", "分类", "类别"],
|
|
@@ -445,7 +445,10 @@ export function scoreTools(registry, query) {
|
|
|
445
445
|
&& others.some(([, word]) => posText.indexOf(word, aliasEnd + 1) >= 0));
|
|
446
446
|
if (yields)
|
|
447
447
|
break;
|
|
448
|
-
|
|
448
|
+
// 词表三批(原话档):同分裁决曾退化成名字序——「小数点太多位…改成两位」
|
|
449
|
+
// 里 field.update(小数点)与 data.update(改成)同为 55+18。M1-2a 同哲学:
|
|
450
|
+
// 更长的命中短语是更特指的证据,按别名长度给有界加成(≤6)。
|
|
451
|
+
signals.push({ key: "toolAlias", weight: SEARCH_WEIGHTS.toolAlias + Math.min(alias.length, 6), via: `别名「${alias}」` });
|
|
449
452
|
aliasHit = true;
|
|
450
453
|
break;
|
|
451
454
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.54",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"commander": "14.0.3",
|
|
59
|
-
"omc-core": "0.6.
|
|
59
|
+
"omc-core": "0.6.54",
|
|
60
60
|
"proper-lockfile": "4.1.2",
|
|
61
61
|
"write-file-atomic": "6.0.0",
|
|
62
62
|
"zod": "^3.23.8",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"directory": "packages/omc-cli"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
|
-
"@stalfh233/omc-fake-platform": "0.6.
|
|
77
|
+
"@stalfh233/omc-fake-platform": "0.6.54"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -166,8 +166,8 @@ only the section for the capability you need —
|
|
|
166
166
|
|
|
167
167
|
## 流程模板 `workflow`
|
|
168
168
|
|
|
169
|
-
- **能做哪些事**:流程模板 get_draft/get_published、create、update、publish、bindRule(事件处理器规则绑定)、delete、workitem.list、workflow.instanceActivity
|
|
170
|
-
- **工具**:`workflow.get_draft`、`workflow.setButtons`(节点「表单操作」按钮勾选)、`workflow.get_published`、`workflow.validate`、`workflow.create`、`workflow.update`、`workflow.publish`、`workflow.bindRule`、`workflow.delete`、`workflow.permissions`、`workflow.addPermission`、`workflow.removePermission`(发起权限:发布流程不会自动建这一行,缺它一律 40009)、`configure_workflow`、`workitem.list`、`workflow.instanceActivity`、`org.role.list`、`org.department.list`、`org.user.search`、`org.role.users`、`org.role.userScope`、`org.roleGroup.create`、`org.role.create`、`org.role.update`、`org.role.addUsers`、`org.role.removeUsers`、`org.role.setUserScope`、`org.department.create`、`org.department.update`、`org.department.delete`、`org.department.users`、`org.user.create`、`org.user.update`、`org.user.delete`、`org.user.info`、`org.user.departments`、`org.role.delete`、`org.roleGroup.delete`、`org.user.transferDepartment`
|
|
169
|
+
- **能做哪些事**:流程模板 get_draft/get_published、create、update、publish、bindRule(事件处理器规则绑定)、delete、workitem.list、workflow.instanceActivity(实例节点状态诊断);参与人用组织对象。**流程运维三件套**(r64,测试提速定位):workflow.transfer 换审批人 / workflow.activate 跳转节点 / workflow.finish 手动结束(end 规则照常触发)——运维过的实例不能用于真实流程/权限验证。
|
|
170
|
+
- **工具**:`workflow.get_draft`、`workflow.setButtons`(节点「表单操作」按钮勾选)、`workflow.get_published`、`workflow.validate`、`workflow.create`、`workflow.update`、`workflow.publish`、`workflow.bindRule`、`workflow.delete`、`workflow.permissions`、`workflow.addPermission`、`workflow.removePermission`(发起权限:发布流程不会自动建这一行,缺它一律 40009)、`configure_workflow`、`workitem.list`、`workflow.instanceActivity`、`workflow.transfer`、`workflow.activate`、`workflow.finish`、`org.role.list`、`org.department.list`、`org.user.search`、`org.role.users`、`org.role.userScope`、`org.roleGroup.create`、`org.role.create`、`org.role.update`、`org.role.addUsers`、`org.role.removeUsers`、`org.role.setUserScope`、`org.department.create`、`org.department.update`、`org.department.delete`、`org.department.users`、`org.user.create`、`org.user.update`、`org.user.delete`、`org.user.info`、`org.user.departments`、`org.role.delete`、`org.roleGroup.delete`、`org.user.transferDepartment`
|
|
171
171
|
- **recipe**:`omc describe workflow.bindRule --example workflow-handler-binding`;条件两级/一级:`omc describe workflow.update --example workflow-conditional-two-level-approval`
|
|
172
172
|
- **边界 / 陷阱**:greenfield 首版;`publish`/`bindRule` 不得在 `ValidateMessage[]` 拒绝时报告成功。运行时 workitem(提交/审批)走 `data.submit`;想知道实例停在哪/是否错派,用 `workflow.instanceActivity`(无 status=1=真停,参与人全是发起人=解析为空退回)。**发起权限**(`workflow.permissions` / `addPermission`)只有部门/角色/用户三种白名单,**没有「全员」选项**——缺权限行时非管理员通常不能发起(40009),想放开只能授一个够宽的部门/角色,不是「不建行=全员」。**行级数据权限 / 可见范围 / 申请人只看自己的单据不在工具覆盖内**(没有按登录人动态过滤的读面/写面);`org.role.setUserScope` 是角色成员的部门管理范围,不是单据行级可见范围。
|
|
173
173
|
|