# Copyright (c) 2025 Patrick Motsch # Flow control node definitions. FLOW_NODES = [ { "id": "flow.ifElse", "category": "flow", "label": "Wenn / Sonst", "description": "Verzweigung nach Bedingung", "parameters": [ { "name": "condition", "type": "string", "required": True, "frontendType": "condition", "description": "Bedingung", }, ], "inputs": 1, "outputs": 2, "outputLabels": ["Ja", "Nein"], "inputPorts": {0: {"accepts": ["Transit"]}}, "outputPorts": {0: {"schema": "Transit"}, 1: {"schema": "Transit"}}, "executor": "flow", "meta": {"icon": "mdi-source-branch", "color": "#FF9800"}, }, { "id": "flow.switch", "category": "flow", "label": "Switch", "description": "Mehrere Zweige nach Wert", "parameters": [ { "name": "value", "type": "string", "required": True, "frontendType": "text", "description": "Zu vergleichender Wert", }, { "name": "cases", "type": "array", "required": False, "frontendType": "caseList", "description": "Fälle", }, ], "inputs": 1, "outputs": 1, "inputPorts": {0: {"accepts": ["Transit"]}}, "outputPorts": {0: {"schema": "Transit"}}, "executor": "flow", "meta": {"icon": "mdi-swap-horizontal", "color": "#FF9800"}, }, { "id": "flow.loop", "category": "flow", "label": "Schleife / Für Jedes", "description": "Über Array-Elemente iterieren", "parameters": [ { "name": "items", "type": "string", "required": True, "frontendType": "text", "description": "Pfad zum Array", }, ], "inputs": 1, "outputs": 1, "inputPorts": {0: {"accepts": ["Transit"]}}, "outputPorts": {0: {"schema": "LoopItem"}}, "executor": "flow", "meta": {"icon": "mdi-repeat", "color": "#FF9800"}, }, { "id": "flow.merge", "category": "flow", "label": "Zusammenführen", "description": "Mehrere Zweige zusammenführen", "parameters": [ { "name": "mode", "type": "string", "required": False, "frontendType": "select", "frontendOptions": {"options": ["first", "all", "append"]}, "description": "Zusammenführungsmodus", "default": "first", }, ], "inputs": 2, "outputs": 1, "inputPorts": {0: {"accepts": ["Transit"]}, 1: {"accepts": ["Transit"]}}, "outputPorts": {0: {"schema": "MergeResult"}}, "executor": "flow", "meta": {"icon": "mdi-call-merge", "color": "#FF9800"}, }, ]