Skip to content

Commit

Permalink
Merge branch 'master' into GT-1573-ValidateAndFixLarvaTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Meric Akgul committed Dec 17, 2024
2 parents 06a4006 + 01fe7cf commit 7d5c8cd
Show file tree
Hide file tree
Showing 27 changed files with 8,830 additions and 147 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)

## [1.22.7](https://github.com/wearefrank/zaakbrug/compare/v1.22.6...v1.22.7) (2024-12-17)

### 🐛 Bug Fixes

* heeftBetrekkingOpAndere does not respect verwerkingssoort causing duplicates and inability to delete gerelateerde zaken ([7243e0f](https://github.com/wearefrank/zaakbrug/commit/7243e0f20a668037cf657d19823d83e19ada908a))
* remove bezoekadres/verblijfadres from role matching between ZDS and ZGW due to situational dataloss in translation ([#478](https://github.com/wearefrank/zaakbrug/issues/478)) ([98a24c4](https://github.com/wearefrank/zaakbrug/commit/98a24c4f0c6492245a27fb20c11302adda04a2f3))
* remove relevanteAndereZaken from updateZaak request cause it is handled separately ([90c51b0](https://github.com/wearefrank/zaakbrug/commit/90c51b039a02b984d1875091ce490d423ba866d5))
* update verwerkingssoort letter of heeftBetrekkingOpAndere in creeerZaak from W to T ([8a849c1](https://github.com/wearefrank/zaakbrug/commit/8a849c12025bdd8dfada24d90831913461612db2))
* updateZaak with multiple heeftBetrekkingOpAndere already on the case results in error ([663516b](https://github.com/wearefrank/zaakbrug/commit/663516b48f335744326d164a941db86187c588fc))

### 🧑‍💻 Code Refactoring

* generalize ZDS roles was and wordt merger xslt to support merging all root aggregates ([2131767](https://github.com/wearefrank/zaakbrug/commit/213176726ec9e8c462019c71bd051d893370be49))
* Used PostZgwZaak.xsd instead of AndereZaakBodyToJson.xsd + used XmlSwitchPipe instead of XmlIfPipe in CheckVerwerkingssoortAttribute + used Zaken_UpdateZgwZaak for patch request ([017bfd9](https://github.com/wearefrank/zaakbrug/commit/017bfd97776151c5f5eb726a8ed61076202fc949))

### ✅ Tests

* **e2e:** add variety of e2e testcases for testing heeftBetrekkingOpAndere behavior ([757f127](https://github.com/wearefrank/zaakbrug/commit/757f127eacd8184bfd86ea99614b5ca367625904))
* **larva:** cleanup old broken Larva testcases that are now replaced by SoapUI end-2-end testcases ([#480](https://github.com/wearefrank/zaakbrug/issues/480)) ([934e839](https://github.com/wearefrank/zaakbrug/commit/934e8391a1bf4b10a8c116e4a6d95b6c0fac2498))
* **unit:** MergeZdsWasAndWordt Larva testcases ([6bf6159](https://github.com/wearefrank/zaakbrug/commit/6bf61597fdd8ee872f6ff205d30efc2efad26853))

## [1.22.6](https://github.com/wearefrank/zaakbrug/compare/v1.22.5...v1.22.6) (2024-12-06)

### 🐛 Bug Fixes
Expand Down
7,925 changes: 7,923 additions & 2 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main/configurations/Translate/Configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<!ENTITY MapZdsRelevanteAndereZaakFromZgwRelevanteAndereZaken SYSTEM "./Configuration_MapZdsRelevanteAndereZaakFromZgwRelevanteAndereZaken.xml">
<!ENTITY MapZdsRolFromZgwRol SYSTEM "./Configuration_MapZdsRolFromZgwRol.xml">
<!ENTITY PatchRelevanteAndereZaak SYSTEM "./Configuration_PatchRelevanteAndereZaak.xml">
<!ENTITY PatchRelevanteAndereZaakDelete SYSTEM "./Configuration_PatchRelevanteAndereZaakDelete.xml">
<!ENTITY PostResultaat SYSTEM "./Configuration_PostResultaat.xml">
<!ENTITY Zaken_PostZgwRol SYSTEM "./Configuration_Zaken_PostZgwRol.xml">
<!ENTITY Zaken_PostZgwStatus SYSTEM "./Configuration_Zaken_PostZgwStatus.xml">
Expand Down Expand Up @@ -135,6 +136,7 @@
&MapZdsRelevanteAndereZaakFromZgwRelevanteAndereZaken;
&MapZdsRolFromZgwRol;
&PatchRelevanteAndereZaak;
&PatchRelevanteAndereZaakDelete;
&PostResultaat;
&Zaken_PostZgwRol;
&Zaken_PostZgwStatus;
Expand Down
44 changes: 42 additions & 2 deletions src/main/configurations/Translate/Configuration_AndereZaak.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,52 @@
<XmlIfPipe name="CheckForGetZgwAndereZaakResult"
xpathExpression="string-length(ZgwZaak) > 0"
>
<Forward name="then" path="CallPatchAndereZaak"/>
<Forward name="then" path="CheckVerwerkingssoortAttribute"/>
<Forward name="else" path="EXIT"/>
</XmlIfPipe>

<XmlSwitchPipe
name="CheckVerwerkingssoortAttribute"
getInputFromSessionKey="originalMessage"
xpathExpression="*/@*:verwerkingssoort"
notFoundForwardName="unimplemented">
<Forward name="I" path="CallPatchAndereZaak" />
<Forward name="T" path="CallPatchAndereZaak" />
<Forward name="V" path="CallPatchAndereZaakDelete" />
<Forward name="unimplemented" path="UnrecognizedVerwerkingssoort_Error" />
</XmlSwitchPipe>

<XsltPipe
name="UnrecognizedVerwerkingssoort_Error"
getInputFromFixedValue="&lt;dummy/&gt;"
styleSheetName="Common/xsl/BuildError.xsl"
storeResultInSessionKey="Error"
>
<Param name="cause" sessionKey="Error" type="DOMDOC" />
<Param name="code" value="TechnicalError" />
<Param name="reason" pattern="The value of verwerkingssoort attribute of heeftBetrekkingOpAndere is either not allowed nor not implemented yet." ignoreUnresolvablePatternElements="true" />
<Param name="detailsXml" type="DOMDOC" />
<Forward name="success" path="EXCEPTION" />
<Forward name="exception" path="EXCEPTION" />
</XsltPipe>

<SenderPipe
name="CallPatchAndereZaakDelete"
getInputFromSessionKey="ZgwAndereZaakResult">
<IbisLocalSender
name="CallPatchAndereZaakDeleteSender"
javaListener="PatchRelevanteAndereZaakDelete"
returnedSessionKeys="Error">
<Param name="Url" xpathExpression="/ZgwZaak/url" defaultValue="&lt;dummy/&gt;" />
<Param name="AndereUrlToDelete" sessionKey="Url" defaultValue="''"/>
</IbisLocalSender>
<Forward name="success" path="JsonToXml"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<SenderPipe
name="CallPatchAndereZaak" getInputFromSessionKey="ZgwAndereZaakResult">
name="CallPatchAndereZaak"
getInputFromSessionKey="ZgwAndereZaakResult">
<IbisLocalSender
name="CallPatchAndereZaakSender"
javaListener="PatchRelevanteAndereZaak"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<SenderPipe name="GetAuthorizationHeaderForZakenApi"
getInputFromFixedValue="&lt;dummy/&gt;">
<IbisLocalSender
name="GetAuthorizationHeaderForZakenApiSender"
javaListener="GenerateAuthorizationHeaderForZakenApi"
returnedSessionKeys="Error,Authorization">
</IbisLocalSender>
<Forward name="success" path="CreatePatchZaakBody" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<XsltPipe
name="CreatePatchZaakBody"
getInputFromSessionKey="originalMessage"
Expand All @@ -32,43 +21,22 @@
>
<Param name="AndereUrl" sessionKey="AndereUrl"/>
<Param name="AndereUrls" sessionKey="AndereUrls" type="DOMDOC"/>
<Forward name="success" path="XmlToJson"/>
<Forward name="success" path="PatchRelevanteAndereZaak"/>
</XsltPipe>

<Json2XmlValidatorPipe
name="XmlToJson"
root="container"
schema="CreeerZaak_LK01/xsd/AndereZaakBodyToJson.xsd"
outputFormat="JSON"
compactJsonArrays="false"
throwException="true">
<Forward name="success" path="PatchZaak" />
</Json2XmlValidatorPipe>

<SenderPipe name="PatchZaak">
<HttpSender
name="PatchZaakSender"
methodType="PATCH"
headersParams="Authorization,Accept-Crs,Content-Crs"
contentType="application/json"
timeout="${zaakbrug.zgw.zaken-api.timeout}"
maxExecuteRetries="5"
/>
<Param name="url" sessionKey="Url"/>
<Param name="Accept-Crs" value="EPSG:4326"/>
<Param name="Content-Crs" value="EPSG:4326"/>
<Param name="Authorization" sessionKey="Authorization" />
<SenderPipe
name="PatchRelevanteAndereZaak"
>
<IbisLocalSender
name="CallUpdateZgwZaakSender"
javaListener="Zaken_UpdateZgwZaak"
returnedSessionKeys="Error"
>
<Param name="Url" sessionKey="Url" />
</IbisLocalSender>
<Forward name="success" path="EXIT" />
<Forward name="exception" path="ErrorJsonToXml" />
</SenderPipe>
<JsonPipe name="ErrorJsonToXml">
<Forward name="success" path="buildErrorMsg" />
</JsonPipe>
<XsltPipe name="buildErrorMsg"
styleSheetName="Common/xsl/ParseNegativeHttpResult.xsl">
<Param name="senderPipeName" value="PatchZaak" />
<Forward name="success" path="EXCEPTION" />
</XsltPipe>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

</Pipeline>
</Adapter>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<Module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../FrankConfig.xsd">
<Adapter name="PatchRelevanteAndereZaakDelete"
active="${PatchRelevanteAndereZaakDelete.Active}"
description="">

<Receiver name="PatchRelevanteAndereZaakDelete">
<JavaListener name="PatchRelevanteAndereZaakDelete" returnedSessionKeys="Error" />
</Receiver>

<Pipeline>
<Exits>
<Exit name="EXIT" state="SUCCESS"/>
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<XmlIfPipe name="CheckIfSingleAndereUrl"
getInputFromFixedValue="&lt;dummy/&gt;"
xpathExpression="$AndereUrlToDelete">
<Param name="AndereUrlToDelete" sessionKey="AndereUrlToDelete"/>
<Forward name="then" path="CheckIfZaakRelatedToAndereZaak" />
<Forward name="else" path="CreatePatchZaakBodyToDeleteAndereZaak" />
</XmlIfPipe>

<XmlIfPipe name="CheckIfZaakRelatedToAndereZaak"
getInputFromSessionKey="originalMessage"
xpathExpression="/ZgwZaak/relevanteAndereZaken/url = $AndereUrlToDelete">
<Param name="AndereUrlToDelete" sessionKey="AndereUrlToDelete"/>
<Forward name="then" path="CreatePatchZaakBodyToDeleteAndereZaak" />
<Forward name="else" path="LogWarningZaakNotRelated" />
</XmlIfPipe>

<SenderPipe
name="LogWarningZaakNotRelated"
>
<LogSender
name="LogWarningSender" />
<Forward name="success" path="EXIT" />
</SenderPipe>

<XsltPipe name="CreatePatchZaakBodyToDeleteAndereZaak"
getInputFromSessionKey="originalMessage"
styleSheetName="UpdateZaak_LK01/xsl/CreateZgwAndereZaakBodyToDelete.xslt"
>
<Param name="AndereUrlToDelete" sessionKey="AndereUrlToDelete"/>
<Param name="AndereUrlsToDelete" sessionKey="AndereUrlsToDelete" type="DOMDOC"/>
<Forward name="success" path="CheckIfRelevanteAndereZakenListEmpty"/>
</XsltPipe>

<XmlIfPipe name="CheckIfRelevanteAndereZakenListEmpty"
xpathExpression="count(ZgwZaak/relevanteAndereZaken) gt 0">
<Forward name="then" path="PatchRelevanteAndereZaak"/>
<Forward name="else" path="CreateEmptyRelevanteAndereZakenJson"/>
</XmlIfPipe>

<DataSonnetPipe name="CreateEmptyRelevanteAndereZakenJson"
styleSheetName="UpdateZaak_LK01/jsonnet/CreateEmptyRelevanteAndereZakenJson.jsonnet"
outputType="JSON"
storeResultInSessionKey="EmptyRelevanteAndereZakenJson">
<Forward name="success" path="PatchRelevanteAndereZaak" />
</DataSonnetPipe>

<SenderPipe
name="PatchRelevanteAndereZaak"
>
<IbisLocalSender
name="CallUpdateZgwZaakSender"
javaListener="Zaken_UpdateZgwZaak"
returnedSessionKeys="Error"
>
<Param name="Url" sessionKey="Url" />
<Param name="EmptyRelevanteAndereZakenJson" sessionKey="EmptyRelevanteAndereZakenJson" />
</IbisLocalSender>
<Forward name="success" path="EXIT" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

<XsltPipe
name="MergeWordtZaakRollen"
styleSheetName="UpdateZaak_LK01/xsl/MergeWordtZaakRollen.xslt"
styleSheetName="UpdateZaak_LK01/xsl/MergeZdsWasAndWordt.xslt"
getInputFromSessionKey="originalMessage"
storeResultInSessionKey="ZdsWordtZaak"
>
Expand Down Expand Up @@ -309,15 +309,90 @@
</SenderPipe>

<XmlIfPipe name="CheckForHeeftBetrekkingOpAndere"
getInputFromSessionKey="originalMessage"
xpathExpression="/zakLk01/object/heeftBetrekkingOpAndere/gerelateerde[string-length(identificatie) > 0]"
getInputFromSessionKey="ZdsWordtZaak"
xpathExpression="/object/heeftBetrekkingOpAndere/gerelateerde[string-length(identificatie) > 0]"
thenForwardName="CheckForHeeftBetrekkingOpAndereWithVerwerkingssoortV"
elseForwardName="EXIT">
</XmlIfPipe>

<XmlIfPipe name="CheckForHeeftBetrekkingOpAndereWithVerwerkingssoortV"
getInputFromSessionKey="ZdsWordtZaak"
xpathExpression="/object/heeftBetrekkingOpAndere[@verwerkingssoort = 'V']"
thenForwardName="AndereZaakIteratorDelete"
elseForwardName="AndereZaakIterator">
</XmlIfPipe>

<ForEachChildElementPipe name="AndereZaakIteratorDelete"
getInputFromSessionKey="ZdsWordtZaak"
elementXPathExpression="/object/heeftBetrekkingOpAndere[@verwerkingssoort = 'V']"
storeResultInSessionKey="AndereZakenDeleteResult">

<IbisLocalSender
name="CallAndereZaakAdapter"
javaListener="AndereZaakAdapter"
returnedSessionKeys="Error">
<Param name="Url" sessionKey="ZgwZaakUrl" />
<Param name="Identificatie" xpathExpression="heeftBetrekkingOpAndere/gerelateerde/identificatie" />
<Param name="Verwerkingssoort" xpathExpression="heeftBetrekkingOpAndere/@verwerkingssoort"/>
</IbisLocalSender>

<Forward name="success" path="createListAndereUrlsToDelete"/>
<Forward name="exception" path="UncaughtException" />
</ForEachChildElementPipe>

<XsltPipe
name="createListAndereUrlsToDelete"
styleSheetName="UpdateZaak_LK01/xsl/CreateAndereUrlsBody.xslt"
storeResultInSessionKey="AndereZakenResultToDelete"
omitXmlDeclaration="true"
>
<Forward name="success" path="CheckIfListNotEmpty"/>
</XsltPipe>

<XmlIfPipe name="CheckIfListNotEmpty"
xpathExpression="/urls/url">
<Forward name="then" path="CallPatchAndereZaakDelete" />
<Forward name="else" path="CheckForHeeftBetrekkingOpAndereWithVerwerkingssoortNotV" />
</XmlIfPipe>

<SenderPipe
name="CallPatchAndereZaakDelete"
getInputFromSessionKey="GetZgwWasZaakResult">
<IbisLocalSender
name="CallPatchAndereZaakDeleteSender"
javaListener="PatchRelevanteAndereZaakDelete"
returnedSessionKeys="Error">
<Param name="Url" sessionKey="ZgwZaakUrl" defaultValue="&lt;dummy/&gt;" />
<Param name="AndereUrlsToDelete" sessionKey="AndereZakenResultToDelete" defaultValue="&lt;dummy/&gt;"/>
</IbisLocalSender>
<Forward name="success" path="ConvertUpdatedZgwZaakIntoXml"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<JsonPipe name="ConvertUpdatedZgwZaakIntoXml">
<Forward name="success" path="UnwrapOpenZaakApiEnvelopeToSingle" />
</JsonPipe>

<XsltPipe
name="UnwrapOpenZaakApiEnvelopeToSingle"
styleSheetName="Common/xsl/UnwrapOpenZaakApiEnvelopeToSingle.xslt"
skipEmptyTags="true"
storeResultInSessionKey="GetZgwWasZaakResult">
<Param name="Type" value="ZgwZaak" />
<Forward name="success" path="CheckForHeeftBetrekkingOpAndereWithVerwerkingssoortNotV" />
<Forward name="exception" path="EXCEPTION" />
</XsltPipe>

<XmlIfPipe name="CheckForHeeftBetrekkingOpAndereWithVerwerkingssoortNotV"
getInputFromSessionKey="ZdsWordtZaak"
xpathExpression="/object/heeftBetrekkingOpAndere[@verwerkingssoort != 'V']"
thenForwardName="AndereZaakIterator"
elseForwardName="EXIT">
</XmlIfPipe>

<ForEachChildElementPipe name="AndereZaakIterator"
getInputFromSessionKey="originalMessage"
elementXPathExpression="/zakLk01/object/heeftBetrekkingOpAndere"
getInputFromSessionKey="ZdsWordtZaak"
elementXPathExpression="/object/heeftBetrekkingOpAndere[@verwerkingssoort != 'V']"
storeResultInSessionKey="AndereZakenResult">

<IbisLocalSender
Expand All @@ -328,7 +403,6 @@
<Param name="Identificatie" xpathExpression="heeftBetrekkingOpAndere/gerelateerde/identificatie" />
<!-- <Param name="PostZgwZaakResult" sessionKey="GetZgwWasZaakResult" type="DOMDOC"/> -->
</IbisLocalSender>

<Forward name="success" path="createListAndereUrls"/>
<Forward name="exception" path="UncaughtException" />
</ForEachChildElementPipe>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Json2XmlInputValidator
name="ValidatePatch"
schema="Zgw/Zaken/Model/PostZgwZaak.xsd"
unlessSessionKey="EmptyRelevanteAndereZakenJson"
root="ZgwZaak"
outputFormat="JSON"
throwException="true"
Expand Down
Loading

0 comments on commit 7d5c8cd

Please sign in to comment.