{
  "productInfo": {
    "company": "HighByte",
    "product": "IntelligenceHub",
    "version": "3.4.1",
    "build": "2024.4.12.1",
    "stage": "Release"
  },
  "project": {
    "version": 8,
    "connections": [],
    "inputs": [],
    "outputs": [],
    "modeling": {
      "models": [
        {
          "name": "Switch_KB_Model",
          "tags": [
            "Switch_KB"
          ],
          "attributes": [
            {
              "name": "attribute1",
              "type": "Any",
              "array": false,
              "required": false
            },
            {
              "name": "attribute2",
              "type": "Any",
              "array": false,
              "required": false
            }
          ]
        }
      ],
      "instances": [
        {
          "name": "Switch_KB_Instance",
          "tags": [
            "Switch_KB"
          ],
          "model": "Switch_KB_Model",
          "rootValueAs": "Object",
          "attributes": [
            {
              "name": "attribute1",
              "expression": "Math.floor(Math.random() * 101);"
            },
            {
              "name": "attribute2",
              "expression": "Math.floor(Math.random() * 101);"
            }
          ]
        }
      ]
    },
    "flows": [
      {
        "name": "Switch_KB_Flow",
        "tags": [
          "Switch_KB"
        ],
        "inReferences": [
          "{{Instance.Switch_KB_Instance}}"
        ],
        "outReferences": [
          "{{Pipeline.Switch_KB}}"
        ],
        "enabled": true,
        "publishMode": "All",
        "trigger": {
          "type": "Polled",
          "interval": {
            "duration": 5,
            "units": "Seconds"
          },
          "mode": "Always",
          "delay": {
            "duration": 0,
            "units": "Seconds"
          }
        }
      }
    ],
    "conditions": [],
    "functions": [],
    "tags": [],
    "pipelines": [
      {
        "name": "Switch_KB",
        "uri": "pipeline",
        "tags": [],
        "settings": {
          "inputStages": [
            "Switch_Example"
          ],
          "trackActivity": true,
          "stages": [
            {
              "name": "Switch_Example",
              "outputs": [
                "Transform",
                "Transform_1",
                "Transform_2"
              ],
              "config": {
                "type": ".SwitchConfig",
                "evaluationType": "onFirst",
                "switchCases": [
                  {
                    "expression": "if (event.value.attribute1 > 50 )\r\n    {\r\n        return true\r\n    }\r\nelse\r\n    {\r\n        return false\r\n    }",
                    "outputs": [
                      "Transform"
                    ],
                    "description": "Attribute1 greater than 50 "
                  },
                  {
                    "expression": "if (event.value.attribute1 < 50 && event.value.attribute2 < 50)\r\n    {\r\n        return true\r\n    }\r\nelse\r\n    {\r\n        return false\r\n    }",
                    "outputs": [
                      "Transform_1"
                    ],
                    "description": "Attribute1 < 50 && Attribute2 < 50"
                  },
                  {
                    "expression": "return true",
                    "outputs": [
                      "Transform_2"
                    ],
                    "description": "Catch All"
                  }
                ]
              },
              "display": {
                "position": {
                  "x": 0,
                  "y": 150
                }
              }
            },
            {
              "name": "Transform",
              "outputs": [],
              "config": {
                "type": ".TransformConfig",
                "transformExpression": "stage.setValue(event.value);"
              },
              "display": {
                "position": {
                  "x": -275,
                  "y": 350
                }
              }
            },
            {
              "name": "Transform_1",
              "outputs": [],
              "config": {
                "type": ".TransformConfig",
                "transformExpression": "stage.setValue(event.value);"
              },
              "display": {
                "position": {
                  "x": 0,
                  "y": 350
                }
              }
            },
            {
              "name": "Transform_2",
              "outputs": [],
              "config": {
                "type": ".TransformConfig",
                "transformExpression": "stage.setValue(event.value);"
              },
              "display": {
                "position": {
                  "x": 275,
                  "y": 350
                }
              }
            }
          ]
        }
      }
    ]
  },
  "network": {
    "groups": [],
    "hubs": []
  }
}