The camelContext element within an xml context file creates a
routing context. The camelContext element can contain one or more
routes, but the Fuse IDE canvas can display only one of the routes at a time. Therefore the
canvas is each route's delineator, and each route displayed on the canvas maps to a route element in the generated camelContext
element.
When you create a new Fuse Project, Fuse IDE creates a
camelContext.xml file that contains an empty route element within a camelContext element. You can view
and edit the contents of the camelContext.xml file in the route editor's
Source view. In Design view, the route editor presents an empty canvas, which represents the
empty route element. You can drag patterns from the
Palette and drop them onto the canvas to create a route. Fuse IDE updates
the empty route element with xml generated from the patterns you
drop onto the canvas.
Fuse IDE provides three methods for adding a new route:
From the menu bar, by opening the menu, and then selecting
In Design view, by right-clicking the canvas or a node to access the context menu, and then selecting >
In Source view, by adding a <route/> element to the existing list within the
camelContext element
To add another route to the camelContext:
Select one of the methods for adding a route.
In Design view , select > , or manually add the <route/> element to the camelContext element in Source view.
In Design view, a route icon appears in Outline view, and the Properties editor displays the list of the new route's properties for you to edit.
In the Properties editor, enter an ID (for example, Route2) for the new route in the route's ID field.
In Outline view, the new ID displays next to the new route icon.
In the Properties editor, enter a description of the route in the Description field.
On the menu bar, select > to save the changes you made to the routing context file.
![]() | Tip |
|---|---|
To switch between multiple routes, select the route you want to display on the canvas by clicking it in Outline view or by selecting it from the menu on the menu bar. |