July 3, 2023

Oracle Integration Cloud Event in OIC3

Oracle Integration Event is a new feature introduced as part of OIC3 23.04 release. This is a replacement for Publish/Subscribe Integration Pattern from OIC2 and helps in decoupling publishers and subscribers. In OIC3 you can create Events in JSON format to publish and multiple subscribers can subscribe to those events.

In this blog, I will show how we can create a Event in OIC3 and create a Publisher to publish the event and few subscribers to subscribe the event. 

For demo purpose we will expose a OIC REST endpoint which will be triggered from an external application with the Sales Order detail and this will publish a Sales Order OIC Event which will be subscribed by 3 subscribers. First subscriber will create the Sales Order in ERP Cloud. Second Subscriber will create the Order entry in ADW. Third subscriber will write the Order detail file in a FTP. 

Define Event

Login to Oracle Integration Console then Home >> Design >> Events 







Here, I can see my list of events that I have. Click on Create to create a new Event  






Give an event name and description, then click Continue














Define the shape of event either by uploading a sample JSON file or type in










One can edit an existing Event and add additional fields if required





Create a Publisher Integration

Login to Oracle Integration Console then Home >> Design >> Integrations and Create an App Driven Orchestration integration














Click on + sign and choose the REST Trigger Connection

















Under actions there is new action called Publish event, which can be used to raise an event. Event is treated just like a local invoke in OIC







Choose the event which need to be raised/publish. If required, you can also define new events from here























Complete the mapping from trigger to publisher






Define SourceTransactionNumber as Primary business identifier for tracking 








Save the Publisher Integration and Activate 






Create a Subscriber Integration to Sync Sales Order in ERP Cloud

We have a new pattern for event Subscription. Event pattern allows you to subscribe an event that is published by producer. The subscriber integration event is triggered when the integration publishing the event is run. 

Navigate to Design >> Integrations and Create an Event based integration


























Choose the event to subscribe 







Complete the Integration flow with ERP Cloud Invoke and mappings. You can refer my blog for detailed step. 

Save the Integration and Activate  






Create a Subscriber Integration to Sync Sales Order in ADW

We have a new pattern for event Subscription. Event pattern allows you to subscribe an event that is published by producer. The subscriber integration event is triggered when the integration publishing the event is run. 

Navigate to Design >> Integrations and Create an Event based integration



























Choose the event to subscribe 







Complete the Integration flow with ADW Invoke and mappings. You can refer my blog for detailed step. 

Save the Integration and Activate 






Create a Subscriber Integration to Sync Sales Order in FTP

We have a new pattern for event Subscription. Event pattern allows you to subscribe an event that is published by producer. The subscriber integration event is triggered when the integration publishing the event is run. 

Navigate to Design >> Integrations and Create an Event based integration



























Choose the event to subscribe 











Complete the Integration flow with FTP Invoke and mappings. You can refer my blog for detailed step. 

Save the Integration and Activate 





Testing and Validation

Publisher and Subscriber Integration are Active and ready for testing. 






We will Trigger/Run the publisher integration and the subscriber integrations event is triggered when the integration publishing the event is run. 







Note the SourceTransactionNumber  for verification







Navigate to Home > Observability > Integrations to Monitor integrations, here you can see along with the Publisher all three Subscriber Integration are also triggered. 








All the Integrations were completed successfully within few seconds only







Now lets verify the Order in all the target Applications 

FTP

ERP Cloud









ADW






We can see the Sales Order is successfully synced in all three systems. 

Sync Sales Order in ERP Cloud via Oracle Integration Cloud (OIC3)

Oracle Integration Cloud Service is a complete, secure, but lightweight integration solution that enables you to connect your applications in the cloud. It simplifies connectivity between your applications, and can connect both your applications that live in the cloud and your applications that still live on premises. Oracle Integration Cloud Service provides secure, enterprise-grade connectivity regardless of the applications you are connecting or where they reside.

Oracle Integration Cloud comes with a rich collection of pre build adapters. Oracle Integration Cloud adapters simplify connectivity by handling the underlying complexities of connecting to applications using industry-wide best practices. You only need to create a connection that provides minimal connectivity information for each system.

You can find the complete list of OIC3 Adapters from below official link - 

https://docs.oracle.com/en/cloud/paas/application-integration/find-adapters.html

 In this blog we will see how to integrate with ERP Cloud via Oracle Integration Cloud.  

Create ERP Cloud Connection

Login to Oracle Integration Console then Home >> Design >> Connections

Click on create and choose Oracle ERP Cloud adapter










Enter the name of connection and click create














Enter the ERP connection details and test connection







Create Integration

We will create a subscriber integration in OIC3. You can refer my blog for creating a OIC Event and a publisher integration

We have a new pattern for event Subscription. Event pattern allows you to subscribe an event that is published by producer. The subscriber integration event is triggered when the integration publishing the event is run. 

Navigate to Design >> Integrations and Create an Event based integration

























Choose the event to subscribe 



















Now we need to check if the Order already exits in ERP cloud or not, for that we will query the ERP Cloud using the SourceTransactionNumber  from trigger

Click on the + sign and choose the ERP Connection created in previous step

















choose Action










choose Operation































Map SourceTransactionNumber  from trigger to query parameter in ERP cloud







Click on + sign after Invoke(GetSalesOrderfromERP) and choose Switch Action






configure the switch route











Click on the + sign in create route and choose the ERP Connection created in previous step

















choose Action











choose Operation

































Map CreateSalesOrderInERP request







Similarly complete the update route(otherwise). Once completed, flow will look as below - 






Define SourceTransactionNumber as Primary business identifier for tracking 











Save the Integration and Activate