This tutorial walks you through the process of creating a new Fuse Integration project, adding a route to it, and adding two endpoints to the route. It assumes that you have already set up your workspace and that Red Hat JBoss Fuse Tooling is running inside Red Hat JBoss Developer Studio.
In this tutorial you will:
create a Fuse Integration project
create a new routing context
create a route
add file endpoints to the route
connect the endpoints
configure the endpoints
create a folder in your project to store test messages that you create for your route
create the test messages
JBoss Developer Studio 9.1.0 installed
Red Hat JBoss Fuse Tooling 8.0.0 installed in JBoss Developer Studio 9.1.0
The > > > > option is set. Otherwise the labeling on the patterns and components placed on the canvas will differ from that shown in these tutorials.
When you start up JBoss Developer Studio for the first time, it opens in JBoss perspective:
![]() | Note |
|---|---|
You can start this tutorial in JBoss perspective or in Fuse Integration perspective. If you start it in JBoss perspective, the tooling will ask to switch you to Fuse Integration perspective at the appropriate point in the tutorial. |
To create a Fuse Integration project:
On the menu bar, select > > > > to open the New Fuse Integration Project wizard:
Enter CBRroute in the
Project Name field.
Leave the Use default workspace location option as is.
Click to open the Select a Target Runtime page:
Accept for Target Runtime and for Camel Version.
![]() | Note |
|---|---|
You will add the runtime later in the tutorial To Publish a Fuse Project to Red Hat JBoss Fuse. |
Click to open the Advanced Project Setup page:

Leave the Start with an empty project and Blueprint DSL options selected.
Click .
Fuse Tooling starts downloading from the Maven repository all of the files it needs to build the project, and then adds the new project to Project Explorer.
If you are not in Fuse Integration perspective, the tooling asks whether you want to switch to it now:

Click to open the new CBRroute project in
Fuse Integration perspective:

The new CBRroute project contains everything needed to create and
run routes. As shown in Figure 1, the files generated for
CBRroute include:
In Project Explorer, double-click the
pom.xml entry to open the file in the tooling's XML
editor.
In the pom.xml file, modify the lines outlined in red, as shown:

Change the value of the groupId element to
tutorial.
Change the value of the artifactId element to
cbr-route.
![]() | Note |
|---|---|
The tooling combines the |
Delete the <camel.version> element. It is not
used.
Change the value of the <jboss.fuse.bom.version> to
6.3.0.redhat-XXX,
where XXX is the build number of the
installed JBoss Fuse runtime (and is included in the install directory's
name).
Delete the <version> element from each
<dependency>: camel-core,
camel-blueprint, and
camel-test-blueprint:

As versions are defined in the JBoss Fuse parent bom, these steps will
resolve any harmless Overriding managed version
2.17.0.redhat-630xxx for camel- ... warnings the
Problems pane may display.
Select > to save the changes you made to the pom.xml
file.
In Project Explorer, right-click
CBRroute to open the
context menu.
Select > to open the Update Maven Project wizard:

In the Available Maven Codebases pane, select
CBRroute, and then check the option Force
Updates of Snapshots/Releases to enable it. Leave all other
options as is.
Click .
The Maven CBRroute codebase is now synchronized with the project's newly
modified pom.xml file.
To create the route:
Click the Design tab at the bottom, left of the canvas to return to the route editor's Design view.
Drag a File component (
) from the Palette's
Components drawer to the canvas, and drop it in the
Route_route1 container node.
The File component changes to a From _from1 node inside the Route_route1 container node.
On the canvas, select the From _from1 node.
The Properties editor, located below the canvas, displays the node's property fields for editing.
In the Properties editor, select the Advanced tab:

You need to create a folder for the project's source data and enter that folder's name in the Directory Name field.
In Project Explorer, right-click
CBRroute/src/ to open the context menu.
Select > to open the New Folder wizard:

Check that CBRroute/src appears in the Enter or select the parent
folder field. Otherwise enter it manually, or select it
from the graphical representation of the project's hierarchy.
In the Folder name field, enter data, and then
click Finish.
The new data folder appears in
Project Explorer, under the src
folder:

Return to the Advanced tab, in the Properties editor.
In the Directory Name field, enter
src/data:
The path src/data is relative to the project's directory.
On the Consumer tab, enable the Noop option by clicking its check box.
The Noop option prevents the
message#.xml files being deleted from the
src/data folder, and it enables
idempotency to ensure that each message#.xml file is
consumed only once.
Select the Details tab to open the file node's Details page.
The tooling automatically populates the Uri field with
the Directory Name and Noop properties
you configured on the Advanced tab. It also populates the
Id field with an autogenerated ID
(_from1):
Leave the autogenerated Id as is.
Drag another File component from the Palette's Components drawer and drop it in the Route_route1 container node.
The File component changes to a To _to1 node inside the Route_route1 container node.
On the canvas, select the To _to1 node.
The Properties editor, located below the canvas, displays the node's property fields for editing.
On the Details tab, enter
file:target/messages/others in the
Uri field, and _Others in the
Id field:
![]() | Note |
|---|---|
The tooling will create the |
In the Route_route1 container, select the From
_from1 node and drag it's connector arrow (
) over the To_Others node, then release
it:
![]() | Note |
|---|---|
The two file nodes are connected and aligned on the canvas according to the route editor's
layout direction preference setting. The choices are
|
![]() | Note |
|---|---|
If you do not connect the nodes before you close the project, the tooling automatically connects them when you reopen it. |
Select > to save the route.
Click the Source tab at bottom, left of the canvas.
Source view displays the XML for the route. The camelContext element will look like Example 1:
Example 1. XML for CBRroute
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> <camelContext id="_context1" xmlns="http://camel.apache.org/schema/blueprint"> <route id="_route1"> <from id="_from1" uri="file:src/data?noop=true"/> <to id="_Others" uri="file:target/messages/others"/> </route> </camelContext> </blueprint>
Before you can run your route, you need to create test messages to send through it.
In Project Explorer, right-click
CBRroute to open the context
menu.
Click > to open the Fuse Message File wizard:

Check that CBRroute/src/data
appears in the Enter or select the parent
folder field. Otherwise enter it manually, or
select it from the graphical representation of the
project's hierarchy.
In , enter
message1.xml.
Click to open the test
message, message1.xml, in
Design View:

Click the tab at the bottom, right of the canvas to switch to view:

In view, enter this text:
<?xml version="1.0" encoding="UTF-8"?>
<order>
<customer>
<name>Brooklyn Zoo</name>
<city>Brooklyn</city>
<country>USA</country>
</customer>
<orderline>
<animal>wombat</animal>
<quantity>15</quantity>
<maxAllowed>25</maxAllowed>
</orderline>
</order>![]() | Note |
|---|---|
You can safely ignore the |
Save the file, and close it.
If you haven't already done so, download the prefabricated test message files
(see Using the Fuse Tooling Resource Files for instructions). Copy
message2.xml through message6.xml
into the newly created CBRroute/src/data folder. You will
use all six test messages in the remaining Fuse Tooling tutorials.
Table 1 shows the contents of each remaining prefabricated message file.
Table 1. Preconstructed test messages
| msg# | <name> | <city> | <country> | <animal> | <quantity> | <maxAllowed> |
|---|---|---|---|---|---|---|
| 2 | San Diego Zoo | San Diego | USA | giraffe | 3 | 2 |
| 3 | London Zoo | London | Great Britain | penguin | 12 | 20 |
| 4 | Bristol Zoo | Bristol | Great Britain | emu | 5 | 4 |
| 5 | Paris Zoo | Paris | France | giraffe | 2 | 2 |
| 6 | Hellabrunn Gardens | Munich | Germany | penguin | 18 | 20 |
After you have created and designed your route, you can run it by deploying it into your local Apache Camel runtime, as described in To Run a Route.
To learn more about:
using the editor, see Red Hat JBoss Fuse Tooling: JBoss Fuse Tooling User Guide at https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.3/html/Tooling_User_Guide/RiderDevPart.html.
Apache Camel endpoints, see Red Hat JBoss Fuse: Component Reference.