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
Hello,
I hope you can help me with the following. I have an integration where I need to push Opportunities to JDEdwars via standard REST adapter.
The Json request have some section that are arrays, but is creating some issues: formActions, gridRowInsertEvents.
The issue comes when OIC builds the request and send it over to JDE. It ignores the [] for the formActions section and gridRowInsertEvents sections, and also the {} that enclose command and controlID are also ignored. This is how OIC is building that request:
This payload is not accepted by JDE, leading to the record not being created.
Does anyone know what could I do here?
I have tried to add more repetitions within the arrays to force the [] to show up, which works, but the command and controlID section is still and issue, and is key as it is where we tell JDE to insert the record.
Thanks in advance.
Hi Kanchankumar,
I'll try to force the request to have more elements.
Thanks.
The issue comes when OIC builds the request and send it over to JDE. It ignores the [] for the formActions section and gridRowInsertEvents sections, and also the {} that enclose command and controlID are also ignored. This is how OIC is building that request:
How did you capture the request? Per my understanding, OIC doesn't add prefixes to the JSON (nsmpr6: in the sample you posted). If the request goes exactly, then the problem might be with the prefixed-elements as well.
Hi Hemanth,
I've captured the request in the activity stream (as XML) and then transformed to JSON format where I could identify the gap. I don't think that is an issue as other operation for the same service are working fine..
Thanks.
How did you transform? Which tool you have used? It could be a problem with the tool/transformation logic as well? What's you sampling for this request look like in REST Adapter? Are you able to see a repeating element for formActions, gridRowEvents, gridColumnEvents in mapping? Can you share the screenshot of mapping/configuration/the schema generated?
You can use stage action to write same json sample to a file, read opaquely, decode and see how the actual json looks like in OIC.
Hi Hemanth,
I've used this tool to transform the xml I got from the activity stream to json: http://www.utilities-online.info/xmltojson/#.XYCUcChKiUk.
In JDE we could confirm what the xml transformation suggested: that OIC is not closing properly the arrays, but also (and this is probably the key), the section with the command and controlID:
OIC is not considering command and controlID as 1 element of the form actions array, but two elements (removing the {}):
This is the sample Json, as JDEd is expecting:
Re: the repeating elements, I can create repeating elements for formActions and gridRowInsertEvents by right clicking and "Repeat Element" (check attachment). I just really need 1 formActions and 1 gridRowInsertEvents, but I have add extra elements (as shown in the screenshot) to test if that could fix the issue.
Thanks in advance
Hello,
thank you all for your help. I managed to find a solution by adding another formActions section like this:
This way, JDE is able to read the "nsmpr6:command": "DoAction", and "nsmpr6:controlID": "12" section and therefore insert the record.
Kind Regards
Hello,
thank you all for your help. I managed to find a solution by adding another formActions section like this:
This way, JDE is able to read the "nsmpr6:command": "DoAction", and "nsmpr6:controlID": "12" section and therefore insert the record.
Kind Regards