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 3 commits into
base: master
Choose a base branch
from

Conversation

DelanoWAF
Copy link
Contributor

No description provided.

@DelanoWAF DelanoWAF self-assigned this Oct 16, 2024
Comment on lines +267 to +300
<SenderPipe name="GetAuthorizationHeaderForZakenApi"
getInputFromFixedValue="&lt;dummy/&gt;" storeResultInSessionKey="Authorization">
<IbisLocalSender
name="GetAuthorizationHeaderForZakenApiSender"
javaListener="GenerateAuthorizationHeaderForZakenApi"
returnedSessionKeys="Error,Authorization">
</IbisLocalSender>
<Forward name="success" path="GetResultaatSender" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<SenderPipe
name="GetResultaatSender"
getInputFromSessionKey="originalMessage"
>
<HttpSender
name="GetResultaatSender"
methodType="GET"
headersParams="Authorization,Accept-Crs"
timeout="${zaakbrug.zgw.zaken-api.timeout}"
maxExecuteRetries="5"
/>
<Param name="url" sessionKey="ZgwZaak"
xpathExpression="//resultaat"
/>
<Param name="Accept-Crs" value="EPSG:4326" />
<Param name="Authorization" xpathExpression="concat('Bearer ', $token)">
<Param name="token" sessionKey="Authorization"/>
</Param>
<Forward name="success" path="Json2XML" />
<Forward name="exception" path="EXCEPTION" />
</SenderPipe>

<JsonPipe name="Json2XML" storeResultInSessionKey="Resultaat"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in it's own adapter named Zaken_GetZgwResultaatByUrl. Should look similar to Zaken_GetZgwRolTypeByUrl. You will also need ZgwResultaatType, which will also need it's own adapter named Zaken_GetZgwResultaatTypeByUrl.

Comment on lines 302 to 309
<XsltPipe name="EnrichZdsZaakWithResultaat"
getInputFromSessionKey="ZdsZaak"
storeResultInSessionKey="ZdsZaak"
styleSheetName="geefZaakdetails_Lv01/xsl/AddResultaat.xsl"
>
<Param name="Resultaat" sessionKey="Resultaat" type="DOMDOC"/>
<Forward name="success" path="EXIT"/>
<Forward name="error" path="EXCEPTION"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resultaat is a bit of a weird one, because in ZGW it is a seperate resource attached to a zaak, but in ZDS it is actually part of a zaak. It's not even similar to ZDS heeftAls*, heeft, etc. which are considered "topfundementeel". In ZDS, resultaat is just another element on a zaak.

For that reason, the translation for resultaat should be part of the xslt translating ZgwZaak to ZdsZaak. ZgwResultaat and ZgwResultaatType can be optionally provided via Params there. If no resultaat is provided, the resultaat element should be absent.

<xsl:template match="ZKN:startdatum">
<ZKN:resultaat>
<ZKN:omschrijving>
<xsl:value-of select="$Resultaat/root/toelichting" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZKN:omschrijving should come from ZgwResultaatType->omschrijving. ZKN:toelichting should come from ZgwResultaat->toelichting.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resultaat value is not returned in ZakLa01 message (the return message to geefZaakDetailsRequest)
2 participants