<?php

declare(strict_types=1);

namespace Drupal\flowdrop_runtime\Service\Orchestrator;

/**
 * For orchestrator plugins whose underlying service can execute pipelines.
 *
 * Orchestrator plugins live in flowdrop_orchestration, which must not depend
 * on flowdrop_runtime — so the plugin interface itself cannot reference
 * {@see PipelineExecutorInterface}. Plugins that wrap an executor-capable
 * service (provided by modules that already depend on flowdrop_runtime)
 * implement this interface instead, and {@see PipelineExecutorResolver}
 * duck-types against it when routing a pre-built pipeline to the executor
 * its workflow declared.
 *
 * @internal
 *   This class is not part of the public API and may change without notice.
 */
interface PipelineExecutorAwareInterface {

  /**
   * Returns the executor able to execute or resume an existing pipeline.
   *
   * @return \Drupal\flowdrop_runtime\Service\Orchestrator\PipelineExecutorInterface
   *   The pipeline executor backing this orchestrator plugin.
   */
  public function getPipelineExecutor(): PipelineExecutorInterface;

}
