Usecase: Here, we will create a reusable component or integration which will take any data XML or Json or etc as binary data and simply save as Text to database table as clob type.
Follow my below blog how to save XML or Json file into stage and then save the request payload into Database table as clob type.
https://soalicious.blogspot.com/2023/10/oic-save-integration-request-payload.html
Logic flow:
- Create a database table with payload column as clob type.
- Create a rest trigger and database connection.
- Create an app driven integration and configure the rest trigget and request payload format as binary.
- Configure the database table to insert the payload.
- Map the binary request payload to database payload using decodebase64(encodeReferenceToBase64(Stream Reference) functions (Basically we are converting the stream reference to base64 data and then decode the base64 data).
Table create:
CREATE TABLE OIC_TRACKING(
Id INTEGER PRIMARY KEY,
Payload CLOB,
Integration_Name VARCHAR2(100),
Integration_Identifier VARCHAR2(100));
Detailed steps with screenshots:
Integration flow:
No comments:
Post a Comment