X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

How to invoke an Integration From another Integration in OIC without creating a connection

Arif Rafique
Director, Software Development

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.

Create 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. 

Join the discussion

Comments ( 7 )
  • John Graves Friday, October 26, 2018
    FYI, I don't see this feature flag "oic.ics.console.integration.invoke.local.integration" in the reference you gave... https://blogs.oracle.com/integration/enabling-the-future-today-feature-flags-in-oracle-integration-cloud
  • Durga Charan Friday, November 9, 2018
    When trying to call one integration from another integration getting below error. How to resolve this one ?

    The server encountered an unexpected condition which prevented it from fulfilling the request. OWSM could not identify subject from http request
  • Jerry Osmus Thursday, January 3, 2019
    Hello,
    Is there a way to invoke a more complex orchestration from an OIC subscription. The functionality from those integration styles seem limited in the type of flow you can build. Or would you have to use the same pattern as described in this article and have the Subscriber flow invoke an app driven orchestration? Thank you in advance for the help.
  • Antony Reynolds Monday, April 1, 2019
    @Durga that problem should be resolved in latest builds.
  • Antony Reynolds Monday, April 1, 2019
    @Jerry not sure what you are looking for. Both scheduled and app driven orchestration support the local invoke and this can be used to support common sub-component integrations as well as to provide better modularization. Can you reach out to let use know more specifics.
  • Vijay Wednesday, August 7, 2019
    Hi Arif

    We are trying to connect Salesforce application with Oracle Cloud using OIC middleware.
    we have created one integration which connects with Salesforce using Outbound message WSDL .
    We are able to call OIC integrations from Salesforce however getting an error while callign local integration from Main OIC integration .

    Here is the current process
    1. ServiceMax trigger OIC websevrice usign Outbound Message WSDL - Successful
    2. OIC main program will call another local integrations. - Error

    Error is related to "Bad response: 401 Unauthorized"

    Do we need to provide any user/pwd information while calling Local integration also ?

    Vijay
  • Andres Farias Friday, August 9, 2019
    Hi!

    I wished to ask whether there is any performance improving by using this, or is it just syntactic sugar?

    Andres
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.