{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "付款申報與確認",
    "quality_profile": "showcase",
    "output": "withdrawal-report.html",
    "legend": { "entries": { "frontend": { "label": "輸入／入口" }, "backend": { "label": "處理結果" }, "security": { "label": "條件／分支" } } }
  },
  "lanes": [
    {
      "id": "main",
      "label": "等額自動結算"
    },
    {
      "id": "alternate",
      "label": "不符：PROOF_SUBMITTED（Frozen 進 review）→ BO 核對",
      "variant": "exception"
    }
  ],
  "mainPath": [
    "withdrawal-report-input",
    "withdrawal-report-auto",
    "withdrawal-report-result"
  ],
  "nodes": [
    {
      "id": "withdrawal-report-input",
      "lane": "main",
      "col": 0,
      "type": "frontend",
      "label": "CH 提交 proof",
      "sublabel": "申報 actual",
      "width": 164
    },
    {
      "id": "withdrawal-report-auto",
      "lane": "main",
      "col": 2,
      "type": "security",
      "label": "等額且可自動？",
      "sublabel": "actual＝requested、attempt #1、未 Frozen、ASSIGNED／ACCEPTED",
      "width": 240
    },
    {
      "id": "withdrawal-report-result",
      "lane": "main",
      "col": 4,
      "type": "backend",
      "label": "唯一 SETTLED",
      "sublabel": "debit／terminal intent",
      "width": 164
    },
    {
      "id": "withdrawal-report-gate",
      "lane": "alternate",
      "col": 2,
      "type": "security",
      "label": "BO 最後確認？",
      "sublabel": "actual／Freeze",
      "width": 164
    },
    {
      "id": "withdrawal-report-alternate",
      "lane": "alternate",
      "col": 4,
      "type": "security",
      "label": "尚無終局",
      "sublabel": "review／拒絕／rollback",
      "width": 164
    }
  ],
  "edges": [
    {
      "id": "withdrawal-report-check",
      "from": "withdrawal-report-input",
      "to": "withdrawal-report-auto",
      "label": "同交易判斷",
      "role": "main"
    },
    {
      "id": "withdrawal-report-auto-yes",
      "from": "withdrawal-report-auto",
      "to": "withdrawal-report-result",
      "label": "全符合（ADR-0487）",
      "variant": "emphasis",
      "role": "main"
    },
    {
      "id": "withdrawal-report-auto-no",
      "from": "withdrawal-report-auto",
      "to": "withdrawal-report-gate",
      "label": "任一不符",
      "variant": "security",
      "role": "branch"
    },
    {
      "id": "withdrawal-report-yes",
      "from": "withdrawal-report-gate",
      "to": "withdrawal-report-result",
      "toSide": "bottom",
      "label": "通過",
      "variant": "emphasis",
      "role": "branch"
    },
    {
      "id": "withdrawal-report-no",
      "from": "withdrawal-report-gate",
      "to": "withdrawal-report-alternate",
      "label": "未通過",
      "variant": "security",
      "role": "branch"
    }
  ]
}
