62 lines
2 KiB
Python
62 lines
2 KiB
Python
# Copyright (c) 2025 Patrick Motsch
|
|
# Canvas start nodes — variant reflects workflow configuration (gear in editor).
|
|
|
|
from modules.shared.i18nRegistry import t
|
|
|
|
TRIGGER_NODES = [
|
|
{
|
|
"id": "trigger.manual",
|
|
"category": "trigger",
|
|
"label": t("Start"),
|
|
"description": t("Manuell, API oder Hintergrund-Starts (Webhook, E-Mail, …)."),
|
|
"parameters": [],
|
|
"inputs": 0,
|
|
"outputs": 1,
|
|
"inputPorts": {},
|
|
"outputPorts": {0: {"schema": "ActionResult"}},
|
|
"executor": "trigger",
|
|
"meta": {"icon": "mdi-play", "color": "#4CAF50", "usesAi": False},
|
|
},
|
|
{
|
|
"id": "trigger.form",
|
|
"category": "trigger",
|
|
"label": t("Start (Formular)"),
|
|
"description": t("Felder werden beim Start befüllt; konfigurieren Sie die Felder auf dieser Node."),
|
|
"parameters": [
|
|
{
|
|
"name": "formFields",
|
|
"type": "json",
|
|
"required": False,
|
|
"frontendType": "fieldBuilder",
|
|
"description": t("Felddefinitionen"),
|
|
},
|
|
],
|
|
"inputs": 0,
|
|
"outputs": 1,
|
|
"inputPorts": {},
|
|
"outputPorts": {0: {"schema": {"kind": "fromGraph", "parameter": "formFields"}}},
|
|
"executor": "trigger",
|
|
"meta": {"icon": "mdi-form-select", "color": "#9C27B0", "usesAi": False},
|
|
},
|
|
{
|
|
"id": "trigger.schedule",
|
|
"category": "trigger",
|
|
"label": t("Start (Zeitplan)"),
|
|
"description": t("Cron-Ausdruck für geplante Läufe."),
|
|
"parameters": [
|
|
{
|
|
"name": "cron",
|
|
"type": "string",
|
|
"required": False,
|
|
"frontendType": "cron",
|
|
"description": t("Cron-Ausdruck"),
|
|
},
|
|
],
|
|
"inputs": 0,
|
|
"outputs": 1,
|
|
"inputPorts": {},
|
|
"outputPorts": {0: {"schema": "ActionResult"}},
|
|
"executor": "trigger",
|
|
"meta": {"icon": "mdi-clock", "color": "#2196F3", "usesAi": False},
|
|
},
|
|
]
|