Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return resultaat values #454

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
16 changes: 16 additions & 0 deletions e2e/SoapUI/zaakbrug-e2e-soapui-project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8177,6 +8177,10 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue('DocumentBa
<ZKN:kenmerk>273846</ZKN:kenmerk>
<ZKN:bron>GWS4all</ZKN:bron>
</ZKN:kenmerk>
<ZKN:resultaat>
<ZKN:omschrijving>Buiten behandeling g</ZKN:omschrijving>
<ZKN:toelichting>Buiten behandeling g</ZKN:toelichting>
</ZKN:resultaat>
<ZKN:startdatum>*</ZKN:startdatum>
<ZKN:registratiedatum>*</ZKN:registratiedatum>
<ZKN:einddatumGepland>*</ZKN:einddatumGepland>
Expand Down Expand Up @@ -16846,6 +16850,10 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue( 'JwtToken'
<ZKN:identificatie>*</ZKN:identificatie>
<ZKN:omschrijving>Dossiernummer GISVG OV*</ZKN:omschrijving>
<ZKN:toelichting>Reguliere omgevingsvergunning</ZKN:toelichting>
<ZKN:resultaat>
<ZKN:omschrijving>Vergunningvrij</ZKN:omschrijving>
<ZKN:toelichting>Vergunningvrij</ZKN:toelichting>
</ZKN:resultaat>
<ZKN:startdatum>*</ZKN:startdatum>
<ZKN:registratiedatum>*</ZKN:registratiedatum>
<ZKN:einddatum>*</ZKN:einddatum>
Expand Down Expand Up @@ -18235,6 +18243,10 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue( 'JwtToken'
<ZKN:identificatie>*</ZKN:identificatie>
<ZKN:omschrijving>Dossiernummer GISVG OV*</ZKN:omschrijving>
<ZKN:toelichting>Reguliere omgevingsvergunning</ZKN:toelichting>
<ZKN:resultaat>
<ZKN:omschrijving>Vergunningvrij</ZKN:omschrijving>
<ZKN:toelichting>Vergunningvrij</ZKN:toelichting>
</ZKN:resultaat>
<ZKN:startdatum>*</ZKN:startdatum>
<ZKN:registratiedatum>*</ZKN:registratiedatum>
<ZKN:einddatum>*</ZKN:einddatum>
Expand Down Expand Up @@ -29264,6 +29276,10 @@ testRunner.testCase.getTestStepByName("Properties").setPropertyValue('DocumentBa
<ZKN:object StUF:entiteittype="ZAK">
<ZKN:identificatie>*</ZKN:identificatie>
<ZKN:omschrijving>Belangrijke gebeurtenissen</ZKN:omschrijving>
<ZKN:resultaat>
<ZKN:omschrijving>Afgehandeld</ZKN:omschrijving>
<ZKN:toelichting>Afgehandeld</ZKN:toelichting>
</ZKN:resultaat>
<ZKN:startdatum>*</ZKN:startdatum>
<ZKN:registratiedatum>*</ZKN:registratiedatum>
<ZKN:einddatum>*</ZKN:einddatum>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<xsl:stylesheet exclude-result-prefixes="#all" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:zgw="http://google.com/zgw" xmlns:StUF="http://www.egem.nl/StUF/StUF0301" xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310" xmlns:BG="http://www.egem.nl/StUF/sector/bg/0310" version="2.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />
<xsl:param name="ZgwZaak"/>
<xsl:param name="Resultaat"/>
<xsl:param name="ResultaatType"/>
<xsl:param name="ExtraElementen" as="node()?"><StUF:extraElementen/></xsl:param>

<xsl:function name="zgw:convertZdsDateToZgwDate" as="xs:string">
Expand Down Expand Up @@ -41,7 +43,15 @@
</xsl:if>
<xsl:apply-templates select="$ZgwZaak/ZgwZaak/kenmerken" />
<!-- anderZaakObject -->
<!-- resultaat -->
<xsl:if test="$Resultaat/root/toelichting != ''">
<ZKN:resultaat>
<ZKN:omschrijving>
<xsl:value-of select="$ResultaatType/ZgwRolType/omschrijving" />
</ZKN:omschrijving>
<ZKN:toelichting>
<xsl:value-of select="$Resultaat/root/toelichting" />
</ZKN:toelichting>
</ZKN:resultaat> </xsl:if>
<xsl:if test="$ZgwZaak/ZgwZaak/startdatum != ''">
<ZKN:startdatum><xsl:value-of select="zgw:convertZdsDateToZgwDate($ZgwZaak/ZgwZaak/startdatum)" /></ZKN:startdatum>
</xsl:if>
Expand Down
4 changes: 4 additions & 0 deletions src/main/configurations/Translate/Configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
<!ENTITY GetZgwZaakByUrl SYSTEM "./Configuration_GetZgwZaakByUrl.xml">
<!ENTITY GetZgwZaakInformatieObjectByEnkelvoudigInformatieObjectUrl SYSTEM "./Configuration_GetZgwZaakInformatieObjectByEnkelvoudigInformatieObjectUrl.xml">
<!ENTITY GetZgwZaakTypeByIdentificatie SYSTEM "./Configuration_GetZgwZaakTypeByIdentificatie.xml">
<!ENTITY GetZgwResultaatByUrl SYSTEM "./Configuration_Zaken_GetZgwResultaatByUrl.xml">
<!ENTITY GetZgwResultaatTypeByUrl SYSTEM "./Configuration_Zaken_GetZgwResultaatTypeByUrl.xml">
<!ENTITY HandleZgwZaakInformatieObjecten SYSTEM "./Configuration_HandleZgwZaakInformatieObjecten.xml">
<!ENTITY ImportFromLocalFS SYSTEM "./Configuration_ImportFromLocalFS.xml">
<!ENTITY ApplyTranslationProfileValueOverrides SYSTEM "./Configuration_ApplyTranslationProfileValueOverrides.xml">
Expand Down Expand Up @@ -127,6 +129,8 @@
&GetZgwZaakByUrl;
&GetZgwZaakInformatieObjectByEnkelvoudigInformatieObjectUrl;
&GetZgwZaakTypeByIdentificatie;
&GetZgwResultaatByUrl;
&GetZgwResultaatTypeByUrl;
&HandleZgwZaakInformatieObjecten;
&ImportFromLocalFS;
&ApplyTranslationProfileValueOverrides;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,35 @@
<Param name="zaaktype" sessionKey="ZgwZaakType" xpathExpression="/ZgwZaakType/identificatie" />
<Param name="valueOverrideKeyRoot" value="zgw.zaken-api.zaken.ZgwZaak" />
</IbisLocalSender>
<Forward name="success" path="MapZdsZaakFromZgwZaak" />
<Forward name="success" path="ResultaatExists" />
</SenderPipe>

<XsltPipe name="MapZdsZaakFromZgwZaak"
<XmlIfPipe name="ResultaatExists" getInputFromSessionKey="originalMessage" xpathExpression="//resultaat != ''">
<Forward name="then" path="GetZgwResultaatByUrlSender" />
<Forward name="else" path="MapZdsZaakFromZgwZaak" />
</XmlIfPipe>

<SenderPipe name="GetZgwResultaatByUrlSender" storeResultInSessionKey="Resultaat">
<IbisLocalSender name="GetZgwResultaatByUrlLocalSender" javaListener="Zaken_GetZgwResultaatByUrl">
<Param name="url" sessionKey="ZgwZaak"
xpathExpression="ZgwZaak/resultaat" />
</IbisLocalSender>
</SenderPipe>

<SenderPipe name="GetZgwResultaatTypeByUrlSender" storeResultInSessionKey="ResultaatType">
<IbisLocalSender name="GetZgwResultaatTypeByUrlLocalSender" javaListener="Zaken_GetZgwResultaatTypeByUrl">
<Param name="url" xpathExpression="/root/resultaattype" />
</IbisLocalSender>
</SenderPipe>

<XsltPipe name="MapZdsZaakFromZgwZaak" getInputFromSessionKey="ZgwZaak"
storeResultInSessionKey="ZdsZaak"
styleSheetName="Common/xsl/GetZdsZaakFromZgwZaak.xslt"
>
<Param name="ZgwZaak" sessionKey="ZgwZaak" type="DOMDOC" />
<Param name="ExtraElementen" sessionKey="ExtraElementen" type="DOMDOC" />
<Param name="Resultaat" sessionKey="Resultaat" type="DOMDOC" defaultValue="&lt;Dummy/>" />
<Param name="ResultaatType" sessionKey="ResultaatType" type="DOMDOC" defaultValue="&lt;Dummy/>" />
<Forward name="success" path="GetGlobalConfigFromLocalFS" />
</XsltPipe>

Expand Down Expand Up @@ -251,9 +271,8 @@
>
<Param name="With" sessionKey="ZdsHeeft" type="DOMDOC"/>
<Forward name="success" path="EXIT"/>
<Forward name="exception" path="EXCEPTION"/>
<Forward name="error" path="EXCEPTION"/>
</XsltPipe>

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

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

<Pipeline>
<Exits>
<Exit name="EXIT" state="SUCCESS" />
<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="GetZgwResultaatByUrlSender" />
<Forward name="exception" path="ErrorJsonToXml" />
</SenderPipe>


<SenderPipe
name="GetZgwResultaatByUrlSender"
getInputFromFixedValue="&lt;dummy/&gt;">
<HttpSender
name="GetZgwResultaatByUrlHttpSender"
methodType="GET"
headersParams="Authorization,Accept-Crs"
timeout="${zaakbrug.zgw.zaken-api.timeout}"
maxExecuteRetries="5"
/>
<Param name="url" sessionKey="url" />
<Param name="Accept-Crs" value="EPSG:4326" />
<Param name="Authorization" sessionKey="Authorization" />
<Forward name="success" path="JsonToXml" />
<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="GetZgwRolTypeByUrlSender" />
<Forward name="success" path="EXCEPTION" />
</XsltPipe>

<JsonPipe
name="JsonToXml">
<Forward name="success" path="EXIT" />
</JsonPipe>
</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<Module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../FrankConfig.xsd">
<Adapter name="Zaken_GetZgwResultaatTypeByUrl"
active="${Zaken_GetZgwResultaatTypeByUrl.Active}"
description="">

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

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

<SenderPipe name="GetAuthorizationHeaderForCatalogiApi"
getInputFromFixedValue="&lt;dummy/&gt;">
<IbisLocalSender
name="GetAuthorizationHeaderForCatalogiApiSender"
javaListener="GenerateAuthorizationHeaderForCatalogiApi"
returnedSessionKeys="Error,Authorization">
</IbisLocalSender>
<Forward name="success" path="GetZgwResultaatTypeByUrlSender" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<SenderPipe
name="GetZgwResultaatTypeByUrlSender"
getInputFromFixedValue="&lt;dummy/&gt;">
<HttpSender
name="GetZgwResultaatTypeByUrlHttpSender"
methodType="GET"
headersParams="Authorization,Accept-Crs"
timeout="${zaakbrug.zgw.catalogi-api.timeout}"
maxExecuteRetries="5"
/>
<Param name="url" sessionKey="url" />
<Param name="Accept-Crs" value="EPSG:4326"/>
<Param name="Authorization" sessionKey="Authorization" />
<Forward name="success" path="JsonToXml" />
<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="GetZgwResultaatTypeByUrlSender" />
<Forward name="success" path="EXCEPTION" />
</XsltPipe>

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

<XsltPipe
name="UnwrapOpenZaakApiEnvelopeToSingle"
styleSheetName="Common/xsl/UnwrapOpenZaakApiEnvelopeToSingle.xslt"
>
<Param name="Type" value="ZgwRolType"/>
<Forward name="success" path="EXIT"/>
<Forward name="error" path="EXCEPTION"/>
</XsltPipe>
</Pipeline>
</Adapter>
</Module>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ GetZgwInformatieObjectUnlock.Active=true
GetZgwRolesByZaakUrl.Active=true
Zaken_GetZgwRolTypeByUrl.Active=true
Zaken_GetZgwRolTypeByZaakType.Active=true
Zaken_GetZgwResultaatByUrl.Active=true
Zaken_GetZgwResultaatTypeByUrl.Active=true
GetZgwStatusTypeByUrl.Active=true
GetZgwZaak.Active=true
GetZgwZaakByUrl.Active=true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ZKN="http://www.egem.nl/StUF/sector/zkn/0310">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />
<xsl:param name="Resultaat" />

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="ZKN:startdatum">
<ZKN:resultaat>
<ZKN:omschrijving>
<xsl:value-of select="$Resultaat/root/toelichting" />
DelanoWAF marked this conversation as resolved.
Show resolved Hide resolved
</ZKN:omschrijving>
</ZKN:resultaat>
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

</xsl:stylesheet>
Loading