public function registerFlow(FlowInterface $flow): FlowRegistryInterface
    {
        $flowId = $flow->getId();
        if (isset(static::$flows[$flowId])) {
            throw new NodalFlowException('Duplicate Flow instances are not allowed', 1, null, [