{
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "name": "ezGPT - Parent Order Check",
  "nodes": [
    {
      "id": "32cdd98f-98fe-4140-8492-bc8975cc82f0",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "parameters": {},
      "position": [
        0,
        0
      ]
    },
    {
      "id": "ddb948e1-e571-425d-9004-cf7b59fb1352",
      "name": "Test Orders",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{\n  \"orders\": [\n    {\n      \"order_id\": \"O1\",\n      \"client\": \"  Анна   Петрова \",\n      \"amount_minor\": \"150000\",\n      \"currency\": \"rub\"\n    },\n    {\n      \"order_id\": \"O2\",\n      \"client\": \"Борис\",\n      \"amount_minor\": 0,\n      \"currency\": \"RUB\"\n    },\n    {\n      \"order_id\": \"O3\",\n      \"client\": \"\",\n      \"amount_minor\": \"сумма\",\n      \"currency\": \"RUB\"\n    }\n  ]\n}",
        "options": {}
      },
      "position": [
        220,
        0
      ]
    },
    {
      "id": "ff874fcf-cbc5-45cc-ba1f-87d61931a1da",
      "name": "Split Orders",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "parameters": {
        "fieldToSplitOut": "orders",
        "include": "noOtherFields",
        "options": {}
      },
      "position": [
        440,
        0
      ]
    },
    {
      "id": "634a202f-050d-4335-ba8f-3cb16a5f3744",
      "name": "Call Order Check",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.4,
      "parameters": {
        "source": "database",
        "workflowId": {
          "__rl": true,
          "value": "CHILD_WORKFLOW_ID",
          "mode": "id"
        },
        "mode": "once",
        "options": {
          "waitForSubWorkflow": true
        }
      },
      "position": [
        660,
        0
      ]
    },
    {
      "id": "03e4cc38-deb1-42b4-abeb-525653250d14",
      "name": "Ready Check",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1a8e1494-9514-4f1b-ae68-911c13c0cea9",
              "leftValue": "={{ $json.status }}",
              "rightValue": "ready",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "position": [
        880,
        0
      ]
    },
    {
      "id": "2e0a9ea0-a604-4e6a-9890-6574feb88701",
      "name": "Ready Orders",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "position": [
        1100,
        -100
      ]
    },
    {
      "id": "508ed2c9-3438-477d-8542-2bdb0c2d5f14",
      "name": "Input Review",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "position": [
        1100,
        160
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Test Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Orders": {
      "main": [
        [
          {
            "node": "Split Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Orders": {
      "main": [
        [
          {
            "node": "Call Order Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Order Check": {
      "main": [
        [
          {
            "node": "Ready Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ready Check": {
      "main": [
        [
          {
            "node": "Ready Orders",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Input Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
