Adding visual return when error
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user