In this blog, I am going to show you how to use Oracle Integration Cloud Service's ‘Local Integration’ feature to invoke an integration from another integration. With the advent of this new feature, you don’t need to create any explicit connection for the integration you want to call. To utilize this feature, you will need to turn on "oic.ics.console.integration.invoke.local.integration" feature flag.
We will be creating a new Integration Invoke Hello World to call "Hello World" integration. The "Hello World" integration is delivered with OIC as a sample. For more info on the "Hello World" sample see: https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icsug/running-hello-world-sample.html
First activate the Hello World Integration. Then, follow the steps below to create the "Invoke Hello World" integration.
- From the Integration list page, click on "Create" and Select "App Driven Orchestration" and provide the name as "Invoke Hello World" and create the integration.
- We will create a REST trigger which will take name and email as parameter. In order to do that, drag and drop "Sample REST Endpoint Interface" as the trigger or use In-line menu to add that and follow through the wizard. "Sample REST Endpoint Interface" connection should be already in your system.
Drag and Drop Local Integration
- Click on Integration Artifacts, click on Business Integrations and then drag and drop "Local Integration" on the integration after the Rest Trigger (getNameAndEmail).
- This will bring up the Local Integration wizard. Provide Details and click Next.
- This page shows the list of all the activated integrations that you can invoke. You can type the integration name to filter the integration list. Select "Hello World (1.2.0)" and click Next.
- Select the Operation and Click Next.
- In the Summary screen, click on Done.
- Now edit the "CallHelloWorld" Map to map the name and email.
- Confgure/Edit the "getNameAndEmail" Map
- Now, save and close the Integration.
- From the landing page, activate the integration. Also enable Tracing and Payload during activation.
- Run the integration using the Endpoint URL, you can past the URL in browser and run it. It will be similar to https://host/ic/api/integration/v1/flows/rest/INVOKE_HELLO_WORLD/1.0/info?name=[name-value]&email=[email-value]
- Go to Monitoring->Tracking to monitor the integration run. You will see the Hello world Integration was successfully called from the Invoke Hello World integration. You can also go to the Hello world instance from this page. Click on the "CallHelloWorld" local integration invoke and select "Go to Local Integration instance.." Icon. It will show you a popup, click on "Go" to see the Hello World instance which will open up in an new tab. This functionality is only applicable for REST or SOAP based invoke and doesn't apply to Scheduled Orchestration.
How to Invoke a Scheduled Orchestration
You can also invoke a scheduled orchestration from another integration. You can only call the scheduled orchestration as "Submit now".
I will be creating a new integration Invoke File Transfer which will call the "File Transfer Sample". For more info on File Transfer Sample, see https://docs.oracle.com/en/cloud/paas/integration-cloud-service/icsug/running-file-transfer-sample.html
- First activate the "File Transfer Sample". Then create a scheduled orchestration "Invoke File Transfer" and drag and from the local integration. Go through the wizard and select the "File Transfer Sample" as the local integration and "runNow" as Operation. See above "Drag and Drop Local Integration" for details. Now edit the "CallFileTransfer" Map.
- In the mapper click on the action to go to the "Build Mapping" screen to enter "NOW". This is the important step to run a scheduled orchestration.
- Configure tracking. Save and Close the integration.
- Activate the "Invoke File Transfer" and from the menu click on Submit Now to run the integration. From the Monitoring→Runs page you can see the runs. As you can see from the below screenshot, "Invoke File Transfer" ran and in turn called the File Transfer Sample.
In this blog, we have learned how to use "Local Integration" feature to call another integration. It is a good practice to break a large integration into multiple smaller integrations using this pattern which promotes better design and provides modular functionality for easier maintainability.