public function generateWithSource($id,$idChain,$name,$output,array $options = []) {
        if(!$this->adapter){
            throw new RuntimeException(sprintf("The adapter must be set for enable this feature."));
        }
        $chainModel = $this->getChainModel($idChain);
        $className = $chainModel->getClassName();
        $entity = $this->adapter->find($chainModel->getClassName(),$id);
        if(!$entity){
            throw new RuntimeException(sprintf("The source '%s' with '%s' not found.",$className,$id));
        }
        $options["data"]["entity"] = $entity;
        $options["data"]["output"] = $output;
        $options["data"]["name"] = $this->trans($name,[],'labels');
        if($entity instanceof \Tecnocreaciones\Bundle\ToolsBundle\Service\SequenceGenerator\ItemReferenceInterface){
            $options["data"]["%ref%"] = $entity->getRef();
        }
        
        $options["sub_path"] = $id;
        return $this->generate($idChain, $name,$options);
    }