Are you an architect, developer or project manager working with Oracle Integration Cloud (OIC)? Are you looking to optimize your integration processes using Oracle Cloud Infrastructure, (OCI) but don’t know where to start? This article is for you.
The OCI function is a powerful solution for extending OIC’s capabilities, especially when you need to :
- Handling large files
- Manage complex processes without impacting OIC performance
- Automate specific, resource-intensive tasks
- Ensure better scalability of your integrations
In this practical guide, we’ll show you step-by-step how to configure and call an OCI function from OIC, based on a real-life case of automating ZIP file processing.
Prerequisites and initial configuration of an OCI function in Oracle Integration Cloud
Background and objectives of the integration project
As part of our customers’ continuous integration and business process improvement initiatives, we recently implemented an automated solution for processing ZIP files containing hiring-related documents. The aim of this solution is to be able to modify file names containing special characters that are not accepted by OIC, before each processing. It should also be possible to monitor this solution in OIC.
Discover also our best practices and mistakes to avoid in Oracle Integration Cloud.
Technical architecture and performance considerations
Given the existing architecture, where several integrations are already running in production with schedules specifically programmed to avoid overlap, it was essential to ensure that the addition of this new integration did not overload the resources allocated in Oracle Integration Cloud.
To meet these needs, we opted to use an Oracle Cloud Infrastructure* Function, guaranteeing scalability without the risk of exceeding ICO calculation limits.
It’s important to note that another solution based on OIC alone could also have been envisaged. Using the OIC library in Javascript.
To find out more about OIC Gen3’s new features, read our detailed article
Configuring dynamic OCI groups for integration with OIC
To enable our function to operate autonomously and securely, we used dynamic groups. A dynamic group in OCI is a set of resources, such as functions or calculation instances, that are grouped together on the basis of specific attributes or conditions. This allows us to define which resources can interact with other services in OCI, such as Object Storage or OIC, without having to manage individual users.
Step 1: Logging in and navigating the OCI console
Log in to the OCI console. Go to Identity > Domains. Select the compartment containing your environment, then click on Dynamic Group.
Step 2: Dynamic group creation with identification rules
Create a dynamic group.
- Rule 1: resource.id = ‘Customer ID
- Customer ID can be found by going to Identity > Domains > [compartiment] > Oracle Cloud Services, then selecting the service with the description “Integration Cloud Service”.
Setting up OCI policies to manage access rights
To give these dynamic groups the necessary rights, we have set up policies. In OCI, policies are rules that control access to resources and services within the cloud infrastructure. In our case, we’re going to create policies allowing our OCI function to access files stored in Object Storage.
Step 1 Configure function management rights
Log in to the OCI console. Go to Identity > Policy and create a new policy.
Step 2 Setting up access to buckets and objects
Add the following policy statements:
- Allow dynamic-group <Compartment>/<Name of the Dynamic Group> to manage functions-family in compartment <Compartment>
- Allow dynamic-group <Compartment>/<Name of the Dynamic Group> to manage buckets in compartment <Compartment>
- Allow dynamic-group <Compartment>/<Name of the Dynamic Group> to manage objects in compartment <Compartment> where target.bucket.name= ‘<BucketName>’
These policies will enable you to use the“OCI function” component as well as the “Object storage” component.
Creating and deploying an OCI function
The OCI function, on the other hand, is a serverless service that runs automatically in response to events or API calls.
Step 1: Logging in and navigating the OCI console
Connect to the OCI console.
Step 2: Application creation
Go to Developer Services > Functions > Applications, then click on “Create an application”.
Step 3: Using Cloud Shell for deployment
Create the function via the Cloud Shell, following all the start-up steps.
- Follow the “Getting Started” steps.
- For step 4: Write [repo-name-prefix] in lower case.
- For step 5: When you generate the token, be sure to copy/paste it and save it in a safe place.
The function can be created using a variety of programming languages.
Once you’ve created your function, an image of it will be generated, and you’ll be able to access it via an invocation endpoint.
If you’re using NetSuite, see our complete guide to setting up the NetSuite connector.
Step 4: Function modification with CS Code
- Modify your function using the Cloud editor (VS Code).
- Open the Cloud editor
-
- Go to your own repository and find your function. For example, for a Python function, open func.py, modify the code, then save it with Ctrl + S.
- After saving the new Python code, return to the Shell command and deploy the new function.
Use the OCI Function component to invoke the function from OIC.
Advanced use cases for OCI functions with OIC
The OCI function we used to rename files as part of the OIC integration is just one example of the many possible use cases. Here are a few other scenarios where OCI Functions can be particularly useful:
- Real-time data processing
- Automation of maintenance tasks
Find out how we supported Club Med in its successful migration to OIC Gen3.
Conclusion and outlook for OCI from Oracle Integration Cloud
In conclusion,using OCI Functions in our project enabled us to meet specific automation and flexibility needs, while ensuring that the architecture could evolve without compromising performance or resource management.
OCI Functions are a powerful tool for optimizing and automating a wide range of business use cases, from file management to the orchestration of more complex services. Contact us to discuss your needs and benefit from SQORUS expertise.
*2 million calls per month and 400,000 GB-seconds of execution time (Free Tier).
**Oracle Cloud Infrastructure (OCI) Functions supports several popular programming languages for developing serverless functions.
Here is a list of the main programming languages you can use to create functions in OCI Functions :
1. Python
2. Node.js (JavaScript)
3. Java
4. Go
5. Ruby
6. .NET Core
These languages are supported via OCI Functions-specific base images, enabling you to quickly deploy functions written in these languages. You can also create your own customized container images to run functions in other languages or with specific configurations.
All about IT project governance
Discover the roles and responsibilities of key profiles, as well as best practices in governance and technological development, to ensure the success of your digital transformation projects.