Source code for workflows.services.types
"""Types and results for workflow executors."""
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from workflows.models import State
@dataclass(frozen=True)
[docs]
class ExecutorResult:
"""Result returned by a step executor.
Attributes:
status: Workflow state guiding engine behavior.
context: Optional structured data to persist for this step (will be compacted).
vars: Optional nested dict to merge into the instance-global ctx.vars
(stored under step_contexts["$vars"]).
"""
[docs]
context: dict[str, Any] | None = None
[docs]
vars: dict[str, Any] | None = None