workflows.services.executors.factory ==================================== .. py:module:: workflows.services.executors.factory .. autoapi-nested-parse:: Factory and base types for workflow step executors. Module Contents --------------- .. py:class:: AbstractStepExecutor Base class for all step executors. .. py:method:: execute(instance, signal) Execute this step. :param instance: The workflow instance being advanced. :param signal: Optional external signal passed to the step. :returns: The result of executing the step. .. py:method:: do_execute(instance, signal) Actual execution hook implemented by concrete executors. :param instance: The workflow instance being advanced. :param signal: Optional external signal passed to the step. :returns: The result of executing the step. :raises NotImplementedError: Always; subclasses must implement. .. py:class:: StepExecutorFactory Registry-backed factory for step executors. .. py:method:: register(step_type, executor_cls) :classmethod: Register an executor class for a step type. :param step_type: Identifier of the step type. :param executor_cls: Concrete executor class to instantiate for this type. .. py:method:: create(step_type) :classmethod: Create an executor for the given step type. :param step_type: Identifier of the step type. :returns: An instance of the registered executor class. :raises ValueError: If no executor is registered for ``step_type``. .. py:method:: registered_types() :classmethod: Return the set of registered step type identifiers.