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

refactor: replace get roltypen query by zaaktype with individual calls to roltype by their uuid to make them cachable #113

2 changes: 1 addition & 1 deletion e2e/SoapUI/zaakbrug-e2e-soapui-project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284215,4 +284215,4 @@ loadTestRunner.loadTest.testCase.getTestStepByName("Properties").setPropertyValu

</edcLa01>
</s:Body>
</s:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508"/></con:response><con:dispatchConfig/></con:mockOperation></con:mockService><con:properties><con:property><con:name>ZaakbrugEndpoint</con:name><con:value>http://localhost:8080/services/</con:value></con:property><con:property><con:name>ReplicationZaakIdentiticatie</con:name><con:value>1900214585</con:value></con:property><con:property><con:name>ReplicationLegacyBeantwoorvraag</con:name><con:value>http://localhost:8080/services/</con:value></con:property><con:property><con:name>ReplicationZaakDocumentIdentificatie</con:name><con:value>1900216060</con:value></con:property><con:property><con:name>ZdsTimezone</con:name><con:value>UTC</con:value></con:property><con:property><con:name>jwtClientId</con:name><con:value>ZaakBrug</con:value></con:property><con:property><con:name>jwtSecret</con:name><con:value>secret1234</con:value></con:property><con:property><con:name>OpenZaakCatalogiApiRootUrl</con:name><con:value>http://localhost:9001/zaken/api/v1/</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
</s:Envelope>]]></con:responseContent><con:wsaConfig mustUnderstand="NONE" version="200508"/></con:response><con:dispatchConfig/></con:mockOperation></con:mockService><con:properties><con:property><con:name>ZaakbrugEndpoint</con:name><con:value>http://localhost:8080/services/</con:value></con:property><con:property><con:name>ReplicationZaakIdentiticatie</con:name><con:value>1900214585</con:value></con:property><con:property><con:name>ReplicationLegacyBeantwoorvraag</con:name><con:value>http://localhost:8080/services/</con:value></con:property><con:property><con:name>ReplicationZaakDocumentIdentificatie</con:name><con:value>1900216060</con:value></con:property><con:property><con:name>ZdsTimezone</con:name><con:value>UTC</con:value></con:property><con:property><con:name>jwtClientId</con:name><con:value>ZaakBrug</con:value></con:property><con:property><con:name>jwtSecret</con:name><con:value>secret1234</con:value></con:property><con:property><con:name>OpenZaakCatalogiApiRootUrl</con:name><con:value>http://localhost:9001/zaken/api/v1/</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
2 changes: 2 additions & 0 deletions src/main/configurations/Translate/Configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!ENTITY GetResultatenByZaakUrl SYSTEM "./Configuration_GetResultatenByZaakUrl.xml">
<!ENTITY GetRolByZaakUrlAndRolTypeUrl SYSTEM "./Configuration_GetRolByZaakUrlAndRolTypeUrl.xml">
<!ENTITY GetRollenByBsn SYSTEM "./Configuration_GetRollenByBsn.xml">
<!ENTITY GetRolTypenByUrl SYSTEM "./Configuration_GetRolTypenByUrl.xml">
<!ENTITY GetRsinByGemeenteCode SYSTEM "./Configuration_GetRsinByGemeenteCode.xml">
<!ENTITY Zaken_GetZgwStatusByZaakUrl SYSTEM "./Configuration_Zaken_GetZgwStatusByZaakUrl.xml">
<!ENTITY GetStatusTypeByZaakTypeAndOmschrijving SYSTEM "./Configuration_GetStatusTypeByZaakTypeAndOmschrijving.xml">
Expand Down Expand Up @@ -90,6 +91,7 @@
&GetResultatenByZaakUrl;
&GetRolByZaakUrlAndRolTypeUrl;
&GetRollenByBsn;
&GetRolTypenByUrl;
&GetRsinByGemeenteCode;
&Zaken_GetZgwStatusByZaakUrl;
&GetStatusTypeByZaakTypeAndOmschrijving;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,29 @@
javaListener="GetRsinByGemeenteCode">
<Param name="GemeenteCode" sessionKey="originalMessage" xpathExpression="/*/stuurgegevens/zender/organisatie" />
</IbisLocalSender>
<Forward name="success" path="CallGetZgwRolType"/>
<Forward name="success" path="GetRolTypenByUrl"/>
<Forward name="exception" path="UncaughtException"/>
</SenderPipe>

<SenderPipe
<ForEachChildElementPipe name="GetRolTypenByUrl"
storeResultInSessionKey="ZgwRolTypen"
elementXPathExpression="ZgwZaakTypen/ZgwZaakType/roltypen"
getInputFromSessionKey="GetZaakTypeResult">
<IbisLocalSender javaListener="GetRolTypenByUrl">
<Param name="Url" xpathExpression="/roltypen" />
</IbisLocalSender>
</ForEachChildElementPipe>

<XsltPipe
name="UnwrapOpenZaakApiEnvelopeToList"
styleSheetName="Common/xsl/UnwrapForEachChildPipeEnvelopeToList.xslt"
>
<Param name="List" value="ZgwRolTypen"/>
<Forward name="success" path="SetRoles"/>
<Forward name="exception" path="UncaughtException" />
</XsltPipe>

<!-- <SenderPipe
name="CallGetZgwRolType"
storeResultInSessionKey="ZgwRolTypen">
<IbisLocalSender
Expand All @@ -82,7 +100,7 @@
</IbisLocalSender>
<Forward name="success" path="SetRoles"/>
<Forward name="exception" path="UncaughtException" />
</SenderPipe>
</SenderPipe> -->

<XsltPipe
name="SetRoles"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../FrankConfig.xsd">
<Adapter name="GetRolTypenByUrl">
<Receiver>
<JavaListener name="GetRolTypenByUrl" />
</Receiver>
<Pipeline>
<Exits>
<Exit name="EXIT" state="SUCCESS" />
<Exit name="EXCEPTION" state="ERROR" />
</Exits>

<SenderPipe
name="GetRolTypenByUrlSender"
getInputFromSessionKey="originalMessage"
>
<HttpSender
name="GetRolTypenByUrlHttpSender"
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" value="Bearer @@zaken-api.jwt@@" />
<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="UnwrapZgwEnkelvoudigInformatieObjectToSingle" />
</JsonPipe>

<XsltPipe
name="UnwrapZgwEnkelvoudigInformatieObjectToSingle"
styleSheetName="Common/xsl/UnwrapOpenZaakApiEnvelopeToSingle.xslt" >
<Param name="Type" value="ZgwEnkelvoudigInformatieObject" />
<Forward name="success" path="EXIT" />
<Forward name="error" path="EXCEPTION" />
</XsltPipe>
</Pipeline>
</Adapter>
</Module>
Loading