Menu

Oracle ICS and Twilio: Publish-Subscribe Integration Pattern

Oracle Integration Cloud Service (ICS) is a new Oracle Cloud Service that allows for easy integration between cloud or on-premise systems. The various pre-built adapters allow for easy endpoint configuration so that the integration developer can focus on the integration logic. Custom adapters can be built for non-standard integration endpoints.

ICS can be accessed from the URL below, where identity domain is how Oracle groups the various cloud services purchased in the subscription.
(https://integration-identity_domain.integration.us2.oraclecloud.com/ics/faces/global)

Oracle ICS Use-Case using Twilio

To illustrate the publish-subscribe integration pattern of ICS, we'll build a simple integration flow which accepts a JSON message over a REST endpoint, publish the message to ICS messaging and then consume/transform it before sending it off to Twilio (third party provider of SMS/Notification services).

Create Twilio Invoke Connection - RXR_SMS

To build an interface, we need to configure the connections first. Navigate to Designer > Connections
Click New Connection and select Twilio adapter
Enter Connection Name to uniquely identify this connection

Click Save to save the newly entered credentials. Click Test to test connection and get the progress to 100%. Save again before exiting connection configuration

Create REST Trigger Connection - RXR_ALERT

Next create a Trigger REST connection so that it can serve as the incoming endpoint of an integration.
Protect the REST endpoint with HTTP Basic security. Credentials will be any user configured in the identity domain e.g. cloud.admin

Click Save, Test and Save again before exiting.
Now we have an incoming connection ie Trigger and an outgoing connection ie Invoke that we can hook up in our publish-subscribe integration pattern.

Integration #1: Publish - RXR_REGISTER_ALERT

Create the publish integration first. This will accept a REST JSON message and publish to an internal ICS messaging queue.
Enter package name so that integrations can be grouped together and exported/imported into an ICS instance
Drag RXR_ALERT connection onto the Trigger side of the integration
Configure endpointname, URI, POST action and enable request payload

Provide sample request JSON message

Ensure request payload type has changed to JSON

Save integration and drag an identifier for tracking

Ensure progress has reached 100% and then exit integration.

Activate the Publish to ICS integration so that it allows sending messages to the queue. Enable tracing to log payload into activity stream

Click info to view endpoint

Invoke service using ReadyAPI or Postman. Note add the URI /alert to the end of the endpoint url.

Integration #2: Subscribe - RXR_SEND_SMS

Next create the first subscriber to send sms using Twilio Invoke connection

Select Published Integration to subscribe to
Drag and Drop Twilio Invoke connection

Create map to populate sms content

Click Save and Exit to complete configuration

Activate the new subscriber

Send alert message again through Postman or Ready API

The integration is invoked and an sms is sent almost instantly!
Go to monitoring to view the instances.
You may create additional subscribers to send email, save alert to Database or invoke a PCS process.