From e0b69710a484789dd863836ab4da63395afb0ea4 Mon Sep 17 00:00:00 2001 From: Robert Zondervan Date: Fri, 9 Feb 2024 09:17:56 +0100 Subject: [PATCH] Stop running after a case has been made --- src/Service/ZaakService.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/Service/ZaakService.php b/src/Service/ZaakService.php index db69f48..96229cc 100644 --- a/src/Service/ZaakService.php +++ b/src/Service/ZaakService.php @@ -484,6 +484,7 @@ public function zaakHandler(?array $data = [], ?array $configuration = []) if (isset($data['caseId']) === true) { $this->getZaak($configuration, $data['caseId']); + return $data; } isset($this->style) === true && $this->zaakTypeService->setStyle($this->style); @@ -510,8 +511,6 @@ public function zaakHandler(?array $data = [], ?array $configuration = []) isset($this->style) === true && $this->style->success("Fetched $caseCount cases"); $this->logger->info("Fetched $caseCount cases"); - $createdZaakCount = 0; - $flushCount = 0; foreach ($xxllncCases as $case) { $event = new ActionEvent( 'commongateway.action.event', @@ -519,28 +518,8 @@ public function zaakHandler(?array $data = [], ?array $configuration = []) 'xxllnc.case.received' ); $this->eventDispatcher->dispatch($event, 'commongateway.action.event'); - - // if ($this->syncCase($case) instanceof ObjectEntity === false) { - // isset($this->style) === true && $this->style->error("Could not sync a case"); - // $this->logger->error("Could not sync a case"); - // - // continue; - // } - // - // $createdZaakCount = ($createdZaakCount + 1); - // $flushCount = ($flushCount + 1); - // - // Flush every 20 - // if ($flushCount == 20) { - // $this->entityManager->flush(); - // $this->entityManager->flush(); - // $flushCount = 0; - // }//end if }//end foreach - isset($this->style) === true && $this->style->success("Created $createdZaakCount zaken from the $caseCount fetched cases"); - $this->logger->info("Created $createdZaakCount zaken from the $caseCount fetched cases"); - }//end zaakHandler()