From c9e02a52da255a0e0d45c316203ae66944ba3000 Mon Sep 17 00:00:00 2001 From: Sarai Misidjan Date: Thu, 2 Nov 2023 12:36:23 +0100 Subject: [PATCH 1/5] updated zaaktype in action --- Installation/Action/waar.WaardepapierenZaakAction.action.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/Action/waar.WaardepapierenZaakAction.action.json b/Installation/Action/waar.WaardepapierenZaakAction.action.json index 0fcc504..bfef037 100644 --- a/Installation/Action/waar.WaardepapierenZaakAction.action.json +++ b/Installation/Action/waar.WaardepapierenZaakAction.action.json @@ -2,7 +2,7 @@ "title": "WaardepapierenZaakAction", "$id": "https://waardepapieren.commonground.nl/action/waar.WaardepapierenZaakAction.action.json", "$schema": "https://docs.commongateway.nl/schemas/Action.schema.json", - "version": "0.0.2", + "version": "0.0.3", "listens": ["kiss.notification"], "description": "This is a action to update a zaak with certificate.", "throws": ["send.bericht"], @@ -11,7 +11,7 @@ { "var": "body.kenmerken.zaaktype" }, - "https://open-zaak.test.buren.opengem.nl/catalogi/api/v1/zaaktypen/f0e9be33-10ae-43f1-bc1d-9f1bb4579fd4" + "https://open-zaak.test.buren.opengem.nl/catalogi/api/v1/zaaktypen/d156d2a1-34ea-4a47-ab3f-93ae65732e89" ] }, "class": "CommonGateway\\WaardepapierenBundle\\ActionHandler\\WPZaakHandler", From 00781a9b79ceb0637fd27a717a3df229ff81954b Mon Sep 17 00:00:00 2001 From: Sarai Misidjan Date: Thu, 2 Nov 2023 12:36:44 +0100 Subject: [PATCH 2/5] added gebruiksrecht mapping --- .../Mapping/zrc.gebruiksrechtUpstream.mapping.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Installation/Mapping/zrc.gebruiksrechtUpstream.mapping.json diff --git a/Installation/Mapping/zrc.gebruiksrechtUpstream.mapping.json b/Installation/Mapping/zrc.gebruiksrechtUpstream.mapping.json new file mode 100644 index 0000000..7b19cee --- /dev/null +++ b/Installation/Mapping/zrc.gebruiksrechtUpstream.mapping.json @@ -0,0 +1,12 @@ +{ + "title": "Gebruiksrecht", + "$id": "https://waardepapieren.commongateway.nl/mapping/drc.gebruiksrechtUpstream.mapping.json", + "$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json", + "version": "0.0.1", + "passTrough": false, + "mapping": { + "informatieobject": "informatieobject._self.synchronizations.0.sourceId", + "startdatum": "startdatum", + "omschrijvingVoorwaarden": "omschrijvingVoorwaarden" + } +} From 19ea7d69466ff736475f96aa9b424c6304a5f5a3 Mon Sep 17 00:00:00 2001 From: Sarai Misidjan Date: Thu, 2 Nov 2023 12:50:15 +0100 Subject: [PATCH 3/5] updated WPZaakService --- src/Service/WPZaakService.php | 137 ++++++++++++++++++++++++---------- 1 file changed, 99 insertions(+), 38 deletions(-) diff --git a/src/Service/WPZaakService.php b/src/Service/WPZaakService.php index 46ebc2c..e5fb949 100644 --- a/src/Service/WPZaakService.php +++ b/src/Service/WPZaakService.php @@ -105,14 +105,18 @@ public function __construct( * * @return bool Whether the synchronization has passed. * - * @throws LoaderError - * @throws SyntaxError + * @throws Exception|LoaderError|SyntaxError */ public function synchronizeUpstream(Synchronization $synchronization): bool { $data = $this->mappingService->mapping($synchronization->getMapping(), $synchronization->getObject()->toArray()); - $response = $this->callService->call($synchronization->getSource(), $synchronization->getEndpoint(), 'POST', ['json' => $data]); + try { + $response = $this->callService->call($synchronization->getSource(), $synchronization->getEndpoint(), 'POST', ['json' => $data]); + } catch (Exception $exception) { + throw new Exception($exception->getMessage()); + } + $updateObject = $this->callService->decodeResponse($synchronization->getSource(), $response); $synchronization->getObject()->hydrate($updateObject); @@ -143,13 +147,14 @@ public function synchronizeUpstream(Synchronization $synchronization): bool /** * Store information objects to an upstream source * - * @param ObjectEntity $informatieobject The information object to store + * @param ObjectEntity $informatieobject The information object to store * @param ObjectEntity $zaakinformatieobject The case-information-object to store - * @param ObjectEntity $zaak The case the objects belong to + * @param ObjectEntity $zaak The case the objects belong to * * @return bool Whether the synchronization has passed. + * @throws Exception */ - public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, ObjectEntity $zaakinformatieobject, ObjectEntity $zaak): bool + public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, ObjectEntity $zaakinformatieobject, ObjectEntity $gebruiksrecht, ObjectEntity $zaak): bool { if (count($zaak->getSynchronizations()) === 0) { return true; @@ -172,6 +177,22 @@ public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, Obj $result = $this->synchronizeUpstream($eioSync); + if ($result === false) { + return false; + } + + $gebruiksrechtSync = new Synchronization(); + $gebruiksrechtSync->setSource($drcSource); + $gebruiksrechtSync->setMapping($this->resourceService->getMapping('https://waardepapieren.commongateway.nl/mapping/drc.gebruiksrechtUpstream.mapping.json', 'common-gateway/waardepapieren-bundle')); + $gebruiksrechtSync->setEndpoint('/gebruiksrechten'); + $gebruiksrechtSync->setObject($gebruiksrecht); + + $this->entityManager->persist($gebruiksrechtSync); + $this->entityManager->flush(); + + $result = $this->synchronizeUpstream($gebruiksrechtSync); + + if ($result === false) { return false; } @@ -195,11 +216,12 @@ public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, Obj /** * Store information objects to an upstream source * - * @param string $data - * @param ObjectEntity $zaakObject The case as object. - * @param string $informatieobjecttypeUrl The url of the information object type that is related to the case type. + * @param string $data + * @param ObjectEntity $zaakObject The case as object. + * @param string $informatieobjecttypeUrl The url of the information object type that is related to the case type. * * @return void Whether the synchronization has passed. + * @throws Exception */ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, string $informatieobjecttypeUrl): void { @@ -215,7 +237,7 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st 'auteur' => 'Common Gateway', 'taal' => 'NLD', 'bestandsnaam' => 'waardepapier.pdf', - 'versie' => null, + 'versie' => null ]; $informationObjectSchema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/drc.enkelvoudigInformatieObject.schema.json', 'common-gateway/waardepapieren-bundle'); @@ -229,6 +251,24 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st $this->entityManager->persist($informationObject); $this->entityManager->flush(); + + $gebruiksrechtSchema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/drc.gebruiksrecht.schema.json', 'common-gateway/waardepapieren-bundle'); + if ($gebruiksrechtSchema === null) { + return; + } + + $gebruiksrechtArray = [ + 'informatieobject' => $informationObject, + 'startdatum' => $now->format('c'), + 'omschrijvingVoorwaarden' => 'Voorwaarden', + ]; + + $gebruiksrecht = new ObjectEntity($gebruiksrechtSchema); + + $gebruiksrecht->hydrate($gebruiksrechtArray); + $this->entityManager->persist($gebruiksrecht); + $this->entityManager->flush(); + $caseInformationObjectSchema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/zrc.zaakInformatieObject.schema.json', 'common-gateway/waardepapieren-bundle'); if ($caseInformationObjectSchema === null) { return; @@ -244,7 +284,7 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st $this->entityManager->persist($caseInformationObject); $this->entityManager->flush(); - $this->storeWaardepapierInSourceDRC($informationObject, $caseInformationObject, $zaakObject); + $this->storeWaardepapierInSourceDRC($informationObject, $caseInformationObject, $gebruiksrecht, $zaakObject); }//end saveWaardepapierInDRC() @@ -252,7 +292,6 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st /** * Gets the zaaktype from the given zaak * - * @param ObjectEntity $zaak The zaak object. * @param string $objectUrl The url of the zaaktype. * @param string $schemaRef The reference of the schema * @param string $endpoint The endpoint @@ -260,7 +299,7 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st * @return ObjectEntity|null The zaaktype of the given source * @throws Exception */ - public function getZaaktypeSubObjects(ObjectEntity $zaak, string $objectUrl, string $schemaRef, string $endpoint): ?ObjectEntity + public function getZaaktypeSubObjects(string $objectUrl, string $schemaRef, string $endpoint): ?ObjectEntity { // Get zaaktype schema. $schema = $this->resourceService->getSchema($schemaRef, 'common-gateway/waardepapieren-bundle'); @@ -274,6 +313,10 @@ public function getZaaktypeSubObjects(ObjectEntity $zaak, string $objectUrl, str } } + if (isset($objectId) === false) { + return null; + } + // Check if we have a zaaktype with findSyncByObject. $objectSync = $this->syncService->findSyncBySource($source, $schema, $objectId); @@ -304,35 +347,35 @@ public function getZaaktypeSubObjects(ObjectEntity $zaak, string $objectUrl, str /** * Gets the zaaktype from the given zaak * - * @param array $response The response of the call - * @param ObjectEntity $zaak The zaak object + * @param array $response The response of the call * * @return array The zaaktype of the given source + * @throws Exception */ - public function getSubobjects(array $response, ObjectEntity $zaak): array + public function getSubobjects(array $response): array { foreach ($response['informatieobjecttypen'] as $infoObjectType) { - $info = $this->getZaaktypeSubObjects($zaak, $infoObjectType, 'https://vng.opencatalogi.nl/schemas/ztc.informatieObjectType.schema.json', '/informatieobjecttypen'); + $info = $this->getZaaktypeSubObjects($infoObjectType, 'https://vng.opencatalogi.nl/schemas/ztc.informatieObjectType.schema.json', '/informatieobjecttypen'); $response['informatieobjecttypen'][] = $info; } foreach ($response['eigenschappen'] as $eigenschap) { - $eigenschapObject = $this->getZaaktypeSubObjects($zaak, $eigenschap, 'https://vng.opencatalogi.nl/schemas/ztc.eigenschap.schema.json', '/eigenschappen'); + $eigenschapObject = $this->getZaaktypeSubObjects($eigenschap, 'https://vng.opencatalogi.nl/schemas/ztc.eigenschap.schema.json', '/eigenschappen'); $response['eigenschappen'][] = $eigenschapObject; } foreach ($response['roltypen'] as $roltype) { - $roltypeObject = $this->getZaaktypeSubObjects($zaak, $roltype, 'https://vng.opencatalogi.nl/schemas/ztc.rolType.schema.json', '/roltypen'); + $roltypeObject = $this->getZaaktypeSubObjects($roltype, 'https://vng.opencatalogi.nl/schemas/ztc.rolType.schema.json', '/roltypen'); $response['roltypen'][] = $roltypeObject; } foreach ($response['statustypen'] as $statustype) { - $statustypeObject = $this->getZaaktypeSubObjects($zaak, $statustype, 'https://vng.opencatalogi.nl/schemas/ztc.statusType.schema.json', '/statustypen'); + $statustypeObject = $this->getZaaktypeSubObjects($statustype, 'https://vng.opencatalogi.nl/schemas/ztc.statusType.schema.json', '/statustypen'); $response['statustypen'][] = $statustypeObject; } foreach ($response['resultaattypen'] as $resultaattype) { - $resultaattypeObject = $this->getZaaktypeSubObjects($zaak, $resultaattype, 'https://vng.opencatalogi.nl/schemas/ztc.resultaatType.schema.json', '/resultaattype'); + $resultaattypeObject = $this->getZaaktypeSubObjects($resultaattype, 'https://vng.opencatalogi.nl/schemas/ztc.resultaatType.schema.json', '/resultaattypen'); $response['resultaattypen'][] = $resultaattypeObject; } @@ -344,13 +387,12 @@ public function getSubobjects(array $response, ObjectEntity $zaak): array /** * Gets the zaaktype from the given zaak * - * @param ObjectEntity $zaak The zaak object. * @param string $zaaktypeUrl The url of the zaaktype. * * @return ObjectEntity|null The zaaktype of the given source * @throws Exception */ - public function getZaaktypeFromSource(ObjectEntity $zaak, string $zaaktypeUrl): ?ObjectEntity + public function getZaaktypeFromSource(string $zaaktypeUrl): ?ObjectEntity { // Get zaaktype schema. $schema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/ztc.zaakType.schema.json', 'common-gateway/waardepapieren-bundle'); @@ -358,12 +400,17 @@ public function getZaaktypeFromSource(ObjectEntity $zaak, string $zaaktypeUrl): // Get the uuid from the zaaktype url. $explodedUrl = explode('/', $zaaktypeUrl); + $zaaktypeId = null; foreach ($explodedUrl as $item) { if (Uuid::isValid($item)) { $zaaktypeId = $item; } } + if ($zaaktypeId === null) { + return null; + } + // Check if we have a zaaktype with findSyncByObject. $zaaktypeSync = $this->syncService->findSyncBySource($source, $schema, $zaaktypeId); @@ -375,7 +422,7 @@ public function getZaaktypeFromSource(ObjectEntity $zaak, string $zaaktypeUrl): } $response = $this->callService->decodeResponse($source, $response); - $response = $this->getSubobjects($response, $zaak); + $response = $this->getSubobjects($response); $zaaktypeSync = $this->syncService->synchronize($zaaktypeSync, $response); $this->entityManager->flush(); @@ -426,9 +473,7 @@ public function storeInSourceZRC(ObjectEntity $resultaat, ObjectEntity $status, $this->entityManager->persist($statusSync); $this->entityManager->flush(); - $result = $this->synchronizeUpstream($statusSync); - - return $result; + return $this->synchronizeUpstream($statusSync); }//end storeInSourceZRC() @@ -519,9 +564,10 @@ public function saveInZRC(ObjectEntity $zaakObject, ObjectEntity $zaaktype): voi public function getZaakFromSource(ObjectEntity $zaak): ?ObjectEntity { $source = $this->resourceService->getSource($this->configuration['zrcSource'], 'common-gateway/waardepapieren-bundle'); + $zaakSync = $zaak->getSynchronizations()->first(); try { - $response = $this->callService->call($source, '/zaken'); + $response = $this->callService->call($source, '/zaken/'.$zaakSync->getSourceId()); } catch (Exception $exception) { throw new Exception($exception->getMessage()); } @@ -545,10 +591,11 @@ public function getZaakFromSource(ObjectEntity $zaak): ?ObjectEntity * Creates a certificate for a ZGW Zaak. * This action is triggered by a notification. * - * @param array $data Data from the handler where the xxllnc casetype is in. + * @param array $data Data from the handler where the xxllnc casetype is in. * @param array $configuration Configuration for the Action. * * @return array $this->data Zaak which we updated with new data + * @throws Exception */ public function wpZaakHandler(array $data, array $configuration): array { @@ -565,12 +612,17 @@ public function wpZaakHandler(array $data, array $configuration): array $zaakUrl = $this->data['body']['resourceUrl']; // Get the uuid from the zaaktype url. $explodedUrl = explode('/', $zaakUrl); + $zaakId = null; foreach ($explodedUrl as $item) { if (Uuid::isValid($item)) { $zaakId = $item; } } + if ($zaakId === null) { + return $this->data; + } + // Find the zaak object through the source and sourceId. $zaakSync = $this->syncService->findSyncBySource($source, $schema, $zaakId); if (($zaakObject = $zaakSync->getObject()) === null) { @@ -579,19 +631,30 @@ public function wpZaakHandler(array $data, array $configuration): array $zaak = $zaakObject->toArray(['embedded' => true]); - // Get the zaaktype from the source with the url from the zaak. - $zaaktype = $zaakObject->getValue('zaaktype'); - $zaaktypeSync = $zaaktype->getSynchronizations()->first(); - $zaaktypeUrl = $zaaktypeSync->getSourceId(); + if (is_string($zaak['zaaktype']) === true) { + $zaaktypeUrl = $zaak['zaaktype']; + } + + if (is_string($zaak['zaaktype']) === false) { + // Get the zaaktype from the source with the url from the zaak. + $zaaktype = $zaakObject->getValue('zaaktype'); + $zaaktypeSync = $zaaktype->getSynchronizations()->first(); + $zaaktypeUrl = $zaaktypeSync->getSourceId(); + } + + if (isset($zaaktypeUrl) === false) { + return $this->data; + } - $zaaktype = $this->getZaaktypeFromSource($zaakObject, $zaaktypeUrl); + $zaaktype = $this->getZaaktypeFromSource($zaaktypeUrl); // Get the informatieobjecttypen of the zaaktype to set to the enkelvoudiginformatieobject. $informatieobjecttypen = $zaaktype->getValue('informatieobjecttypen'); $informatieobjecttypeUrl = $informatieobjecttypen[0]->getValue('url'); // TODO: how do we know which we need to get? // Fill certificate with persons information and/or zaak. - $certificate = $this->downloadService->downloadPdf($zaak); + $message['message'] = 'Waardepapier aangemaakt voor zaak met id: '.$zaakObject->getId()->toString(); + $certificate = $this->downloadService->downloadPdf($message); // Store waardepapier in DRC source. $this->saveWaardepapierInDRC($certificate, $zaakObject, $informatieobjecttypeUrl); @@ -603,10 +666,8 @@ public function wpZaakHandler(array $data, array $configuration): array $zaak = $this->getZaakFromSource($zaakObject); // Set the zaak as response in the dataArray response. - $dataArray['response'] = new Response(json_encode($zaak), 200); + $this->data['response'] = new Response(json_encode($zaak->toArray()), 200); - // Create a certificate for the case. - // $this->waardepapierService->waardepapierHandler($dataArray, $this->configuration); return $this->data; }//end wpZaakHandler() From f95755a22e8455afe67ad09d944335873d25e8d8 Mon Sep 17 00:00:00 2001 From: GitHub Actions <> Date: Thu, 2 Nov 2023 11:50:45 +0000 Subject: [PATCH 4/5] Update src from PHP Codesniffer --- src/Service/WPZaakService.php | 38 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/Service/WPZaakService.php b/src/Service/WPZaakService.php index e5fb949..bfe65db 100644 --- a/src/Service/WPZaakService.php +++ b/src/Service/WPZaakService.php @@ -112,7 +112,7 @@ public function synchronizeUpstream(Synchronization $synchronization): bool $data = $this->mappingService->mapping($synchronization->getMapping(), $synchronization->getObject()->toArray()); try { - $response = $this->callService->call($synchronization->getSource(), $synchronization->getEndpoint(), 'POST', ['json' => $data]); + $response = $this->callService->call($synchronization->getSource(), $synchronization->getEndpoint(), 'POST', ['json' => $data]); } catch (Exception $exception) { throw new Exception($exception->getMessage()); } @@ -147,9 +147,9 @@ public function synchronizeUpstream(Synchronization $synchronization): bool /** * Store information objects to an upstream source * - * @param ObjectEntity $informatieobject The information object to store + * @param ObjectEntity $informatieobject The information object to store * @param ObjectEntity $zaakinformatieobject The case-information-object to store - * @param ObjectEntity $zaak The case the objects belong to + * @param ObjectEntity $zaak The case the objects belong to * * @return bool Whether the synchronization has passed. * @throws Exception @@ -192,7 +192,6 @@ public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, Obj $result = $this->synchronizeUpstream($gebruiksrechtSync); - if ($result === false) { return false; } @@ -216,9 +215,9 @@ public function storeWaardepapierInSourceDRC(ObjectEntity $informatieobject, Obj /** * Store information objects to an upstream source * - * @param string $data - * @param ObjectEntity $zaakObject The case as object. - * @param string $informatieobjecttypeUrl The url of the information object type that is related to the case type. + * @param string $data + * @param ObjectEntity $zaakObject The case as object. + * @param string $informatieobjecttypeUrl The url of the information object type that is related to the case type. * * @return void Whether the synchronization has passed. * @throws Exception @@ -237,7 +236,7 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st 'auteur' => 'Common Gateway', 'taal' => 'NLD', 'bestandsnaam' => 'waardepapier.pdf', - 'versie' => null + 'versie' => null, ]; $informationObjectSchema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/drc.enkelvoudigInformatieObject.schema.json', 'common-gateway/waardepapieren-bundle'); @@ -251,15 +250,14 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st $this->entityManager->persist($informationObject); $this->entityManager->flush(); - $gebruiksrechtSchema = $this->resourceService->getSchema('https://vng.opencatalogi.nl/schemas/drc.gebruiksrecht.schema.json', 'common-gateway/waardepapieren-bundle'); if ($gebruiksrechtSchema === null) { return; } $gebruiksrechtArray = [ - 'informatieobject' => $informationObject, - 'startdatum' => $now->format('c'), + 'informatieobject' => $informationObject, + 'startdatum' => $now->format('c'), 'omschrijvingVoorwaarden' => 'Voorwaarden', ]; @@ -292,9 +290,9 @@ public function saveWaardepapierInDRC(string $data, ObjectEntity $zaakObject, st /** * Gets the zaaktype from the given zaak * - * @param string $objectUrl The url of the zaaktype. - * @param string $schemaRef The reference of the schema - * @param string $endpoint The endpoint + * @param string $objectUrl The url of the zaaktype. + * @param string $schemaRef The reference of the schema + * @param string $endpoint The endpoint * * @return ObjectEntity|null The zaaktype of the given source * @throws Exception @@ -387,7 +385,7 @@ public function getSubobjects(array $response): array /** * Gets the zaaktype from the given zaak * - * @param string $zaaktypeUrl The url of the zaaktype. + * @param string $zaaktypeUrl The url of the zaaktype. * * @return ObjectEntity|null The zaaktype of the given source * @throws Exception @@ -400,7 +398,7 @@ public function getZaaktypeFromSource(string $zaaktypeUrl): ?ObjectEntity // Get the uuid from the zaaktype url. $explodedUrl = explode('/', $zaaktypeUrl); - $zaaktypeId = null; + $zaaktypeId = null; foreach ($explodedUrl as $item) { if (Uuid::isValid($item)) { $zaaktypeId = $item; @@ -563,7 +561,7 @@ public function saveInZRC(ObjectEntity $zaakObject, ObjectEntity $zaaktype): voi */ public function getZaakFromSource(ObjectEntity $zaak): ?ObjectEntity { - $source = $this->resourceService->getSource($this->configuration['zrcSource'], 'common-gateway/waardepapieren-bundle'); + $source = $this->resourceService->getSource($this->configuration['zrcSource'], 'common-gateway/waardepapieren-bundle'); $zaakSync = $zaak->getSynchronizations()->first(); try { @@ -591,7 +589,7 @@ public function getZaakFromSource(ObjectEntity $zaak): ?ObjectEntity * Creates a certificate for a ZGW Zaak. * This action is triggered by a notification. * - * @param array $data Data from the handler where the xxllnc casetype is in. + * @param array $data Data from the handler where the xxllnc casetype is in. * @param array $configuration Configuration for the Action. * * @return array $this->data Zaak which we updated with new data @@ -612,7 +610,7 @@ public function wpZaakHandler(array $data, array $configuration): array $zaakUrl = $this->data['body']['resourceUrl']; // Get the uuid from the zaaktype url. $explodedUrl = explode('/', $zaakUrl); - $zaakId = null; + $zaakId = null; foreach ($explodedUrl as $item) { if (Uuid::isValid($item)) { $zaakId = $item; @@ -654,7 +652,7 @@ public function wpZaakHandler(array $data, array $configuration): array // TODO: how do we know which we need to get? // Fill certificate with persons information and/or zaak. $message['message'] = 'Waardepapier aangemaakt voor zaak met id: '.$zaakObject->getId()->toString(); - $certificate = $this->downloadService->downloadPdf($message); + $certificate = $this->downloadService->downloadPdf($message); // Store waardepapier in DRC source. $this->saveWaardepapierInDRC($certificate, $zaakObject, $informatieobjecttypeUrl); From f9157267902b595b431edc8e7b40676ebec4cd91 Mon Sep 17 00:00:00 2001 From: Sarai Misidjan Date: Thu, 2 Nov 2023 13:49:43 +0100 Subject: [PATCH 5/5] added kiss-bundle to composer.json --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 182ad51..ce34cb6 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,9 @@ "php": ">=7.4", "endroid/qr-code-bundle": "3.4", "common-gateway/template-bundle": ">=0.0", - "commongateway/corebundle": "^1.1.98", - "common-gateway/zgw-bundle": "^1.0.49" + "commongateway/corebundle": "^1.1.98", + "common-gateway/zgw-bundle": "^1.0.49", + "common-gateway/kiss-bundle": "^0.1.35" }, "require-dev" : { "symfony/dependency-injection" : "~3.4|~4.1|~5.0"