<?php

declare(strict_types=1);

namespace Drupal\flowdrop\Plugin\FlowDropNodeProcessor;

/**
 * Marker interface for node processors that terminate a workflow.
 *
 * A terminal node is a workflow exit point: reaching it stops the run cleanly
 * (as COMPLETED), abandoning any nodes downstream of it. It is the outbound
 * dual of StartNodeProcessorInterface — where a start node is the graph's entry
 * boundary (the orchestrator selects it; nothing upstream fires it), a terminal
 * node is the exit boundary (the graph signals the orchestrator to end). Both
 * are the in-graph representation of orchestrator lifecycle signals rather than
 * ordinary processing nodes.
 *
 * A terminal node is expressed at both layers, mirroring the start node. At the
 * metadata layer the reserved trigger output port is suppressed (the dual of
 * suppressing the trigger input on a start node), so the editor offers no
 * outgoing flow edge. At the runtime layer its process() throws
 * WorkflowStopException, which orchestrators catch and map to a completed run.
 * This marker also lets the compiler/validator flag nodes wired after a
 * terminal node as unreachable.
 *
 * This interface is intentionally empty. It serves as a type marker detected
 * via instanceof/is_subclass_of, the same way StartNodeProcessorInterface is.
 *
 * Kept a flat sibling of StartNodeProcessorInterface: the two share a concept
 * (orchestrator-lifecycle boundary) but no implementation, and nothing needs to
 * treat "any boundary node" uniformly, so there is no shared parent interface.
 *
 * @see \Drupal\flowdrop\Plugin\FlowDropNodeProcessor\StartNodeProcessorInterface
 * @see \Drupal\flowdrop\Exception\WorkflowStopException
 *
 * @api
 */
interface TerminalNodeProcessorInterface {
}
