{
  "name": "Protected Invoice Approval Agent — BiDigest",
  "nodes": [
    {
      "parameters": {},
      "id": "11111111-1111-1111-1111-111111111101",
      "name": "When invoice proposed",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "inv-amt",
              "name": "amount",
              "value": 12000,
              "type": "number"
            },
            {
              "id": "inv-vendor",
              "name": "vendorId",
              "value": "vendor-new-co",
              "type": "string"
            },
            {
              "id": "inv-id",
              "name": "invoiceId",
              "value": "inv-2026-042",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "11111111-1111-1111-1111-111111111102",
      "name": "Sample invoice (default → Human approval)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://bidigest.com/api/v1/admissibility/verify",
        "authentication": "none",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ $env.BIDIGEST_API_KEY || 'Bearer PASTE_YOUR_BIDIGEST_KEY' }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  jurisdiction: { regionCode: 'us-fed', industrySector: 'financial' },\n  intent: {\n    agentId: 'agency-agent:' + $json.vendorId,\n    actionType: 'invoice_approval',\n    proposedPayload: {\n      action: 'invoice_approval',\n      amount: $json.amount,\n      vendorId: $json.vendorId,\n      invoiceId: $json.invoiceId,\n      synthesizedClaims: [\n        'BiDigest Trustee program BDG-TRUSTEE-001 references the published governance framework.',\n      ],\n      shadowCitations: ['https://bidigest.com/governance'],\n    },\n  },\n  sessionContext: {\n    sessionId: 'session-' + $json.invoiceId,\n    userId: 'agency_agent',\n    sessionStartTime: $now.toISO(),\n  },\n  groundTruthBinding: {\n    domain: 'bidigest.com',\n    regulatoryId: 'BDG-TRUSTEE-001',\n  },\n}) }}",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "11111111-1111-1111-1111-111111111103",
      "name": "BiDigest verify",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        0
      ],
      "notesInFlow": true,
      "notes": "Auth: None + Send Headers. Set n8n variable BIDIGEST_API_KEY (Bearer bid_live_...) from bidigest.com/partners/ai-automation/recipes — or paste that full line into Authorization below. Save → Execute workflow."
    },
    {
      "parameters": {
        "jsCode": "const INDETERMINATE_REASON_CODES = new Set([\n  'VALIDATION_UNAVAILABLE',\n  'TIMEOUT',\n  'DEPENDENCY_UNAVAILABLE',\n  'DEPENDENCY_FAILURE',\n  'INTERNAL_ERROR',\n  'SIGNING_UNAVAILABLE',\n  'POLICY_EVAL_UNAVAILABLE',\n  'RATE_LIMITED',\n]);\n\nconst raw = $input.first().json;\nconst body = raw.legacy ?? raw.data ?? raw;\nconst errMsg = typeof raw.error === 'string' ? raw.error : (body?.error ?? '');\nconst statusCode = raw.statusCode ?? raw.status ?? null;\n\nif (statusCode === 401 || errMsg.includes('API key')) {\n  return {\n    verdict: 'REJECTED',\n    receipt_id: null,\n    retry_eligible: false,\n    recompute_required: false,\n    hitl_eligible: false,\n    auth_error: true,\n    setup_hint:\n      'Set n8n variable BIDIGEST_API_KEY to your full Bearer bid_live_... line (recipes page), OR paste it in BiDigest verify → Send Headers → Authorization. Then Save and Execute workflow.',\n    raw,\n  };\n}\n\nconst reason_code = body.reason_code ?? null;\nlet verdict = 'REJECTED';\nlet retry_eligible = false;\nlet recompute_required = false;\nlet hitl_eligible = false;\nlet setup_hint = null;\n\nif (body.reason_code === 'TENANT_NOT_PROVISIONED') {\n  setup_hint =\n    'Ground truth not provisioned on production. Re-import template JSON — verify must use bidigest.com + BDG-TRUSTEE-001 (not agency-automation-demo.bidigest.com).';\n}\n\nif (body.reason_code === '403_REBONDING_REQUIRED') {\n  verdict = 'REVIEW_REQUIRED';\n  hitl_eligible = true;\n} else if (body.admissibility_status === 'APPROVED') {\n  verdict = 'APPROVED';\n} else if (reason_code && INDETERMINATE_REASON_CODES.has(reason_code)) {\n  verdict = 'VALIDATION_UNAVAILABLE';\n  retry_eligible = true;\n  recompute_required = true;\n  hitl_eligible = false;\n} else {\n  verdict = 'REJECTED';\n}\n\nconst p = $('Sample invoice (default → Human approval)').first().json;\n// Agency policy: escalate only when verify already APPROVED (never DENIED → REVIEW)\nif (verdict === 'APPROVED' && p.amount > 2500) {\n  verdict = 'REVIEW_REQUIRED';\n  hitl_eligible = true;\n  retry_eligible = false;\n  recompute_required = false;\n}\nif (verdict === 'APPROVED' && String(p.vendorId).includes('new')) {\n  verdict = 'REVIEW_REQUIRED';\n  hitl_eligible = true;\n  retry_eligible = false;\n  recompute_required = false;\n}\nconst receipt_id = body.decision_receipt?.receipt_id ?? raw.merkleReceipt?.receiptId ?? null;\nconst verify_status = body.admissibility_status ?? null;\n\n// Continuity doctrine — replay harness cases A–E (distinct from retry_eligible)\nconst forward_receipt_authorizes_compensation = false;\nlet continuation_permitted = false;\nlet resume_without_fresh_verify = false;\nif (recompute_required || verdict === 'VALIDATION_UNAVAILABLE') {\n  continuation_permitted = false;\n  resume_without_fresh_verify = receipt_id != null;\n} else if (verdict === 'APPROVED' && !hitl_eligible) {\n  continuation_permitted = true;\n}\n\nconst branch =\n  verdict === 'APPROVED'\n    ? 'Continue'\n    : verdict === 'REVIEW_REQUIRED'\n      ? 'Human approval'\n      : verdict === 'VALIDATION_UNAVAILABLE'\n        ? 'Recompute · Not HITL'\n        : 'Hard stop';\nlet user_message = 'Execution blocked.';\nif (statusCode === 401 || errMsg.includes('API key')) {\n  user_message = setup_hint ?? 'Fix API key: set BIDIGEST_API_KEY or paste Bearer bid_live_… in Authorization.';\n} else if (setup_hint) {\n  user_message = setup_hint;\n} else if (verdict === 'REVIEW_REQUIRED') {\n  user_message =\n    'BiDigest authorized this attempt; agency policy requires human sign-off before payment.';\n} else if (verdict === 'APPROVED') {\n  user_message = 'Authorized — proceed to payment or ERP.';\n} else if (verdict === 'VALIDATION_UNAVAILABLE') {\n  user_message = 'Verify indeterminate — run fresh verify. Not a human-approval path.';\n} else if (p.operationType === 'compensation_reversal' && !p.compensationVerifyComplete) {\n  user_message =\n    'Compensation requires fresh verify boundary — forward receipt is evidence only.';\n} else {\n  user_message = `Blocked (${reason_code ?? 'DENIED'}). Hard stop — do not route to human review.`;\n}\nreturn {\n  verdict,\n  branch,\n  user_message,\n  verify_status,\n  receipt_id,\n  retry_eligible,\n  recompute_required,\n  hitl_eligible,\n  continuation_permitted,\n  forward_receipt_authorizes_compensation,\n  resume_without_fresh_verify,\n  reason_code,\n  setup_hint,\n  raw,\n};"
      },
      "id": "11111111-1111-1111-1111-111111111104",
      "name": "Map to agency verdict",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        660,
        0
      ]
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.verdict }}",
                    "rightValue": "APPROVED",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Continue"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.verdict }}",
                    "rightValue": "REVIEW_REQUIRED",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Human approval"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.verdict }}",
                    "rightValue": "REJECTED",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Hard stop"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.verdict }}",
                    "rightValue": "VALIDATION_UNAVAILABLE",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Recompute · Not HITL"
            }
          ],
          "options": {
            "fallbackOutput": "extra"
          }
        }
      },
      "id": "11111111-1111-1111-1111-111111111105",
      "name": "Branch on verdict",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        880,
        0
      ]
    },
    {
      "parameters": {
        "content": "## READ FIRST — 3 steps\n1. **API key** from https://bidigest.com/partners/ai-automation/recipes\n2. n8n → Settings → Variables → **BIDIGEST_API_KEY** = `Bearer bid_live_…` (full line)\n   **OR** paste that line into BiDigest verify → Send Headers → Authorization\n3. **Save** → **Execute workflow** → open **Map to agency verdict**\n\n**Where you land:** Map output **branch** + **user_message** (from BiDigest verify + agency policy).\nSample amount/vendor do **not** pick the branch by themselves."
      },
      "id": "22222222-2222-2222-2222-222222222221",
      "name": "READ FIRST",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -320,
        -320
      ]
    },
    {
      "parameters": {
        "content": "## Setup details\n✓ BiDigest verify: Authentication = None + Send Headers (correct).\n✓ Ground truth: **bidigest.com** + **BDG-TRUSTEE-001** only.\n✗ **agency-automation-demo.bidigest.com** → TENANT_NOT_PROVISIONED → Hard stop.\n\n**One JSON file per workflow** — download from recipes; do not maintain duplicate imports in n8n.\n\nIf verify JSON fails to parse: re-download template (uses JSON.stringify)."
      },
      "id": "11111111-1111-1111-1111-111111111109",
      "name": "SETUP — API key",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -320,
        -120
      ]
    },
    {
      "parameters": {
        "content": "## APPROVED — Continue\nAuthorization succeeded for this attempt.\nYou may proceed to payment / ERP.\nStore receipt_id: {{ $json.receipt_id }}"
      },
      "id": "11111111-1111-1111-1111-111111111106",
      "name": "APPROVED — Continue",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1100,
        -120
      ]
    },
    {
      "parameters": {
        "content": "## REVIEW_REQUIRED — Human approval\nPolicy requires a person before payment.\nPause workflow. Route to your approval queue.\nAfter approval: run fresh BiDigest verify before continue.\nReceipt: {{ $json.receipt_id }}"
      },
      "id": "11111111-1111-1111-1111-111111111107",
      "name": "REVIEW_REQUIRED — Human approval",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1100,
        0
      ]
    },
    {
      "parameters": {
        "content": "## REJECTED — Hard stop\nDeterministic refusal. Do not retry blindly.\nDo not route to human review.\nLog receipt_id: {{ $json.receipt_id }}"
      },
      "id": "11111111-1111-1111-1111-111111111108",
      "name": "REJECTED — Hard stop",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1100,
        120
      ]
    },
    {
      "parameters": {
        "content": "## VALIDATION_UNAVAILABLE — Recompute — Not HITL\nAuthorization state indeterminate.\nFresh verify required before continuation.\nHuman approval cannot resume this execution.\nDo not approve, retry, or manually continue on this branch.\nrecompute_required: true\nReceipt: {{ $json.receipt_id }}"
      },
      "id": "11111111-1111-1111-1111-111111111110",
      "name": "VALIDATION_UNAVAILABLE — Recompute — Not HITL",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1100,
        240
      ]
    },
    {
      "parameters": {
        "content": "## Try other branches (edit sample node → Save → Execute)\nDefault sample → **Human approval** when verify APPROVED + agency policy.\n\n| Target branch | amount | vendorId |\n|---------------|--------|----------|\n| Human approval (default) | 12000 | vendor-new-co |\n| Continue | 500 | vendor-acme-known |\n| Hard stop | any | (break API key once) |\n\nAfter Execute: open **Map to agency verdict** → read **branch** + **user_message**.\n\n**Execute boundary (M3 P2B):** Continue branch calls execute-boundary evaluate before **Payment demo**. Use **When resume blocked (demo)** to prove EXECUTE_BOUNDARY_BLOCKED."
      },
      "id": "11111111-1111-1111-1111-111111111112",
      "name": "DEMO — three paths",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -320,
        80
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://bidigest.com/api/v1/admissibility/execute-boundary/evaluate",
        "authentication": "none",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ $env.BIDIGEST_API_KEY || 'Bearer PASTE_YOUR_BIDIGEST_KEY' }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  pathId: 'n8n_invoice',\n  executeBoundary: {\n    deliveryAttempt: 1,\n  },\n}) }}",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "11111111-1111-1111-1111-111111111113",
      "name": "BiDigest execute boundary",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1100,
        -120
      ],
      "notesInFlow": true,
      "notes": "M3 P2B — evaluate execute-boundary immediately before payment consequence."
    },
    {
      "parameters": {
        "jsCode": "const raw = $input.first().json;\nconst body = raw.legacy ?? raw.data ?? raw;\nconst errMsg = typeof raw.error === 'string' ? raw.error : (body?.error ?? '');\nconst statusCode = raw.statusCode ?? raw.status ?? null;\n\nif (statusCode === 401 || errMsg.includes('API key')) {\n  return {\n    allow_execute: false,\n    code: 'UNAUTHORIZED',\n    reason: 'api_key_required',\n    user_message: 'Set BIDIGEST_API_KEY before execute-boundary evaluate.',\n    raw,\n  };\n}\n\nconst allow_execute = body.allow_execute === true;\nreturn {\n  allow_execute,\n  code: body.code ?? (allow_execute ? 'EXECUTE_PERMITTED' : 'EXECUTE_BOUNDARY_BLOCKED'),\n  reason: body.reason ?? null,\n  fresh_verify_required: body.fresh_verify_required ?? false,\n  recompute_required: body.recompute_required ?? false,\n  user_message: allow_execute\n    ? 'Execute boundary passed — payment may proceed.'\n    : `Execute boundary blocked (${body.reason ?? body.code ?? 'denied'}). Do not pay.`,\n  raw,\n};"
      },
      "id": "11111111-1111-1111-1111-111111111114",
      "name": "Map execute boundary",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1320,
        -120
      ]
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.allow_execute }}",
                    "rightValue": true,
                    "operator": {
                      "type": "boolean",
                      "operation": "true"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Permitted"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.allow_execute }}",
                    "rightValue": false,
                    "operator": {
                      "type": "boolean",
                      "operation": "false"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Blocked"
            }
          ],
          "options": {
            "fallbackOutput": "extra"
          }
        }
      },
      "id": "11111111-1111-1111-1111-111111111115",
      "name": "Route execute boundary",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1540,
        -120
      ]
    },
    {
      "parameters": {
        "jsCode": "const mapped = $('Map execute boundary').first().json;\nconst invoice = $('Sample invoice (default → Human approval)').first().json;\nreturn {\n  consequence: 'payment_demo',\n  status: 'paid',\n  amount: invoice.amount,\n  invoiceId: invoice.invoiceId,\n  execute_boundary_reason: mapped.reason,\n  message: 'Demo only — no real payment. Execute boundary enforced before this node.',\n};"
      },
      "id": "11111111-1111-1111-1111-111111111116",
      "name": "Payment demo (consequence)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1760,
        -200
      ]
    },
    {
      "parameters": {
        "content": "## EXECUTE_BOUNDARY_BLOCKED\nPayment must not run.\nreason: {{ $json.reason }}\ncode: {{ $json.code }}"
      },
      "id": "11111111-1111-1111-1111-111111111117",
      "name": "EXECUTE_BOUNDARY blocked",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1760,
        -40
      ]
    },
    {
      "parameters": {},
      "id": "11111111-1111-1111-1111-111111111118",
      "name": "When resume blocked (demo)",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        260
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "resume-attempt",
              "name": "deliveryAttempt",
              "value": 2,
              "type": "number"
            },
            {
              "id": "resume-revoked",
              "name": "authorityRevoked",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "resume-rec-id",
              "name": "priorReceiptId",
              "value": "rec_invoice_demo",
              "type": "string"
            },
            {
              "id": "resume-rec-issued",
              "name": "priorIssuedAtMs",
              "value": "={{ $now.toMillis() - 60000 }}",
              "type": "number"
            },
            {
              "id": "resume-rec-fresh",
              "name": "priorFreshUntilMs",
              "value": "={{ $now.toMillis() + 3600000 }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "11111111-1111-1111-1111-111111111119",
      "name": "Resume blocked payload (demo)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        260
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://bidigest.com/api/v1/admissibility/execute-boundary/evaluate",
        "authentication": "none",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ $env.BIDIGEST_API_KEY || 'Bearer PASTE_YOUR_BIDIGEST_KEY' }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  pathId: 'n8n_invoice',\n  executeBoundary: {\n    deliveryAttempt: $json.deliveryAttempt,\n    authorityRevoked: $json.authorityRevoked,\n    priorReceipt: {\n      receiptId: $json.priorReceiptId,\n      issuedAtMs: $json.priorIssuedAtMs,\n      authorizationFreshUntilMs: $json.priorFreshUntilMs,\n    },\n  },\n}) }}",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "11111111-1111-1111-1111-111111111120",
      "name": "BiDigest execute boundary (resume demo)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        260
      ]
    },
    {
      "parameters": {
        "jsCode": "const raw = $input.first().json;\nconst body = raw.legacy ?? raw.data ?? raw;\nconst allow_execute = body.allow_execute === true;\nreturn {\n  allow_execute,\n  code: body.code ?? (allow_execute ? 'EXECUTE_PERMITTED' : 'EXECUTE_BOUNDARY_BLOCKED'),\n  reason: body.reason ?? null,\n  user_message: allow_execute\n    ? 'Resume permitted after fresh verify.'\n    : `Execute boundary blocked (${body.reason ?? 'denied'}).`,\n  raw,\n};"
      },
      "id": "11111111-1111-1111-1111-111111111121",
      "name": "Map resume execute boundary",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        660,
        260
      ]
    }
  ],
  "connections": {
    "When invoice proposed": {
      "main": [
        [
          {
            "node": "Sample invoice (default → Human approval)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sample invoice (default → Human approval)": {
      "main": [
        [
          {
            "node": "BiDigest verify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BiDigest verify": {
      "main": [
        [
          {
            "node": "Map to agency verdict",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map to agency verdict": {
      "main": [
        [
          {
            "node": "Branch on verdict",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Branch on verdict": {
      "main": [
        [
          {
            "node": "BiDigest execute boundary",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [],
        []
      ]
    },
    "BiDigest execute boundary": {
      "main": [
        [
          {
            "node": "Map execute boundary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map execute boundary": {
      "main": [
        [
          {
            "node": "Route execute boundary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route execute boundary": {
      "main": [
        [
          {
            "node": "Payment demo (consequence)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "EXECUTE_BOUNDARY blocked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When resume blocked (demo)": {
      "main": [
        [
          {
            "node": "Resume blocked payload (demo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resume blocked payload (demo)": {
      "main": [
        [
          {
            "node": "BiDigest execute boundary (resume demo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BiDigest execute boundary (resume demo)": {
      "main": [
        [
          {
            "node": "Map resume execute boundary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "bidigest-protected-invoice-agent-v2"
  },
  "settings": {
    "executionOrder": "v1"
  }
}