Skip to content

Commit

Permalink
fix: add check for resultaat
Browse files Browse the repository at this point in the history
  • Loading branch information
INTERPAR\sena committed Dec 5, 2024
1 parent 81c2d3d commit 5ccbb90
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<Forward name="success" path="Call Open Zaak to get the zaak" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<!-- retrieve the case -->
<SenderPipe name="Call Open Zaak to get the zaak" getInputFromSessionKey="originalMessage">
<SenderPipe name="Call Open Zaak to get the zaak"
getInputFromSessionKey="originalMessage">
<HttpSender
name="getZaak"
headersParams="Accept-Crs,Authorization">
Expand All @@ -61,6 +62,17 @@
<JsonPipe name="zaakTypeResponseJsonToXml"
storeResultInSessionKey="storeZaakTypeResponse" />

<XsltPipe name="Check resultaat in zaak" getInputFromSessionKey="getZaakXml"
styleSheetName="xsl/checkResultaat.xsl">
<Forward name="success" path="Check if resultaat exists" />
</XsltPipe>

<IfPipe name="Check if resultaat exists"
xpathExpression="string-length(resultaat) &gt; 0">
<Forward name="then" path="Call Open Zaak to get resultaat in zaak" />
<Forward name="else" path="Call Open Zaak to get status in zaak" />
</IfPipe>

<SenderPipe name="Call Open Zaak to get resultaat in zaak"
getInputFromSessionKey="getZaakXml">
<HttpSender name="resultaat"
Expand Down
11 changes: 11 additions & 0 deletions src/main/configurations/Fetch_ZGW_To_ZDS/xsl/checkResultaat.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
<resultaat>
<xsl:if test="exists(root/resultaat)">
<xsl:value-of select="root/resultaat" />
</xsl:if>
</resultaat>
</xsl:template>
</xsl:stylesheet>
31 changes: 4 additions & 27 deletions src/main/configurations/Fetch_ZGW_To_ZDS/xsl/result.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -124,33 +124,10 @@
</zkt.omschrijving>
<volgnummer xsi:nil="true" StUF:noValue="waardeOnbekend" />
<code xsi:nil="true" StUF:noValue="waardeOnbekend" />
<xsl:choose>
<xsl:when
test="exists($storeResultaat/root/toelichting) and $storeResultaat/root/toelichting!=''">
<xsl:choose>
<xsl:when test="string-length($storeStatusResponse/root/statustoelichting) &gt; 0">
<omschrijving>
<xsl:value-of
select="concat($storeStatusResponse/root/statustoelichting,' (', $storeResultaat/root/toelichting,')')" />
</omschrijving>
</xsl:when>
<xsl:otherwise>
<omschrijving>
<xsl:value-of
select="$storeResultaat/root/toelichting" />
</omschrijving>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:if test="exists($storeStatusResponse/root/statustoelichting)">
<omschrijving>
<xsl:value-of
select="$storeStatusResponse/root/statustoelichting" />
</omschrijving>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<omschrijving>
<xsl:value-of
select="$storeStatusResponse/root/statustoelichting" />
</omschrijving>
<ingangsdatumObject xsi:nil="true" StUF:noValue="waardeOnbekend" />
</gerelateerde>
<datumStatusGezet>
Expand Down

0 comments on commit 5ccbb90

Please sign in to comment.