This section is applicable only if you have selected Content based routing while defining the definition of the Template. Using this option, you can fetch and process files exchange data between the Partners based on the content of the file. You can route the data on the basis of Transaction Parameters defined while creating a Template or Partner Parameters define while creating a Network. Therefore, before defining routing, ensure that you have defined the Transaction parameters or Partner parameters.
After you have defined the Source application, you need to define the routing.
Prerequisites
Ensure that you have defined the Transaction parameters or Partner parameters.
To define routing:
- Clickto create a new routing.
- On the Create Routing window, provide a unique routing name.
Select whether you want to fetch and process data on the basis of Transaction Parameter or Partner Parameter.
Option Name Description Based on Transaction Parameter Select this option to fetch This option will bring and process the data based on the parameters defined for a Transaction. Based on Partner Parameter Select this option to fetch This option will bring and process data based on the parameters defined for a Partner.
Depending on the option chosen in the previous step, the next steps would differ.
Type the xpath ofFor Transaction Parameters
For example, there are three files (F1, F2, and F3) with headers ID, Age, and Name and values F1 (001, 23, Smith), F2 (002, 43, John), and F3 (003, 45, Michael). If you want to route data on the basis of Transaction parameter whose id is 002 and Name is John then you need to define the Destination Identifier as follows:
- In the Destination Identifier, type the XPath of the field on the basis of which you want to
- route the data
- Select Equals from the Condition drop-down list.
- Depending on the option chosen in the Step 3, the list of all parameters will populate in the Parameter drop-down list. Select the parameter that you want to map.
- You can also fetch the data based on different conditions using AND or OR filters.
AND filter combines two or more filters and returns true only if all of its enclosed filters returns true.
OR filter combines two or more filters and returns true if any of its enclosed filters returns true.- . As in our example, to route the data on the basis of Id and Name then XPath will be /Root/Record/Id and /Roor/Record/Name. The XPath will differ based on the file type.
- Select Equals from the Condition.
- Select the parameter of the Transaction Partner that maps corresponding to the field.
- Click AND Filter to add another identifier in a similar way.
Partner Parameters
For example, there are three text files (F4, F5, and F6) with headers Age and Designation and values F4 (23, Developer), F5 (35, Manager), and F6 (51, Team Lead). If you want to send data whose Age is 35 with Manager as Designation then you need to define these fields in the Destination Identifier as follows:In the Destination Identifier, type the XPath of the field on the basis of which you want to send the data. As in our example, to send the data to the Partner on the basis of Age and Designation then XPath will be /Root/Record/Age and Root/Record/Designation. The XPath will differ based on the file type.
- Select Equals from the Condition.
- Select the parameter of the Destination Partner that maps corresponding to the field.
Click AND Filter to add another identifier in a similar way.
- Click Save.
Next Step