-
-
Notifications
You must be signed in to change notification settings - Fork 9
tutorial simple route
Raymond Meester edited this page Sep 16, 2024
·
8 revisions
In this tutorial, you learn how to create a Camel route.
- On the flows page click on "Actions menu" button and then "New route".
- Give the flow the name: "SimpleRoute".
- On the "ROUTE" step click on the blue button to create a new route. This will open an XML Editor.
- Name the route "MoveFiles".
- Add the following XML in the XML Editor:
<route>
<from uri="file:C:\messages\in"/>
<log message="Received a new customer!"/>
<to uri="file:C:\messages\out"/>
</route>- Save the route
- Save the flow
- Start the flow on the flows page
- Save the XML below in C:\messages\in
<names>
<name>
<firstname>John</firstname>
<lastname>Doe</lastname>
</name>
<name>
<firstname>Michael</firstname>
<lastname>Kay</lastname>
</name>
<name>
<firstname>Jane</firstname>
<lastname>Smith</lastname>
</name>
</names>The result is that the file is moved from the in directory to the out directory.
Now you completed this tutorial. You can continue to the next tutorial with an example of a more complex route.