Skip to content

Commit

Permalink
Added text about document synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Oct 25, 2023
1 parent 228956a commit c5e6a6a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ These are all current commands, you can fetch your synchronized objects through

There are a lot of objects being synced from and to the xxllnc zaaksysteem to zgw objects. Here is a table of them.

Syncs from the zaaksysteem:
### From the zaaksysteem to the gateway:
| ZGW | Zaaksysteem | Mapping |
|----------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| BesluitType | casetype | [View on GitHub](https://github.com/CommonGateway/XxllncZGWBundle/blob/main/Installation/Mapping/XxllncBesluitTypeToZGWBesluitType.json) |
Expand All @@ -142,7 +142,16 @@ Syncs from the zaaksysteem:
All above synchronizations are triggered by cronjob or command. Note that all child objects you see from Zaak and ZaakType are synced during synchronization of Zaak or ZaakType.
Also read [commands](#commands) on how to execute certain synchronizations.

Syncs to the zaaksysteem:
#### Documents:
To fetch the documents of a case we have to do some extra api calls.

First we fetch all documents from a case on the v2 api `/document/search_document?case_uuid={id}` endpoint, this gives us the document numbers/identifications (not id) belonging to the currently syncing case.

Foreach document we fetch the document metadata info on the v1 api `/document/get_by_number/` endpoint to get the id. With that id we fetch the actual document on the v2 api `/document/download_document?id={id}` endpoint.
Then we have all info and data to map the documents to ZGW informatieobjecten and add them to the mapped Zaak.


### From the gateway to the zaaksysteem:
| Zaaksysteem | ZGW | Trigger | Mapping |
|-------------|------------------|---------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| case | Zaak | POST/PUT /zrc/zaken | [View on GitHub](https://github.com/CommonGateway/XxllncZGWBundle/blob/main/Installation/Mapping/XxllncZaakToCase.json) |
Expand Down

0 comments on commit c5e6a6a

Please sign in to comment.