Adding visual return when error

This commit is contained in:
2025-07-12 09:52:56 +02:00
parent d0f7536fa0
commit 2754312141
7 changed files with 163 additions and 76 deletions

View File

@@ -1,3 +1,4 @@
import enum
import logging
from dataclasses import dataclass, field
@@ -8,6 +9,15 @@ from core.settings_management import SettingsManager
logger = logging.getLogger("WorkflowsSettings")
class ComponentState(enum.Enum):
"""
Represents the execution state of a workflow component.
"""
SUCCESS = "success"
FAILURE = "failure"
NOT_RUN = "not_run"
# Data structures
@dataclass
class WorkflowComponent:
@@ -29,9 +39,13 @@ class Connection:
@dataclass
class WorkflowComponentRuntimeState:
"""
Represents the runtime state of a single workflow component.
"""
id: str
has_error: bool = False
error_message: str = ""
state: ComponentState = ComponentState.NOT_RUN
error_message: str | None = None
@dataclass
class WorkflowsDesignerSettings: