Skip to content

Commit

Permalink
refactor: update postnotificatie to fit new requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DelanoWAF committed Sep 13, 2024
1 parent e233bb7 commit 68250bf
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,21 @@
<IbisLocalSender name="GetTaakopdrachtById" javaListener="Internal_GetTaakopdrachtById">
<Param name="Id" xpathExpression="//meldingId"></Param>
</IbisLocalSender>
<Forward name="success" path="Send2MorCore" />
<Forward name="success" path="CreatePostNotificatieRequest" />
<Forward name="exception" path="StoreStackTrace" />
</SenderPipe>

<SenderPipe name="Send2MorCore">
<XsltPipe name="CreatePostNotificatieRequest" styleSheetName="xsl/MorCore/PostNotificatieRequest.xsl" getInputFromSessionKey="xmlInputMessage">
<Forward name="success" path="MakePostNotificatieRequestJson" />
<Forward name="exception" path="StoreStackTrace" />
</XsltPipe>

<JsonPipe name="MakePostNotificatieRequestJson" direction="XML2JSON" prettyPrint="true" storeResultInSessionKey="RequestJson">
<Forward name="success" path="Send2MorCore" />
<Forward name="exception" path="StoreStackTrace" />
</JsonPipe>

<SenderPipe name="Send2MorCore" getInputFromSessionKey="RequestJson">
<HttpSender name="Send2MorCore" methodType="POST" contentType="application/json"
headersParams="Authorization" />
<Param name="url"
Expand All @@ -78,7 +88,7 @@
<Forward name="404" path="Send2MSB" />
</SenderPipe>

<SenderPipe name="Send2MSB" getInputFromFixedValue="&lt;empty/>">
<SenderPipe name="Send2MSB" getInputFromSessionKey="RequestJson">
<HttpSender name="Send2MSB" methodType="POST" contentType="application/json"
headersParams="Authorization" />
<Param name="url"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />

<xsl:template match="/">
<root>
<bijlagen/>
<taakstatus>
<naam>
<xsl:choose>
<xsl:when test="//status = 'Nieuw' or //status = 'Gemeld' or //status = 'In behandeling' or //status = 'Vertraging'">
nieuw
</xsl:when>
<xsl:when test="//status = 'Afgewezen' or //status = 'NietOpTeLossen' or //status = 'Afgehandeld'">
voltooid
</xsl:when>
<xsl:otherwise>
onbekend
</xsl:otherwise>
</xsl:choose>
</naam>
</taakstatus>
<resolutie>
<xsl:choose>
<xsl:when test="//status = 'Afgewezen' or //status = 'NietOpTeLossen'">
niet_opgelost
</xsl:when>
<xsl:when test="//status = 'Afgehandeld'">
opgelost
</xsl:when>
<xsl:otherwise>
<xsl:text/>
</xsl:otherwise>
</xsl:choose>
</resolutie>
<omschrijving_intern><xsl:value-of select="//Opmerking"/></omschrijving_intern>
<gebruiker><xsl:value-of select="//Behandelaar"/></gebruiker>
<resolutie_opgelost_herzien>false</resolutie_opgelost_herzien>
</root>
</xsl:template>
</xsl:stylesheet>
22 changes: 7 additions & 15 deletions src/test/testtool/scenario03/Input.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
[
{
"kanaal": "zaken",
"hoofdObject": "https://zaken-api.vng.cloud/api/v1/zaken/d7a22",
"resource": "status",
"resourceUrl": "https://zaken-api.vng.cloud/api/v1/statussen/d7a22/721c9",
"actie": "create",
"aanmaakdatum": "2018-01-01T17:00:00Z",
"kenmerken": {
"bron": "082096752011",
"zaaktype": "https://example.com/api/v1/zaaktypen/5aa5c",
"vertrouwelijkeidaanduiding": "openbaar"
}
}
]
{
"meldingId": "1234567",
"status": "In behandeling",
"Opmerking": "test",
"Behandelaar": "Test User",
"Datum": "10-9-2024 17:39:00"
}

0 comments on commit 68250bf

Please sign in to comment.