Content-Based Routing with Integration Cloud Service

Robert van Molken
0 0
Read Time:4 Minute, 1 Second

In my previous article I discussed the fall updates of Integration Cloud Service. One of the features in this update is the possibility for content-based routing within integrations. I came across this feature during UKOUG Tech 15 in the beginning of December. In an two our hands-on lab I had some time to play with the content-based routing feature. The amazing thing is that it did it all on my iPad. In this article I will describe the feature and the steps to implement a common use-case. 

What does Content-Based Routing mean?

The fall updates introduced content-based routing, which essentially mean that based on a value in the payload a different flow is executed. A use-case for this type of routing is the possibility to retrieve data from a different application based on the country code. With Integration Cloud Service is as easy as adding a filter on the request operation of the source connection.

Content-based Routing

Step 1: Adding a filter to route on

The first step is adding a filter to route the request on. To demonstrate this I’m using an already existing integration. This integration receives a GET request for retrieving the information of an organization. The current integration always retrieves the organization from the US site.

Content-based routing - single site integration
To add a filter a user would click on the funnel icon. Clicking on this icon will open the Expression Builder. In the Expression Builder a user can set an expression to filter requests on. This can simply be done by drag n drop the field to filter on

For example on the field country: /nssrcmpr:processOrganization/nssrcmpr:organizationParty/nsmpr6:Country

Content-based Routing - Expression Builder
When exiting the Expression Builder a new empty branch within the integration is created and the integration canvas shows the filter set on the first/original branch.

Content-based routing - filter set

Step 2: Create new routing/branch

To create a new routing for the new branch a user only have to click on the dotted arrow in the branch view.

Content-based routing - New Branch
The user gets a new partly constructed integration. The source connection is the same, but the target connection is empty. The user can drag n drop the correct connection, needed for the other site, on the drop zone of the integration. For example our International Acme Rightnow instance.

Content-based routing - Second Acme instance
For each branch that is created you can enter an expression…

Content-based routing - Add another expression
… or choose the else statement for other request that don’t match the other expression(s).

Content-based routing - Else statement

Step 3: Every branch has its own mappings

It does not mapper which option you choose, for each branch you need to create a separate request and response mapping or export/import an existing one.

Content-based routing - New mappings
To switch between the created branches a user needs to click on the arrow below the expression. For example switching back to the original flow.

Content-based routing - Switch between branches
When in viewing mode instead of in editing mode the integration flow shows a branch icon to indicate there are multiple flows.

Content-based routing - Integration in vieweing mode

Step 4: Testing the integration

After completing the changes to the integration it should be (re-)activated. This only takes a minute.

Content-based routing - Activate Integration
It depend on the type of source connection how to test the integration. In this case the integration is exposed by a HTTP (SOAP) endpoint. In this case SoapUI is used to test the integration. The webservice is called two times. In the first call the main branch is tested by specifying USA as Country of the organization to retrieve. With the second call the ELSE branch is tested by retrieving an organization from the UK.

Content-based routing - Messages processed
With the monitoring capabilities the instances of the two calls can be tracked. A user can view a list of tracked instances by navigating to the tracking page.

Content-based routing - Tracking instances
When the user want to look at a specific instance it can by navigation to the page by clicking on the instance link. Instances are trackable by the given business indicator. In this example the business indicator is set on the Party ID. Let’s look at both instances.

USA instance
USA instance
UK/International instance
UK/International instance

Conclusion

Integration Cloud Service - OrchestrationAs you can see it is now very easy to extend your ICS integration to use multiple sites for retrieving data from or saving data to based on an expression. Right now the request can only be processed in one flow/branch. In the future ICS will get a new flexible, free-form UI Canvas which lets the user drag & drop endpoints, connect wires, configure routes and branches.

It will supports the already existing ICS features like tracking, mapping data. endpoint configuration, content-based routing and customization. New features are branching, looping and pipeline/chaining of callouts. This smells like BPEL to me, but more on this when it is available in the next year.

 

About Post Author

Robert van Molken

Robert designs and develops application integration solutions both on-premises and in the cloud. Traditionally the solutions where based on the Oracle Middleware Stack, but lately he advises solutions that use a more cloud-native or hybrid approach. Besides application integration development he is an advocate on Blockchain, IoT and Microservices. Robert is heavily involved in the developer community.He is an international speaker at conferences (CodeOne, TeqNation, Open World), author of two books, blogger, and participates in tech related Podcasts. For this effort Robert was awarded Oracle ACE Associate in 2015, Oracle ACE in 2016, and Developer Champion in 2017 (which was renewed from 2018 to Oracle Groundbreaker Ambassador).
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

AMIS Anniversary Conference – Beyond the Horizon

Katwijk, The Netherlands is the place to be on June 2 and 3, 2016. Why? Because the AMIS Anniversary Conference “AMIS 25 – Beyond the Horizon” takes place at the former military airport Valkenburg in Katwijk. Renowned Conference Speakers We are organizing this Conference because of our 25th anniversary. Many ACE […]
Anniversary Conference AMIS 25 - Beyond the horizon
%d bloggers like this: