workflows.services.executors.factory¶
Factory and base types for workflow step executors.
Classes¶
Base class for all step executors. |
|
Registry-backed factory for step executors. |
Module Contents¶
- class workflows.services.executors.factory.AbstractStepExecutor[source]¶
Base class for all step executors.
- execute(instance, signal)[source]¶
Execute this step.
- Parameters:
instance (workflows.models.WorkflowInstance) – The workflow instance being advanced.
signal (str | None) – Optional external signal passed to the step.
- Returns:
The result of executing the step.
- Return type:
- do_execute(instance, signal)[source]¶
Actual execution hook implemented by concrete executors.
- Parameters:
instance (workflows.models.WorkflowInstance) – The workflow instance being advanced.
signal (str | None) – Optional external signal passed to the step.
- Returns:
The result of executing the step.
- Raises:
NotImplementedError – Always; subclasses must implement.
- Return type:
- class workflows.services.executors.factory.StepExecutorFactory[source]¶
Registry-backed factory for step executors.
- _registry: ClassVar[dict[str, type[AbstractStepExecutor]]][source]¶
- classmethod register(step_type, executor_cls)[source]¶
Register an executor class for a step type.
- Parameters:
step_type (str) – Identifier of the step type.
executor_cls (type[AbstractStepExecutor]) – Concrete executor class to instantiate for this type.
- Return type:
None