Content-based router is a pattern to route messages to different receivers, based on content from message.

Example:
File R1_AAA.txt have first column with value “R1”, then route this message to receiver BC_R1
File R2_BBB.txt have first column with value “R2”, then route this message to receiver BC_R2

content-based-router-overview-flow

Major steps:

Create iFlow “IF_Content_Based_Router” like below. The focus here is the Recipient List. For other configuration detail like the file adapter, please refer previous post. It is same concept.
content-based-router-iflow-graphical

Click Recipient List, then edit the properties at below. Create 2 routing rules using Xpath:
content-based-router-iflow-recipient-list-xpath

The namespace will be automatically filled in, probably is get from the sender service interface.
content-based-router-iflow-recipient-list-namespace

Saved, Activated and Deployed iFlow “IF_Content_Based_Router”. We’re done the steps.

Now go to integration directory, you will see ICO created:
content-based-router-ico-inbound-processing

2 Receiver, xpath condition is here:
content-based-router-ico-receiver

2 Receiver Interfaces:
content-based-router-ico-receiver-interfaces

2 Outbound Processing:
content-based-router-ico-outbound-processing

Reference:
help.sap.com | Defining Content-Based Routing
help.sap.com | Defining a Recipient List
help.sap.com |Defining Conditions

加油再加油 = Go For It! Just Do It!  🙂

Enterprise Integration Patterns – Stateless – Content-Based Router
Tagged on:         

One thought on “Enterprise Integration Patterns – Stateless – Content-Based Router

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.