Wednesday, September 14, 2022

OIC - How to invoke OCI Function from Oracle Integration Cloud

Usecase: Here, we will call a helloworld OCI oracle function from Oracle Integration Cloud.

This feature allows OIC to invoke custom code deployed in this serverless framework, thus expanding its range of capabilities.

Highlevel steps:

  1. Create a rest connection with the function invoke endpoint, received from the OCI.
  2. Create an integration and invoke function invoke endpoint and feed input name and get the response back from the function.

Detailed Steps:

Step1: First create a function in OCI console. You can follow my previous blog:

OCI Create a deafult helloworld oracle function in Oracle Cloud Infrastructure console

Step2: Create a Rest connection

To create rest connection, we need following information:

Connection type: REST API Base URL

Connection URL: this we will get from the function invoke endpoint.

Security: OCI Signature version 1

Tenancy OCID, User OCId, Private Key and Fingerprint: follow my below blog to get them from OCI.

OCI - How to get Tenancy OCID, User OCID, Private Key and Fingerprint

Step3: Create an Integration to call the function.

I have created an App driven Orchestration integration

Integration flow:

Configure expose side rest request and response part. One Input : inputName and output: Response

Call the created rest connection and configure function invoke part:

URI: get ot from OCI function endpoint
Verb: post

Select request and response payload as binary and text/plain.

Map the input to the function call. 

Map the function response to rest response.


No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...