Skip to content

tutorial simple route

Raymond Meester edited this page Mar 17, 2023 · 7 revisions

In this tutorial, you learn how to create a Camel route.

Step 1: Create a route

  • On the flows page click on "Actions" button and then "Create route".
  • Give the flow the name: "SimpleRoute".

Step 2: Configure a route

  • 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

Step 3: Test the route

  • 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>

Result is the file is moving from the in to the out directory.


Now you completed this tutorial. You can continue to the next tutorial with an example of more complex route.

Clone this wiki locally