Integrate Oracle IoT Cloud Service with Oracle Integration Cloud Service

You can integrate Oracle IoT Cloud Service with an already existing Oracle Integration Cloud Service instance by defining a new ICS integration and using REST to connect it to an integration in your IoT Application.

You must already have access to an Oracle Integration Cloud Service instance before you can integrate it with Oracle IoT Cloud Service.

  1. Create an ICS Connection.
    1. From the Connections console, click Create.
    2. Select the REST connection adapter. The REST Adapter exposes an Oracle Integration Cloud Service integration flow as a REST service.
    3. Fill in the New Connection - Information dialog box, including the Connection Name and Connection Identifier. For Connection Role, use “Trigger and Invoke”. Enter a description.
    4. Click Create.
    5. On the REST Connection page, modify the appropriate Connection Properties. For the Connection Type, choose “REST API Base URL”, select an appropriate TLS Version, and enter a desired Connection URL based on the current ICS server (such as https://myicsserver.domainname.com/send).
    6. Enter a desired Security policy for the REST connection, such as “Basic Authentication”.
    7. Configure any Agent groups if desired.
    8. Click Test to test the REST connection.
    9. Once the connection has been successfully tested, Save the connection.
    10. Click Close.
  2. Create an ICS Integration
    1. From the main menu, choose Integrations.
    2. Click Create.
    3. Select Map Data.
    4. Fill in the Create New Integration dialog box, including the integration name, identifier, and version. Enter a description and the package information, if applicable. Click Create.
  3. Create a trigger.
    1. On the right side of the page, find the ICS Connection you created earlier. Drag this connection to the “Drag and Drop a Trigger” icon on the left side of the screen.
    2. In the Configure Oracle REST Endpoint dialog box, enter the endpoint name, a description of what it does, a relative URI (for example, /iotmessages), and choose the action as POST. Check the Configure a Request Payload checkbox. Click Next.
    3. In the Configure the Request Payload dialog, configure the request information to match the data format that will be sent to the Oracle Integration Cloud Service. If necessary, select JSON Sample in the Request Payload File pane and provide a JSON sample file from the Oracle IoT Cloud Server.
    4. Click Next.
    5. Click Done.
  4. Create an invoke.
    1. On the right side of the page, again find the ICS Connection you created earlier. This time, drag this connection to the “Drag and Drop an Invoke” icon on the right side of the screen.
    2. In the Configure Oracle REST Endpoint dialog box, enter the endpoint name, a description of what it does, a relative URI (for example, /), and choose the action as POST. Check the Configure a Request Payload checkbox. Click Next.
    3. In the Configure the Request Payload dialog, configure the request information to match the data format that will be sent from the Oracle Integration Cloud Service. If necessary, select JSON Sample in the Request Payload File pane and provide a JSON sample file from the Oracle IoT Cloud Server.
    4. Click Next and note the URI of the REST service in the resulting dialog pane.
    5. Click Done.
  5. Create the mappings and tracking.
    1. Click on the Click Below to Create Map icon in the middle of the page, then click the Plus (+) icon.
    2. Map each of the target parameters on the right side to a source parameter on the left side.
    3. Click Save and Close.
    4. From the menu in the upper right, select Tracking.
    5. In the Source pane, under “execute/request-wrapper”, drag up to three fields to the right side of the screen.
    6. Click Done.
    7. Click Save.
    8. Close the integration by selecting Close in the upper right.
  6. Activate the ICS integration.
    1. Slide on the circular slider near the right side of the integration entry to activate the newly created integration. A confirmation window will appear. Select the checkbox to enable tracing if desired, then click Activate to continue.
    2. Click on the "i" icon near the right portion of the integration listing to open the details screen, and make note the Endpoint URL in the raised panel. In order for an IoT/ICS Integration to send data, we will need a slightly modified version of this endpoint URL to give us the required values for an IoT/ICS integration.
    3. To modify the URL, remove /metadata and add the REST endpoint created in Step 3. For example, if the endpoint is listed as https://icsserver/integration/flowapi/rest/IOTCSINTEGRATION1/v01/metadata, remove /metadata and add the defined ICS Integration REST Endpoint (for example, /iotmessages). The final URL should be of the form https://host:port/integration/flowapi/rest/INTEGRATION_NAME/VERSION_STRING/RESOURCE_URL.
  7. Configure the IOT settings.
    1. On the IoT Server UI, choose Settings. Under Trusted CN, enter the server name of the desired ICS instance, such as integration.d12.c1dev1.domainname.com.  Without this, you will not receive messages sent to ICS and the IoT log will consist of messages indicating a hostname verification error.
  8. Create the IOT integration.
    1. Select Integrations, then Create Integration and choose Integration Cloud Service.
    2. Present a name and description for the integration. For the URL, use the base URL derived earlier without the integration name, version string, and resource URL. For example, https://icsserver.integration.dc1.c1dev1.domainname.com/integration/flowapi/rest.
    3. Enter the proper authentication based on the values entered in Step 1 earlier and press Create.
    4. Identify the streams that you wish to add within the Streams tab of the IoT/ICS Integration.  Each stream entry should have a corresponding pre-made ICS Integration that defines a mapping of the stream's message format to the appropriate message format