Validation)'; /** * Execute the console command. */ public function handle(PricelistFileProcessService $service): int { $id = $this->argument('id'); $pricelistFile = PricelistFile::find($id); if (!$pricelistFile) { $this->error("A(z) {$id} ID-vel rendelkező árlista fájl nem található."); return 1; } $this->info("Folyamat elindítása: {$pricelistFile->filename} (ID: {$id})"); $this->info("Workflow állapotok alaphelyzetbe állítása..."); try { $service->resetWorkflow($pricelistFile); $service->dispatchInitialChain($pricelistFile); $this->info("Az árlista feldolgozási lánc (Pre-process -> Validation) sikeresen ütemezve."); return 0; } catch (\Exception $e) { $this->error("Hiba történt a folyamat indításakor: " . $e->getMessage()); return 1; } } }