Skip to content

Commit

Permalink
zgw mapping fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Dec 19, 2024
1 parent 0cc81ad commit 922e9fc
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"resultaat": "{% if instance.outcome|default %}{% set data = {'outcome': instance.outcome, 'resultaattypen': zaaktype.resultaattypen} %}{{ executeMapping(2, data)|json_encode }}{% endif %}",
"rollen": "[{% if instance.route.instance.role|default %}{% set dataRol = {'requestor': instance.requestor, 'role': instance.route.instance.role, 'roltypen': zaaktype.roltypen} %}{{ executeMapping(3, dataRol)|json_encode }}{% endif %}]",
"status": "{% if instance.milestone|default %}{% set data = {'milestone': instance.milestone, 'statustypen': zaaktype.statustypen} %}{{ executeMapping(4, data)|json_encode }}{% endif %}",
"zaaktype": "{% if zaaktype['_self']['id']|default %}{{ zaaktype['_self']['id'] }}{% endif %}",
"zaaktype": "{% if zaaktype|default %}{{ executeMapping(7, zaaktype)|json_encode }}{% endif %}",
"eigenschappen": "[{% set index=0 %}{% if zaaktype.eigenschappen|default %}{% for key, attribute in instance.attributes %}{% if index != 0 %},{% endif %}{% set data = {'name': key, 'value': attribute, 'eigenschappen': zaaktype.eigenschappen} %}{% if attribute[0][0]|default and attribute[0][0] is iterable %}{{ attribute|json_encode }}{% else %}{{ executeMapping(5, data)|json_encode }}{% endif %}{% set index=index+1 %}{% endfor %}{% endif %}]",
"zaakinformatieobjecten": "[{% set index=0 %}{% if documents|default %}{% for document in documents %}{% if index != 0 %},{% endif %}{{ executeMapping(6, document)|json_encode }}{% set index=index+1 %}{% endfor %}{% endif %}]",
"zaakinformatieobjecten": "[{% set index=0 %}{% if documents.result.instance.rows|default %}{% for document in documents.result.instance.rows %}{% if index != 0 %},{% endif %}{{ executeMapping(6, document)|json_encode }}{% set index=index+1 %}{% endfor %}{% endif %}]",
"bronorganisatie": "bronorganisatie",
"verantwoordelijkeOrganisatie": "bronorganisatie",
"opschorting.indicatie": "{% if instance.stalled_until|default %}true{% else %}{% endif %}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
"referentieproces.naam": "preview",
"verantwoordelijke": "instance.properties.supervisor"
},
"unset": {
"identificatie": "unsetIfValue==instance.legacy.zaaktype_id"
},
"unset": [],
"cast": {
"identificatie": "unsetIfValue==instance.legacy.zaaktype_id",
"statustypen": "jsonToArray",
"informatieobjecttypen": "jsonToArray",
"eigenschappen": "jsonToArray",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
"name": "Xxllnc Document to ZGW ZaakInformatieObject",
"version": "0.0.1",
"mapping": {
"titel": "result.instance.name",
"registratiedatum": "result.instance.file.instance.date_created",
"informatieobject.identificatie": "result.instance.number",
"informatieobject.creatiedatum": "result.instance.file.instance.date_created",
"informatieobject.titel": "result.instance.name",
"informatieobject.vertrouwelijksheidaanduiding": "{% if result.instance.metadata.instance.trust_level|default %}{{ result.instance.metadata.instance.trust_level|lower }}{% endif %}",
"informatieobject.formaat": "result.instance.file.instance.mimetype",
"titel": "instance.name",
"registratiedatum": "instance.file.instance.date_created",
"informatieobject.identificatie": "instance.number",
"informatieobject.creatiedatum": "instance.file.instance.date_created",
"informatieobject.titel": "instance.name",
"informatieobject.vertrouwelijksheidaanduiding": "{% if instance.metadata.instance.trust_level|default %}{{ instance.metadata.instance.trust_level|lower }}{% endif %}",
"informatieobject.formaat": "instance.file.instance.mimetype",
"informatieobject.versie": "1",
"informatieobject.beginRegistratie": "result.instance.file.instance.date_modified",
"informatieobject.bestandsnaam": "result.instance.filename",
"informatieobject.bestandsomvang": "result.instance.file.instance.size",
"informatieobject.verschijningsvorm": "{% if result.instance.metadata.instance.category|default %}{{ result.instance.metadata.instance.category }}{% endif %}",
"informatieobject.integriteit.algoritme": "{% if result.instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ algoritme }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.waarde": "{% if result.instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ result.instance.file.instance[algoritme] }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.datum": "result.instance.file.instance.date_created",
"informatieobject.inhoud": "inhoud"
"informatieobject.beginRegistratie": "instance.file.instance.date_modified",
"informatieobject.bestandsnaam": "instance.filename",
"informatieobject.bestandsomvang": "instance.file.instance.size",
"informatieobject.verschijningsvorm": "{% if instance.metadata.instance.category|default %}{{ instance.metadata.instance.category }}{% endif %}",
"informatieobject.integriteit.algoritme": "{% if instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ algoritme }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.waarde": "{% if instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ result.instance.file.instance[algoritme] }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.datum": "instance.file.instance.date_created",
"informatieobject.inhoud": "{\"accessUrl\": \"{{ '/case/'~caseId~'/document/'~reference~'/download' }}\", \"source\": \"2\"}"
},
"unset": [],
"cast": {
"informatieobject.versie": "integer",
"informatieobject.bestandsomvang": "integer"
"informatieobject.bestandsomvang": "integer",
"informatieobject.inhoud": "jsonToArray"
},
"passTrough": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"roltype": "{% if role.instance.name|default %}{% for roltype in roltypen %}{% if roltype.omschrijvingGeneriek|lower == role.instance.name|lower %}{{ roltype['_self']['id'] }}{% endif %}{% endfor %}{% endif %}"
},
"unset": [],
"cast": [],
"cast": {
"roltype": "unsetIfValue==",
"betrokkeneIdentificatie": "unsetIfValue=="
},
"passTrough": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"endpoint": "\/case",
"query": [],
"headers.API-KEY": "",
"headers.API-Interface-ID": ""
"headers.API-Interface-ID": "",
"extraDataConfigs.0.staticEndpoint": "/case/{{ originId }}/document",
"extraDataConfigs.0.mergeExtraData": "true",
"extraDataConfigs.0.keyToSetExtraData": "documents",
"extraDataConfigs.0.resultsLocation": "result.instance.rows"
},
"currentPage": 1,
"targetId": "1\/1",
Expand Down

0 comments on commit 922e9fc

Please sign in to comment.