Open EduardWitteveen opened 3 years ago
After a short contact with @joeribekker we prefer to refactor the code and instead of paging, use the roltypes in the zaaktype and look for the name. Argumens: 1 - much less data and it's much better to predict how long it will take, 2 - possible caching will be easier to implenet, althrough its not preferd (from commonground perspective we dont want to store information somewhere) 3 - maybe in the future a expand attribute will be added in the zgw standard.
Caching is a technical implementation detail to gain performance. This is not what the Common Ground mantra meant with "request at the source" or "stop copying data".
If you work with the StUF standard, you can see that everything is copied from one source to another (like person data to a case, object data to a zaakobject, type information to a case, etc). This is what CG doesn't want.
page-ing problems can be expected at:
statustype can also be filtered on zaaktype, this would be a much better approach
Due to paging on on GET /zgw/catalogi/api/v1/roltypen , roltype's cannot be found when there are a lot of roltypes. It is expected that this error also occur for statustypes/informatieobjecttypes/...
There should at least be an error when the result-count is larger than the results received, also it could be more efficent to to retrieve the rollen/statussen from within the zaaktype.
Also, we need to know what the best approach is to get a Roltype by name for a specific Zaaktype: to retrieve it by retrieving all roltypes and selecting the correct one, or use the zaaktype and look for all the roltypes what the omschrijving is.
Example of zaaktype result (to find the roltype)
Example of roltype result (to find the roltype):