Skip to content

Commit

Permalink
Sync cases on trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Feb 7, 2024
1 parent 8f8215f commit c9b7ec5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/ZaakCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->zaakService->setStyle($style);
$zaakId = $input->getArgument('id');

$action = $this->entityManager->getRepository('App:Action')->findOneBy(['reference' => 'https://development.zaaksysteem.nl/action/xxllnc.Zaak.action.json']);
$action = $this->entityManager->getRepository(Action::class)->findOneBy(['reference' => 'https://development.zaaksysteem.nl/action/xxllnc.Zaak.action.json']);
if ($action instanceof Action === null) {
$style->error('Action with reference https://development.zaaksysteem.nl/action/xxllnc.Zaak.action.json not found');

Check warning on line 97 in src/Command/ZaakCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 127 characters

Expand Down
6 changes: 5 additions & 1 deletion src/Service/ZaakService.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private function createFileEndpoints(ObjectEntity $zaak): void
*
* @return ObjectEntity The resulting zaak object.
*/
public function syncCase(array $case, bool $flush = true): ObjectEntity
public function syncCase(array $case, bool $flush = true): ?ObjectEntity
{
// 0. Get required config objects.
$zaakSchema = $this->resourceService->getSchema(
Expand Down Expand Up @@ -473,6 +473,10 @@ public function zaakHandler(?array $data = [], ?array $configuration = [])
return null;
}

if (isset($data['caseId']) === true) {
$this->getZaak($configuration, $data['caseId']);
}

isset($this->style) === true && $this->zaakTypeService->setStyle($this->style);

// Fetch the xxllnc cases.
Expand Down

0 comments on commit c9b7ec5

Please sign in to comment.