For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi,
In my integration, I got the Null value as response in one of my source as shown below. I used this field in my mapper to map to target.
{ "x_total_deposit": 1000, "x_avail_deposit": null, "x_return_status": "S" }
I got the Translation error when I invoke the OIC API, since null value is mapped to end response field.
{ "type" : "10.5.3", "title" : "exception occurred while translating the response into the accepted media type.", "detail" : "oracle.cloud.connector.api.CloudInvocationException: ORABPEL-15236\n\n", "o:errorCode" : "TRANSLATION-ERROR-01", "o:errorDetails" : [ { "type" : "NA", "instance" : "NA", "title" : "NA", "o:errorPath" : "NA", "o:errorCode" : "NA" } ] }
How to handle the null value in the mapping in OIC?
Thanks,
Mohan
Which API is this? Can you try with '' i.e. two single quotes or with "NULL"?
Hi Monish,
This is third party API. If I got the null as a response in the Source, I got the translation error. If we have the value then my OIC API working.
Thanks,
Mohan
Make sure your x_avail_deposit on the target side of mapping has nillable="true" in the schema. Right now, OIC JSON doesn't support setting the nillable attribute by default.
Hi Hemanth,
My Target connection is Trigger Rest API not a third party API. My source only third party API.
So we could not set the nullable = true in OIC?
Thanks,
Mohan
You can import OIC IAR file in JDeveloper and can see artifacts like schema, map file.
Check https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icsug/importing-map-file-oracle-jdeveloper.html for importing IAR file in JDeveloper.
I believe you will have to deal with if-else conditions in the mapping to avoid passing 'null' value further. You can identify all the elements which may send out null values and put the conditions. Though this is not good approach, but a way out.
HI @Mohana:
You can use IF statement (only map it if the source value is not 'null').
Thanks.
I believe you will have to deal with if-else conditions in the mapping to avoid passing 'null' value further. You can identify all the elements which may send out null values and put the conditions. Though this is not good approach, but a way out.