I have been struggling with this since last week and have tried different methods to solve this. ProjectNumber in my RSD is defined as string but still when i get 123ProjectNumber456 as projectnumber i get an error
2025-01-24T15:27:32.136+01:00 3 153|Q-Id] HTTP|Res: 1924] {"description":"Budgettype 'approved' does not exist for projectnumber '123ProjectNumber546'"} 2025-01-24T15:27:32.136+01:00 2 153|Q-Id] HTTP|Res: 1924] HTTP/1.1 404 Not Found, 107 Bytes Transferred 2025-01-24T15:27:32.136+01:00 2 153|Q-Id] HTTP|Res: 1924] Error: HTTP protocol error. 404 Not Found. Stack: at dwo230y.w.De(String )
I have tried sorting out the given project with this code but it didnt work
</api:if> <api:else> <!-- Set revisionType when condition is true --> <api:set attr="detailsIn.revisionType" value="approved"/>
I have also tried the follwing but its not working
<api:if condition=""touchIn.cleanedProjectNumber | eq('123ProjectNumber345') | not()]"> <!-- Set revisionType when condition is true --> <api:set attr="detailsIn.revisionType" value="approved"/>
Any suggestions:
<api:script method="GET"> <api:call op="jsonproviderGet" in="touchIn" out="touchOut"> <!-- Remove all blank spaces from projectNumber and store in a variable 'cleanedProjectNumber' --> <api:set attr="touchin.cleanedProjectNumber" value=""touchOut.projectNumber | trim()]" />
<!-- Use the variable cleanedProjectNumber' in the URI --> <api:set attr="detailsIn.URI" value=""detailsIn.URITemplate | replace('{projectNumber}', touchin.cleanedProjectNumber])]" />
<!-- Get only 'aproved' budgets --> <api:set attr="detailsIn.revisionType" value="approved"/> <api:call op="jsonproviderGet" in="detailsIn" out="detailsOut">
could it be "description":"Budgettype 'approved' does not exist for projectnumber '123ProjectNumber546'" is the main issue? I.e. your testdata does not contain an expected value for budgettype?
I have worked with that possibility too. NOT() is not recognized
<api:script method="GET"> <api:call op="jsonproviderGet" in="touchIn" out="touchOut"> <!-- Remove all blank spaces from projectNumber and store in a variable 'cleanedProjectNumber' --> <api:set attr="touchin.cleanedProjectNumber" value=""touchOut.projectNumber | trim()]" />
<!-- Use the variable cleanedProjectNumber' in the URI --> <api:set attr="detailsIn.URI" value=""detailsIn.URITemplate | replace('{projectNumber}', touchin.cleanedProjectNumber])]" />
<!-- Get only 'aproved' budgets --> <api:set attr="detailsIn.revisionType" value="approved"/> <api:call op="jsonproviderGet" in="detailsIn" out="detailsOut">
But since i got an error for the other two types (apporved, postApproved) i tried with this step which allowed the RSD-file to run and i can see in log that there are projects with projectType approved but as soon as 123ProjectNumber456 comes i get an error.
Could it be that there something wrong with this statment?
it seems like you are running ETL in your rsd. I would not build a load of logic in .rsd files as this is fragile. If you load the data into TX, you can add handling there to deal with missing data. Even better would be to correct the business process; if the data is mandatory, there is an issue if it is missing after all.
Building the logic in TX would be ideal but as long as the value of budget is manadotry, i can not load the data in ODX.
As for the busniess logic, i can try.
@rory.smith I have changed the projectnumber in source and still get the same error for the same record.
I have redefined the script. Now, i dont get an error (yet), but it shows only one project
I have managed to solve it. It is the second time this setting has solved data extraction issues that doesnt make any sense at all. I would appriciate if someone can shed some light on what this setting is and should i always have it on TRUE