Dynamically update REST Adapater Invoke connections in OIC

This article explains how to dynamically select and switch REST Adapter connections at runtime in Oracle Integration Cloud (OIC).

1. Create REST Connections

Create two separate REST connections in your OIC instance, each configured with a different Fusion instance URL.

Use this article to create connections.




2. Configure the Trigger Interface
Create a new integration and add an input query parameter to the trigger endpoint so the caller can specify which target environment to use.


3. Define a Connection Identifier Variable
Create an integration variable to store the target connection identifier dynamically.


4. Assign Connection Identifier via Switch Case
Use a Switch activity to evaluate the input query parameter and assign the appropriate connection identifier to your variable (e.g., HP_REST_TEST_1 or HP_REST_TEST_2).





5. Configure the REST Adapter Endpoint
Add the REST Adapter Invoke connection and configure it to fetch sales orders using the following relative resource path:
/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub



 6. Enable Dynamic Connection
In the REST endpoint configuration, check the Enable Dynamic Connection option and map your connection identifier variable to it.


7. Define Query Parameters
Configure endpoint query parameters such as limit and onlyData.


8. Map Parameters
In the mapper, map limit to 10 and onlyData to true.


Testing the Integration
Test the integration by passing different instance values as the input query parameter:




Test Case 1: Pass the parameter for TEST1. Observe that OIC dynamically routes the call using the HP_REST_TEST_1 REST connection.


Test Case 2: Pass the parameter for TEST2. Observe that OIC dynamically routes the call using the HP_REST_TEST_2 REST connection.



*/

No comments:

Post a Comment