JSONPath router
JSONPath router
The JSONPath router is a producer which makes it possible to route messages to other flows based on selected JSON information. You can choose to send one message to flow A, another to flow B and delete yet another.
The routing works according to mappings and a JSONPath expression. The JSONPath expression determines which part of the message is evaluated against the mapping values.
When a mapping value is found, the message is sent to the flow that is referred to. If multiple mappings satisfy, the message is sent to multiple flows.
In routing, the full ConnectMessage and all associated headers and properties are always sent.
In the table below, you will find an explanation of these properties. All attributes with a ‘*’ are mandatory.
Attribute |
Description |
Name* |
By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional. |
Enabled |
Set this value to true, if you want this producer to be enabled. |
Default Flow |
If no matching route can be found, the message will be routed to this default flow. By default these messages are deleted. |
Inter adapter routing |
When set to true, Message Routing over interfaces is available. The default is false. |
Mapping |
Here you can set a Routing value and refer to a Flow. By pressing , you create one (or more) extra Routing Mapping rule. At Routing, you indicate for which returned value of a routerStrategy the message has to be routed. |
JSONPath expression |
JSONPath expression that will be executed on the messagepart. Result will be matched against the mapping. |
Result type |
Type of the expected result of the JSONPATH. Could be ARRAY, STRING or BOOLEAN. |
MessagePart |
Name of the MessagePart in a ConnectMessage where the content of the file is being stored. |
Description |
Description of the specific producer. This is for documentation purposes. |
In the table below, you will find an explanation about the properties of a mapping rule. All attributes with a ‘*’ are mandatory.
Attribute |
Description |
Routing value* |
Here you enter the expression value on which to route. |
Flow Name* |
Here you enter the name of the Flow to route to. |