Exercise 3.4 – Chaining Routes
Purpose:
To practice chaining multiple Routes together and testing them with the eiPlatform emulator.
Create the Routes
- From the eiConsole File Management screen, select the Add Route button.
- In the dialog that appears, enter the name Chained1 – Start Route and select OK.
- Select the Add Route button again, enter the name Chained2 – End Route, and select OK.
- Both Routes should now be in the table in the File Management screen.
Configure End Route (The Second Route)
- The second Route needs to be configured first, since it is referenced in the first Route.
- Double-click on Chained2 – End Route to open it to edit.
End Route – Document Source System
- Select the Source System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Change the System Name to Chained1 – Start Route
- Leave the icon alone.
End Route – Configure the Listener
- Select the Listener stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Select Programmable (Trigger) from the Listener Type selection box. Optionally, click the … button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
- Change the Listener Name to EndRoute.Trigger.
End Route – Configure the Transport
- Select the Transport stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Select Directory / File from the Transport Type selection box. Optionally, click the … button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
- Select the Target Directory, using the … button to open the file selector.
- Set output as the Target File Name.
- Set xml as the Target File Extension.
End Route – Document the Target System
- Select the Target System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Change the System Name to XML File.
- Select the Choose Target Icon button, and scroll down to select one of the XML icons.
Configure Start Route (The First Route)
- Save all changes and go back to the File Management.
- Double-click on Chained1 – Start Route to open it to edit.
Start Route – Document Source System
- Select the Source System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Change the System Name to XML File.
- Select the Choose Source Icon button, and scroll down to select one of the XML icons.
Start Route – Configure the Listener
- Select the Listener stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Select Directory / File from the Listener Type selection box. Optionally, click the … button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
- Assign a polling directory, using the … button to open the file selector. The polling directory should NOT be the directory with all the sample files, since files will be moved/deleted by the listening process.
Start Route – Configure the Transport
- Select the Transport stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Select Route to Route from the Transport Type selection box. Optionally, click the … button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
- For Target Listener, select the … button to open the Listener Dialog. From the selection box in the dialog, find the Listener called Chained2 – End Route::EndRoute.Trigger. Select it and click OK.
Start Route – Document the Target System
- Select the Target System stage in the Route Editing Grid. The configuration panel will appear at the bottom.
- Change the System Name to Chained2 – End Route
- Leave the icon alone.
Prepare to Test
- Save all changes.
- Copy the file called people.xml from the Samples directory provided into the directory chosen as the polling directory.
- Open the eiPlatform Emulator by going to the menu bar at the top of the screen, and selecting Tools -> Local eiPlatform Emulator.
- In the eiPlatform Emulator Management dialog, select the Configure Emulator option.
- In the EIP Emulator Settings dialog, select the Disable All button at the bottom of the left hand table panel. Nothing should be checked in the left-hand Run column.
- Find the two Routes created in this exercise in the left hand table panel. Select the Run checkbox to the far left of their rows, so that those two are the only ones with checkmarks in that column.
- Click the Apply and Close button in the bottom right of the dialog to save the changes.
Perform the Test
- Select the Start Emulator button from the eiPlatform Emulator Management dialog. The main panel should start displaying log output.
- When log output stops, the emulator has finished processing the two Routes.
- In the OS File Explorer, open the directory selected as the Target Directory. The file output.xml should be there, with contents identical to the people.xml input file.