@stalfh233/omc-cli 0.4.28 → 0.4.30

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.
@@ -421,22 +421,20 @@ const workflowSave = Object.freeze({
421
421
  });
422
422
  const plainSubmit = Object.freeze({
423
423
  id: "plain-data-submit",
424
- title: "无流程模型:草稿直提(DRAFT→COMPLETED,触发 Create 规则)",
425
- status: "requires-prior-readback",
424
+ title: "无流程模型:新建并提交一调完成(COMPLETED,触发 Create 规则)——正式数据的标准路径",
425
+ status: "offline-valid",
426
426
  tool: "data.submit",
427
- args: { environment, schemaCode: model, bizObjectId: "<data.save.performed.bizObjectId>", formData: { name: "recipe draft" } },
428
- preconditions: ["模型无 workflowCode(有流程走 workflow-backed-data-submit)", "data.save 已成功并读回 DRAFT 草稿", "bizObjectId 取 data.save 读回,不要手造"],
429
- conditionalRequirements: ["无需 workflowInstanceId/workItemId——无流程模型 submit 自持久化(runtime/form/submit 就地置 COMPLETED)"],
430
- priorToolReferences: [
431
- { tool: "data.save", args: { environment, schemaCode: model, formData: { name: "recipe draft" } }, purpose: "建 DRAFT 草稿并读回 bizObjectId(其 draftRuleHint 会指回本链)" },
432
- ],
427
+ args: { environment, schemaCode: model, formData: { name: "正式记录" } },
428
+ preconditions: ["模型无已发布流程(有流程走 workflow-backed-data-submit)", "模型+表单已发布"],
429
+ conditionalRequirements: ["**不带 bizObjectId 即新建并提交**(工具内部建稿+直提,一次调用 COMPLETED);已有草稿要直提时才带 data.save 读回的 bizObjectId;不要手造 id"],
430
+ priorToolReferences: [],
433
431
  dryRun: { supported: true, command: `omc call data.submit --env ${environment} --dry-run --args '<recipe.args>'`, notes: "dry-run 验证参数关系,不推进状态" },
434
432
  expectedReadback: { performed: { errcode: 0 }, readback: { sequenceStatus: "COMPLETED" } },
435
433
  refusalRecovery: [
436
434
  { code: "submit-biz-object-absent", action: "bizObjectId 在平台无行(304001)——回 data.save 重建草稿后再直提" },
437
435
  { code: "invalid-input", action: "带了 workItemId/workflowInstanceId 时必须同时带 bizObjectId(fail-closed)" },
438
436
  ],
439
- notes: "规则验证路径:Create/Update 规则只在 COMPLETED 分发——plain save 是 DRAFT 不触发(DomainServiceImpl.java:240-248);要验证规则效果就用本链提交后 data.load 核对",
437
+ notes: "r23 复盘修正:本配方曾教先 save 再 submit 两步——正确路径是无 id 一调(业务约定:正式数据一律 data.submit)。Create/Update 规则只在 COMPLETED 分发(DomainServiceImpl.java:240-248);规则效果以提交读回/data.load 为准。data.save 定位=草稿/暂存",
440
438
  requiresEnvironmentDerivedIds: true,
441
439
  });
442
440
  const workflowSubmit = Object.freeze({
@@ -548,7 +548,7 @@ export function registerRuntimeDataLane(tools) {
548
548
  sheetCode: z.string().optional(),
549
549
  formData: runtimeFormDataArg,
550
550
  workflowCode: z.string().optional().describe("portal draft-save shape: create the row AND a DRAFT workflow instance + start workItem (finishStart=FALSE); submit later via data.submit with the returned workItemId. formData must NOT carry an id — in-place workflow start has no REST surface in 8.6.26"),
551
- submit: z.boolean().optional().describe("r18 retro:true=一调完成态——保存后立即直提(无流程模型 DRAFT→COMPLETED,触发 Create 业务规则);与 workflowCode 互斥(流程草稿须走 data.submit 两段式)。默认 false 仅存草稿"),
551
+ submit: z.boolean().optional().describe("true=保存后立即直提(无流程模型 DRAFT→COMPLETED,触发 Create 规则);与 workflowCode 互斥。**按业务约定正式数据优先直接 data.submit(无 id=新建并提交一调完成)——本参数是便捷别名,save 的定位是草稿/暂存**"),
552
552
  ...readbackProjectionArgs,
553
553
  }, async (session, args) => {
554
554
  // F-A (self-audit): the combo used to be silently ignored (the workflow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.4.28",
3
+ "version": "0.4.30",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "commander": "14.0.3",
54
- "omc-core": "0.4.28",
54
+ "omc-core": "0.4.30",
55
55
  "proper-lockfile": "4.1.2",
56
56
  "write-file-atomic": "6.0.0",
57
57
  "zod": "^3.23.8",
@@ -171,10 +171,11 @@ only the section for the capability you need —
171
171
  - **recipe**:
172
172
  - `omc describe data.save --example workflow-backed-data-save`
173
173
  - `omc describe data.submit --example workflow-backed-data-submit`(有流程)
174
- - 无流程模型的规则验证路径(两选):
175
- - 一调:`data.save {schemaCode, formData, submit:true}` ——保存+直提 COMPLETED,触发 Create 规则(模型有已发布流程时会拒绝并指路两段式)
176
- - 两步:`data.save`(DRAFT)→ `data.submit {schemaCode, bizObjectId, formData}` ——示例 `omc describe data.submit --example plain-data-submit`
177
- - 流程模型:`data.save {workflowCode}`(返回 workItemId)→ `data.submit {bizObjectId, workflowInstanceId, workItemId}`(workflow-backed-data-submit)
174
+ - **正式数据一律 data.submit**(业务约定;save 的新建永远是 DRAFT 草稿):
175
+ - 无流程模型一调:`data.submit {schemaCode, formData}`(无 id=新建并提交,COMPLETED,触发 Create 规则)——示例 `omc describe data.submit --example plain-data-submit`
176
+ - 已存草稿直提:`data.submit {schemaCode, bizObjectId, formData}`
177
+ - 流程模型两段式:`data.save {workflowCode}`(返回 workItemId)→ `data.submit {bizObjectId, workflowInstanceId, workItemId}`(workflow-backed-data-submit)
178
+ - `data.save` 定位=草稿/暂存;其 `submit:true` 便捷参数仍在(无流程模型等同直提),但按约定优先直接 data.submit
178
179
  - **边界 / 陷阱**:读实际业务记录是 OMC 独有能力。**计算字段(FORMULA/子表计算)不由 API 回填**——写测试数据带预算值,公式正确性人工前台确认;带子表计算字段的模型 API 写可能 50000(服务端重算 NPE),前台正常。
179
180
 
180
181
  ---