Skip to content

Commit

Permalink
Mapping fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Dec 19, 2024
1 parent 66ddae3 commit 9babc0d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"status": "{% if instance.milestone|default %}{% set data = {'milestone': instance.milestone, 'statustypen': zaaktype.statustypen} %}{{ executeMapping(4, data)|json_encode }}{% endif %}",
"zaaktype": "{% if casetype|default %}{{ executeMapping(5, casetype)|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(6, data)|json_encode }}{% endif %}{% 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(7, 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 %}{% set document = document|merge({'caseId': reference}) %}{% if index != 0 %},{% endif %}{{ executeMapping(7, 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 @@ -13,11 +13,6 @@
"publicatieIndicatie": "instance.properties.publication",
"omschrijving": "instance.title",
"opschortingEnAanhoudingMogelijk": "instance.properties.suspension",
"statustypen": "[{% for phase in instance.phases %}{% set phase = phase|merge({'_catalogus': _catalogus, '_zaaktypeIdentificatie': instance.legacy.zaaktype_id}) %}{% if not loop.first %},{% endif %}{{ executeMapping(7, phase)|json_encode }}{% endfor %}]",
"informatieobjecttypen": "[{% set index=0 %}{% for phase in instance.phases %}{% for field in phase.fields %}{% if field.type == 'file' %}{% set field = field|merge({'_catalogus': _catalogus, '_zaaktypeIdentificatie': instance.legacy.zaaktype_id}) %}{% if index != 0 %},{% endif %}{{ executMapping(8, field)|json_encode }}{% set index=index+1 %}{% endif %}{% endfor %}{% endfor %}]",
"eigenschappen": "[{% set index=0 %}{% for phase in instance.phases %}{% for field in phase.fields %}{% if field.type != 'file' %}{% set field = field|merge({'_catalogus': _catalogus, '_zaaktypeIdentificatie': instance.legacy.zaaktype_id}) %}{% if index != 0 %},{% endif %}{{ executMapping(9, field)|json_encode }}{% set index=index+1 %}{% endif %}{% endfor %}{% endfor %}]",
"roltypen": "[{% set index=0 %}{% for phase in instance.phases %}{% if phase.route.role|default %}{% set role = phase.route.role|merge({'_catalogus': _catalogus, '_zaaktypeIdentificatie': instance.legacy.zaaktype_id}) %}{% if index != 0 %},{% endif %}{{ executMapping(10, role)|json_encode }}{% set index=index+1 %}{% endif %}{% endfor %}]",
"resultaattypen": "[{% if instance.results|default %}{% for result in instance.results %}{% set result = result|merge({'_catalogus': _catalogus, '_zaaktypeIdentificatie': instance.legacy.zaaktype_id}) %}{% if not loop.first %},{% endif %}{{ executMapping(11, result)|json_encode }}{% endfor %}{% endif %}]",
"bronzaaktype.url": "url",
"bronzaaktype.identificatie": "reference",
"bronzaaktype.omschrijving": "instance.title",
Expand All @@ -26,12 +21,7 @@
},
"unset": [],
"cast": {
"identificatie": "unsetIfValue==instance.legacy.zaaktype_id",
"statustypen": "jsonToArray",
"informatieobjecttypen": "jsonToArray",
"eigenschappen": "jsonToArray",
"roltypen": "jsonToArray",
"resultaattypen": "jsonToArray"
"identificatie": "unsetIfValue==instance.legacy.zaaktype_id"
},
"passTrough": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"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\"}"
"informatieobject.inhoud": "{\"downloadUrl\": \"{{ 'https://xxllncapiv1/case/'~caseId~'/document/'~reference~'/download' }}\", \"source\": \"2\"}"
},
"unset": [],
"cast": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"idPosition": "reference",
"resultsPosition": "result.instance.rows",
"endpoint": "\/case",
"query": [],
"headers.API-KEY": "",
"headers.API-Interface-ID": "",
"query.zql": "select {} from case where case.casetype.id=",
"extraDataConfigs.0.staticEndpoint": "/case/{{ originId }}/document",
"extraDataConfigs.0.mergeExtraData": "true",
"extraDataConfigs.0.keyToSetExtraData": "documents",
Expand Down

0 comments on commit 9babc0d

Please sign in to comment.