Skip to main content
Version: 4.10.1

Content Router component

The Content Router component is able to route messages from an inbound connector to other components based on their content.

Configuration

Example usage of Content Router component

The Content Router component has the following general configuration options:

A Content Router component can also have one or more rules. A rule has the following configuration options:

Namespace

Description

The namespaces that is used in the XML message.

Exchange pattern

Options

  • One way
  • Request reply (default)

Description

This option determines how the messages are sent to each connected rule. One way means that the component will process each rule in a asynchronous way so order is not guaranteed. This means that the component will not wait for the matched route to be completed. This will improve performance when processing many messages.

Request reply is the opposite of the One way option. This is a sequential way of routing which will guarantee the order of the connected rules. The rules will be executed from the top to bottom and it will wait until each connected route is finished before going to the next rule.

Remarks

  • For Request reply the timeout option of the flow may need to be increased when the splitting process can take some time.
  • The response to the caller will be the existing Exchange body before reaching the first One way component in the flow.

Rule name

Description

A name to identify the filter when connecting to another component.

Remarks

The rule name has the following restrictions:

  • It may not contain capital letters.
  • It may not be the word otherwise as it is already taken.
  • It may not contain spaces.
  • It must be unique.

Expression Type

Options

Description

The language of to define the expression with.

Expression

Description

Define the expression that acts as a filter.

Remarks

  • There will always be an otherwise rule. It will not appear in the properties view. It acts as a bin for the remainder of the messages that do not satisfy the expression rules you defined.
  • Each expression can only be used once to connect to another component
  • The expressions are compared with the exchange one after another. When the exchange matches an expression, the exchange will be sent to the component that is connected to it. The exchange will not be compared with other expressions and will just go on in the flow.

Namespaces

You can also set the namespace used in a XML message. If you don't specify the namespace, your XPath expression will not recognise anything. For example, you have the following message with a namespace:

<INBOUND_ORDER xmlns="urn:ifsworld-com:schemas:handle_inbound_order">
<DELIVERY_LEADTIME>1.0</DELIVERY_LEADTIME>
<DELNOTE_DATE>2013-05-17T09:07:58</DELNOTE_DATE>
</INBOUND_ORDER>

In this case, you need to specify the namespace property with: urn:ifsworld-com:schemas:handle_inbound_order. You would then prepend your XPath expression with ns.

The namespace abbreviation will always be ns. You are able to specify multiple Content Routers with different namespaces in the same Flow.

Designing with Content Router components

Example of dialog when connecting the Content Router component to other components

After adding a content router component and configuring it's rules, you can connect other components to the outbound connector of the content router component.

When you do so, you will be prompted to which rule you want to connect the new component. After selecting a rule, you see the connection between the two components and the name of the rule used to route to the new component (as shown above).

You can only select each rule once for each component; when you try to connect another component using a rule that is already being used, no connection will be made.