Skip to content

Commit

Permalink
fix: creeerZaak and updateZaak are not correctly handling relevanteAn…
Browse files Browse the repository at this point in the history
…dereZaken relations

fix: errors thrown in ForEachChildElementPipe are being ignored
  • Loading branch information
MLenterman authored Nov 15, 2023
2 parents a81ed0f + 81b3bfd commit e616ecf
Show file tree
Hide file tree
Showing 25 changed files with 1,508 additions and 286 deletions.
Binary file added e2e/OpenZaak/wearefrank-e2e-2023-10-11.zip
Binary file not shown.
1,060 changes: 1,018 additions & 42 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<xsl:if test="string-length(reden) > 0">
<verlenging>
<reden><xsl:value-of select="reden"/></reden>
<duur><xsl:value-of select="replace(replace(replace(replace(reden, 'D', ''), 'M', ''), 'Y', ''), 'P', '')"/></duur>
<duur><xsl:value-of select="replace(replace(replace(replace(duur, 'D', ''), 'M', ''), 'Y', ''), 'P', '')"/></duur>
</verlenging>
</xsl:if>
</xsl:template>
Expand Down
56 changes: 17 additions & 39 deletions src/main/configurations/Translate/Configuration_AndereZaak.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,73 +12,51 @@
<Exit name="EXIT" state="SUCCESS"/>
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<XmlIfPipe name="CheckForEntiteitType"
xpathExpression="string-length(heeftBetrekkingOpAndere/gerelateerde) > 0 and
heeftBetrekkingOpAndere/gerelateerde[@entiteittype ='ZAK']"
>
<Forward name="then" path="CallGetZgwZaak"/>
<Forward name="else" path="EXIT"/>
</XmlIfPipe>

<SenderPipe
name="CallGetZgwZaak"
storeResultInSessionKey="GetZaakResult">
name="CallGetZgwAndereZaak"
getInputFromSessionKey="originalMessage"
storeResultInSessionKey="ZgwZaakAndereResult">
<IbisLocalSender
name="CallGetZgwZaakSender"
javaListener="GetZgwZaak">
<Param name="Identificatie" xpathExpression="heeftBetrekkingOpAndere/gerelateerde/identificatie"/>
<Param name="Identificatie" sessionKey="Identificatie"/>
</IbisLocalSender>
<Forward name="success" path="GetSingleZgwZaakFromZgwZakenList"/>
<Forward name="success" path="GetSingleZgwAndereZaakFromZgwZakenList"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<XsltPipe
name="GetSingleZgwZaakFromZgwZakenList"
name="GetSingleZgwAndereZaakFromZgwZakenList"
storeResultInSessionKey="ZgwAndereZaakResult"
styleSheetName="Common/xsl/GetSingleElementFromList.xslt"
>
<Forward name="success" path="CheckForGetZgwZaakResult"/>
<Forward name="success" path="CheckForGetZgwAndereZaakResult"/>
<Forward name="error" path="EXCEPTION"/>
</XsltPipe>

<XmlIfPipe name="CheckForGetZgwZaakResult"
<XmlIfPipe name="CheckForGetZgwAndereZaakResult"
xpathExpression="string-length(ZgwZaak) > 0"
>
<Forward name="then" path="CallPatchZaak"/>
<Forward name="then" path="CallPatchAndereZaak"/>
<Forward name="else" path="EXIT"/>
</XmlIfPipe>

<SenderPipe
name="CallPatchZaak">
name="CallPatchAndereZaak" getInputFromSessionKey="ZgwAndereZaakResult">
<IbisLocalSender
name="CallPatchZaakSender"
name="CallPatchAndereZaakSender"
javaListener="PatchRelevanteAndereZaak">
<Param name="AndereUrl" xpathExpression="$ZgwZaakResult/ZgwZaak/url">
<Param name="ZgwZaakResult" sessionKey="ZgwZaakResult"/>
</Param>
<Param name="Url" xpathExpression="$PostZgwZaakResult/ZgwZaak/url">
<Param name="PostZgwZaakResult" sessionKey="PostZgwZaakResult"/>
</Param>
<Param name="Url" xpathExpression="/ZgwZaak/url" defaultValue="&lt;dummy/&gt;" />
<Param name="AndereUrl" sessionKey="Url" defaultValue="&lt;dummy/&gt;"/>
</IbisLocalSender>
<Forward name="success" path="CallPatchAndereZaak"/>
<Forward name="success" path="JsonToXml"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<SenderPipe
name="CallPatchAndereZaak">
<IbisLocalSender
name="CallPatchAndereZaakSender"
javaListener="PatchRelevanteAndereZaak">
<Param name="AndereUrl" xpathExpression="$PostZgwZaakResult/ZgwZaak/url">
<Param name="PostZgwZaakResult" sessionKey="PostZgwZaakResult" type="DOMDOC"/>
</Param>
<Param name="Url" xpathExpression="$ZgwZaakResult/ZgwZaak/url">
<Param name="ZgwZaakResult" sessionKey="ZgwZaakResult" type="DOMDOC"/>
</Param>
</IbisLocalSender>
<JsonPipe name="JsonToXml">
<Forward name="success" path="EXIT"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>
</JsonPipe>
</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@

<ForEachChildElementPipe name="RolMappingIterator"
storeResultInSessionKey="RolMappingResults"
elementXPathExpression="/roles/role"
parallel="true">
elementXPathExpression="/roles/role">
<IbisLocalSender
name="CallAddRolToZgw"
javaListener="AddRolToZgw">
Expand Down Expand Up @@ -154,8 +153,7 @@
<!-- Post zaak end -->
<ForEachChildElementPipe name="PostRolIterator"
getInputFromSessionKey="RolMappingResults"
elementXPathExpression="/results/result/zgwRol"
parallel="true">
elementXPathExpression="/results/result/zgwRol">
<IbisLocalSender
name="PostZgwRolLocalSender"
javaListener="Zaken_PostZgwRol">
Expand All @@ -169,24 +167,49 @@

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

<ForEachChildElementPipe name="AndereZaakIterator"
getInputFromSessionKey="originalMessage"
elementXPathExpression="/zakLk01/object/heeftBetrekkingOpAndere"
parallel="true">
storeResultInSessionKey="AndereZakenResult">

<IbisLocalSender
name="CallAndereZaakAdapter"
javaListener="AndereZaakAdapter">
<Param name="PostZgwZaakResult" sessionKey="PostZgwZaakResult" type="DOMDOC"/>
<Param name="Url" sessionKey="PostZgwZaakResult" xpathExpression="ZgwZaak/url" />
<Param name="Identificatie" xpathExpression="heeftBetrekkingOpAndere/gerelateerde/identificatie" />
<!-- <Param name="PostZgwZaakResult" sessionKey="GetZgwWasZaakResult" type="DOMDOC"/> -->
</IbisLocalSender>
<Forward name="success" path="CallSetResultaatAndStatus"/>

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

<XsltPipe
name="createListAndereUrls"
styleSheetName="UpdateZaak_LK01/xsl/CreateAndereUrlsBody.xslt"
storeResultInSessionKey="AndereZakenResult"
omitXmlDeclaration="true"
>
<Forward name="success" path="CallPatchAndereZaak"/>
</XsltPipe>

<SenderPipe
name="CallPatchAndereZaak" getInputFromSessionKey="PostZgwZaakResult">
<IbisLocalSender
name="CallPatchAndereZaakSender"
javaListener="PatchRelevanteAndereZaak">
<Param name="Url" xpathExpression="ZgwZaak/url" defaultValue="&lt;dummy/&gt;" />
<Param name="AndereUrls" sessionKey="AndereZakenResult" defaultValue="&lt;dummy/&gt;"/>
</IbisLocalSender>
<Forward name="success" path="CallSetResultaatAndStatus"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<SenderPipe
name="CallSetResultaatAndStatus"
getInputFromSessionKey="originalMessage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@

<ForEachChildElementPipe name="RolIterator"
storeResultInSessionKey="GetZaakDetailsByRolResults"
elementXPathExpression="/ZgwRollen/ZgwRol"
parallel="true">
elementXPathExpression="/ZgwRollen/ZgwRol">
<IbisLocalSender
name="CallGetZaakDetailsByRol"
javaListener="GetZaakDetailsByRol">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

<ForEachChildElementPipe name="RolIterator"
storeResultInSessionKey="GetZaakDetailsByRolResults"
elementXPathExpression="/ZgwRollen/ZgwRol"
parallel="true">
elementXPathExpression="/ZgwRollen/ZgwRol">
<IbisLocalSender
name="CallGetZaakDetailsByRol"
javaListener="GetZaakDetailsByRol">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@

<ForEachChildElementPipe name="MapZdsRolFromZgwRolIterator"
elementXPathExpression="/root/results"
storeResultInSessionKey="Rollen"
parallel="true">
storeResultInSessionKey="Rollen">
<IbisLocalSender
name="CallMapZdsRolFromZgwRol"
javaListener="MapZdsRolFromZgwRol">
Expand Down Expand Up @@ -144,8 +143,7 @@
<!-- not tested -->
<ForEachChildElementPipe name="MapZgwDeelzakenIterator"
elementXPathExpression="/ZgwZaak/deelzaken"
storeResultInSessionKey="ZgwDeelzaken"
parallel="true">
storeResultInSessionKey="ZgwDeelzaken">
<IbisLocalSender
name="CallMapZdsDeelzakenFromZgwDeelzaken"
javaListener="MapZdsDeelzakenFromZgwDeelzaken">
Expand All @@ -168,7 +166,7 @@
<!-- not tested -->
<XmlIfPipe name="ZgwZaakHasZdsRelevanteAndereZaken"
getInputFromSessionKey="ZgwZaak"
xpathExpression="string-length(/ZgwZaak/relevanteAndereZaken) > 4"
xpathExpression="/ZgwZaak/relevanteAndereZaken[string-length(url) > 0]"
>
<Forward name="then" path="MapZdsRelevanteAndereZakenIterator"/>
<Forward name="else" path="GetZgwStatusByZaakUrlSender"/>
Expand All @@ -177,8 +175,7 @@
<!-- not tested -->
<ForEachChildElementPipe name="MapZdsRelevanteAndereZakenIterator"
elementXPathExpression="/ZgwZaak/relevanteAndereZaken"
storeResultInSessionKey="ZdsRelevanteAndereZaken"
parallel="true">
storeResultInSessionKey="ZdsRelevanteAndereZaken">
<IbisLocalSender
name="CallMapZdsRelevanteAndereZaakFromZgwRelevanteAndereZaken"
javaListener="MapZdsRelevanteAndereZaakFromZgwRelevanteAndereZaken">
Expand All @@ -191,7 +188,7 @@
getInputFromSessionKey="ZdsZaak"
storeResultInSessionKey="ZdsZaak"
skipEmptyTags="true"
styleSheetName="Common/xsl/EnrichEntity.xslt"
styleSheetName="Common/xsl/EnrichEntity_ForEachPipeWrapped.xslt"
>
<Param name="With" sessionKey="ZdsRelevanteAndereZaken" type="DOMDOC"/>
<Forward name="success" path="GetZgwStatusByZaakUrlSender"/>
Expand All @@ -214,8 +211,7 @@

<ForEachChildElementPipe name="MapZdsHeeftIterator"
elementXPathExpression="/ZgwStatussen/ZgwStatus"
storeResultInSessionKey="ZdsHeeft"
parallel="true">
storeResultInSessionKey="ZdsHeeft">
<IbisLocalSender
name="ZdsHeeftLocalSender"
javaListener="MapZdsHeeftFromZgwStatus">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
name="ZaakTypeInformatieObjectTypeUrlIterator"
getInputFromSessionKey="ZgwZaakType"
storeResultInSessionKey="ZgwInformatieObjectTypen"
elementXPathExpression="/ZgwZaakType/informatieobjecttypen"
parallel="true">
elementXPathExpression="/ZgwZaakType/informatieobjecttypen">
<IbisLocalSender
name="GetZgwInformatieObjectTypeByUrlLocalSender"
javaListener="GetZgwInformatieObjectTypeByUrl">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
<IbisLocalSender
name="GetZgwRelevanteAndereZaakLocalSender"
javaListener="GetZgwZaakByUrl">
<Param name="Url" sessionKey="Url" type="STRING"/>
<Param name="Url" xpathExpression="/relevanteAndereZaken/url" type="STRING"/>
</IbisLocalSender>
<Forward name="success" path="CreateZdsHeeftBetrekkingOp"/>
<Forward name="success" path="CreateZdsHeeftBetrekkingOpAndere"/>
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<XsltPipe name="CreateZdsHeeftBetrekkingOp"
getInputFromSessionKey="ZgwRol"
styleSheetName="CreeerZaak_LK01/xsl/CreateZdsHeeftBetrekkingOp.xslt"
<XsltPipe name="CreateZdsHeeftBetrekkingOpAndere"
styleSheetName="geefZaakdetails_Lv01/xsl/CreateZdsHeeftBetrekkingOpAndere.xslt"
>
<Param name="ZgwZaak" sessionKey="ZgwRelevanteAndereZaak" type="DOMDOC"/>
<Forward name="success" path="EXIT"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,26 @@
<Exit name="EXCEPTION" state="ERROR"/>
</Exits>

<XsltPipe
<XsltPipe
name="CreatePatchZaakBody"
getInputFromSessionKey="originalMessage"
skipEmptyTags="true"
styleSheetName="CreeerZaak_LK01/xsl/CreateZgwAndereZaakBody.xsl"
>
<Param name="Url" sessionKey="AndereUrl"/>
<Param name="AndereUrl" sessionKey="AndereUrl"/>
<Param name="AndereUrls" sessionKey="AndereUrls" type="DOMDOC"/>
<Forward name="success" path="XmlToJson"/>
</XsltPipe>

<JsonPipe name="XmlToJson"
direction="XML2JSON">
<Forward name="success" path="PatchZaak"/>
</JsonPipe>
<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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@

<ForEachChildElementPipe name="CallDetectRolChanges"
elementXPathExpression="/roles/role"
storeResultInSessionKey="RolChangesResults"
parallel="true">
storeResultInSessionKey="RolChangesResults">
<IbisLocalSender
name="CallDetectRolChangesSender"
javaListener="DetectRolChanges">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@

<ForEachChildElementPipe name="ZdsHeeftIterator"
getInputFromSessionKey="originalMessage"
elementXPathExpression="/*/object/heeft"
parallel="true">
elementXPathExpression="/*/object/heeft">
<IbisLocalSender
name="CallZdsHeeftAdapter"
javaListener="ZdsHeeftAdapter"
Expand Down Expand Up @@ -127,8 +126,7 @@
</SenderPipe>

<ForEachChildElementPipe name="ZgwResultatenIterator"
elementXPathExpression="/root/results"
parallel="true">
elementXPathExpression="/root/results">
<HttpSender
name="DeleteZaakResultaatSender"
methodType="DELETE"
Expand Down
Loading

0 comments on commit e616ecf

Please sign in to comment.