wearefrank / zaakbrug

An app for Dutch municipalities that supports the transition from "zaak- en documentatieservices" (zds) to "zaakgericht werken" (zgw).
https://zaakbrug.nl
European Union Public License 1.2
5 stars 5 forks source link

Implement geefLijstZaakdocumenten variant that uses a query to retrieve all documents on a zaak #270

Open MLenterman opened 8 months ago

MLenterman commented 8 months ago

We are noticing that retrieving enkelvoudiginformatieobjecten one by one on zaken with lots of documents can be quite slow when a DMS is configured through CMIS. To improve performance we would like to create a variation of the geefLijstZaakdocumenten action that relies more on queries.

The variant should be made on a copy of the existing geefLijstZaakdocumenten action with the same JavaListener name, so that it is possible to switch easily between the 2 implementations like a feature toggle. The implementations can be switched with the adapter's "active" properties in DeploymentSpecifics. By default the current implementation should be active.

Effectively after retrieving all ZaakInformatieObjecten on a zaak, instead of calling every url in the response separately, now it should combine them into 1 query (https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/stable/1.2.x/src/openapi.yaml#tag/enkelvoudiginformatieobjecten/operation/enkelvoudiginformatieobject__zoek). Then we can iterate over the result and retrieve the InformatieObjectType for each one.

MLenterman commented 8 months ago

Is not needed anymore if #271 gets implemented