Table of Contents
![]() | Note |
|---|---|
You can also develop Fuse projects using Maven. For details, see Getting Started with Developing. |
Creating a new Fuse Integration project involves three steps.
Once the project has been configured, the tooling configures all of the required Maven dependencies and creates the POM file needed to run and publish the project. Configured templates, based on common use cases, also provide sample code and data to get you started quickly.
Select > > > > to open the New Fuse Integration Project wizard:

The wizard opens with the Use default workspace location option selected in the Location pane.
Specify the workspace location where the data for the project will be stored.
To use an alternative location clear Use default workspace location and specify a new location in the Path field.
Click
to quickly find and select the alternate
workspace.
Click to open the Select a Target Runtime page:

You can base your new Fuse Integration project on a target runtime or on a specific version of Camel.
Target Runtime — Specify the runtime to which you want to publish the new project.
You can either select an existing configured runtime from the drop-down menu, or create a new one.
In either case, the Camel Version pane displays the Camel version associated with the runtime once it is selected.
Camel Version — You can specify the Camel version on which to base the new project, without creating or selecting a target runtime. The tooling supports the productised options available from the drop-down list, but allows you to type a different Camel version, if you want to experiment with non productised versions (which are not supported).
![]() | Important |
|---|---|
Camel versions 2.18.1.redhat-000012 and 2.18.1.redhat-000015 work only with Fuse Integration Services projects (for details, see Getting Started with Fuse Integration Services). For Fuse Integration projects, select one of the other available productised Camel versions or type in a non productised version. |
If you select an existing, configured target runtime or a specific Camel version on which to base your new Fuse Integration project, you need only set the project’s advanced options (See Setting advanced project options. Otherwise, you need to create a new target runtime before you set the project’s advanced options (see Creating a new target runtime).
When you enter a non productised Camel version, you can click the button to check whether the tooling can access the specified version. If not, a notification appears in the Select a Target Runtime header:

After you create, configure and save a project, it is possible to change the Camel version. See Changing the Camel version.
With the Select a Target Runtime page open:
In the Target Runtime pane, click to open the New server runtime environment page:

Expand the Red Hat JBoss Middleware folder, and then select a JBoss
Fuse runtime environment (for example JBoss Fuse 6.3).
Leave the Create a new local server option disabled. You can create the local server later when you are ready to publish your project to it (for details, seeAdding a Server).
![]() | Note |
|---|---|
If you click the Create a new local server option, the New Fuse Integration Project wizard walks you through additional steps to define and configure the new JBoss Fuse 6.3 server runtime (as described in Adding a Server). Then, when it builds the project, it also adds the server runtime to the Servers view in the Fuse Integration perspective. |
Click to open the server’s Runtime Definition page:

Specify the Name, Home Directory, and Execution Environment of the server runtime:
Home Directory — click the button to locate and select the server runtime’s installation directory
![]() | Note |
|---|---|
If the server is not already installed on your machine, you can install it now by clicking the link Download and install runtime… and following the site’s download instructions. Depending on the site, you may be required to provide valid credentials before you can continue the download process. |
Execution Environment — accept the default, or select another JavaSE version from the drop-down menu
If the version you want does not appear on the list, click the button and select the version from that list. The JRE version you select must be installed on your machine.
![]() | Note |
|---|---|
JBoss Fuse 6.3 requires either JRE version 1.8 (recommended) or 1.7. |
Alternate JRE — Leave as is
![]() | Important |
|---|---|
If you need to modify the configuration of an existing target runtime, you do so by selecting, from the menu bar, > > > > to open the Server Runtime Environments page. (On Linux and Windows machines, you access Preferences through the Windows menu.) In the Name pane, select the runtime you want to modify, and click to open the server’s Runtime Definition page. You can change the Name of the target runtime, its Home Directory, and its Execution Environment. |
Click to return to the Select a Target Runtime page:

The newly configured target runtime appears in the Target Runtime pane’s drop-down menu, and the Camel version supported by the runtime appears in the Camel Version pane, grayed out.
To finish, set the advanced project options as described in Setting advanced project options.
After you create and save a target runtime, it is possible to change the Camel version. See Changing the Camel version.
With the completed Select a Target Runtime page open:
Click to open the Advanced Project Setup page.
You can create an empty project, which creates a skeleton Camel context routing file based on one of the three supported Domain Specific Languages (DSLs), or you can use a predefined template, each of which is based on a common use case. Individual templates may not support all DSL options.
![]() | Note |
|---|---|
For Java DSL, the tooling generates a |
Start with an empty project:

For an empty project, all DSL options are available.
Use a predefined template:

The options are:
ActiveMQ — Provides a sample Camel route that reads files from a specific location and routes them to a message queue. Another route, implementing a content-based router, pulls the messages off the queue and routes each to its target destination, according to message content.
![]() | Note |
|---|---|
Before you can deploy this project, you must create, in your Red Hat JBoss Fuse installation,
a pid file that configures the ActiveMQ connection
properties. For details, open the
|
This template creates a project that runs on Red Hat JBoss Fuse servers, and it supports the Blueprint and Spring DSLs only.
Content Based Router — Provides a sample Camel route that reads files from a specific location and routes them to different output folders according to message content.
This template creates a project that runs on Red Hat JBoss Fuse servers, and it supports all three of the DSLs.
CXF code first — Provides a sample Camel route that is started by a CXF web service call.
This template creates a project that runs on Red Hat JBoss Fuse servers, and it supports the Spring and Java DSLs only.
Spring on EAP — Provides a sample Camel route that calls into a bean service to say Hello.
This template creates a project that runs on Red Hat EAP 6.4 servers, and it supports the Spring DSL only.
SpringBoot on OpenShift — Demonstrates how to configure Camel routes in Spring Boot using a Spring XML configuration file. This template creates a Fuse Integration Services project and requires Camel version 2.18.1.redhat-000012 or 2.18.1.redhat-000015.
This template creates a project that runs on OpenShift servers, and it supports the Spring DSL only. For details on using this template, see Getting Started with Fuse Integration Services
Select one of the project setup options and a DSL (as available), and then click .
The tooling starts building the project, adding it to the Project Explorer view.
If you are not already in the Fuse Integration perspective, the tooling asks whether you want to switch to it now:

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

In this example, the CBRroute project appears in the
Project Explorer view. CBRroute
would have been the name entered in the Project Name field
in [cnfigProjectName].
Click the Source tab at the bottom of the canvas to see the generated Camel context file:

You may encounter Maven dependency errors after you create a new Fuse Integration project.
Though it can happen at other times, it more typically occurs when a project build is canceled before the process has finished. Interrupting the process in this way often prevents all of the project’s dependencies from downloading from the Maven repositories, which can take some time.
You can often resolve these dependency errors by updating Maven dependencies this way:
In the Update Maven Project wizard:
Click OK.
In the bottom, right corner of the workbench, you may see the progress status bar churning as missing dependencies are downloaded from the Maven repositories.
Apache Camel stores routes in an XML file that contains a camelContext element. The tooling includes a wizard that simplifies adding an Apache Camel context file to your project. It creates a new XML file that has all of the required namespaces preconfigured and a template camelContext element.
To add a new Apache Camel context file to your project:
Select > > > > from the main menu to open the Camel XML File wizard, as shown in Figure 8, “Camel XML File wizard”.
In RouteContainer, enter the location for the new file, or accept the default.
You can click
to search for an appropriate location.
![]() | Important |
|---|---|
The Spring framework and the OSGi Blueprint framework require that all
Apache Camel files be placed in specific locations under the project’s
|
In File Name, enter a name for the new context file, or
accept the default (camelContext.xml).
The file’s name cannot contain spaces or special characters, and it must be unique within the JVM.
In Framework, accept the default, or select which framework the routes will use:
camelContextsClick .
The new context file is added to the project and opened in the route editor.
Table of Contents
Developing an Apache Camel application typically consists of the following tasks:
The camelContext element within an XML context file creates a
routing context. The camelContext element can contain one or
more routes, and each route, displayed on the canvas as a Route
container node, maps to a route element in the generated camelContext element.
When you create a new Fuse Integration Project, the tooling creates an example
camelContext.xml (Spring) or blueprint.xml
(Blueprint) routing context file. You can view and edit the contents of the routing
context file in the route editor’s Source tab. In the
Design tab, the route editor displays a
Route container node, which represents the empty route element. You can drag patterns from the
Palette and drop them into the Route
container node on the canvas to create a route. The Camel tooling updates the empty route element with XML code generated from the patterns you
dropped into the Route container node on the canvas.
The tooling provides two methods for adding a new route:
Route
pattern from the Palette's Routing
drawer and dropping it onto the canvasTo add another route to the camelContext: element
Select one of the methods for adding a route.
With the Design tab selected, notice that the Properties view displays the list of the new route’s properties for you to edit.
In the Properties view, enter :
An ID (for example, Route2) for the new route in the route’s Id field
![]() | Note |
|---|---|
The tooling automatically assigns an ID to EIP and component patterns dropped on the canvas. You can replace these autogenerated IDs with your own to distinguish the routes in your project. |
![]() | Note |
|---|---|
To switch between multiple routes, select the route you want to display on the canvas by
clicking its entry under the project’s ![]() When you click the context file entry in the Project Explorer view, the canvas displays all routes in the context, as space allows. |
Routes consist of a sequence of connected patterns, referred to as nodes once they are placed on the canvas inside a Route
container node. To add a pattern to a route you drag it from the
Palette and drop it into a Route container on the canvas.
When patterns are dropped into a Route container on the canvas, they take on a color that indicates the type of node they are:
when and
otherwise EIPs that
contain other EIPs that complete their logicTo drag a pattern onto a route:
Drag the pattern over the target Route container and drop
it.
Alternatively, you can drop a pattern on an existing node that has no outgoing connection, or on a connection existing between two nodes, to have the tooling automatically wire the connections between all nodes involved.
The tooling checks whether the resulting connection is valid and then either allows or prevents you from dropping the pattern on the drop target. For valid connections, the tooling:
The new pattern appears on the canvas in the Route container and
becomes the selected node. The Properties view displays a list of
the new node’s properties for you to edit.
![]() | Note |
|---|---|
After you drop a pattern inside a Route container, you can drag it to different location inside the route container or to another route container on the canvas, as long as it can establish a valid connection. You can also relocate existing nodes that are already connected, as long as the move can establish another valid connection. |
![]() | Note |
|---|---|
When you connect one node to another, the tooling updates the layout according to the route editor’s layout preference. The default is Down. To access the route editor 's layout preference:
|
A complete route typically consists of a starting endpoint, a string of processing nodes, and one or more destination endpoints. The tooling saves routes in the context file regardless of whether they are complete.
![]() | Important |
|---|---|
The tooling appends every new node added in the Design tab to its route element in the context file, and any that are not connected manually, using the connector arrows, are auto-connected when the context file is reopened, or when a route is reloaded in the route editor, by switching from the Source tab to the Design tab. |
![]() | Note |
|---|---|
Not all nodes can be connected. When you try to connect a source node to an invalid target
node, the tooling displays the
|
Connecting two nodes in a Route container on the canvas is as simple
as dragging a line from one to the other. Each node in a route has a connector arrow.
Selecting a node and dragging its connector arrow to a target node establishes a
connection between the two nodes.
To connect two nodes:
Route container on the canvas, select the source node to
display its connector arrow.Drag the source node’s connector arrow (
) to the target node.
The direction of the connection represents the direction messages flow between the nodes in the route.
While hovering over the target node, release the mouse button to drop the connector on it.
The route editor updates the <route> element in the routing context file with the xml generated from the connection. You can view the xml in the Source tab.
Most patterns require some explicit configuration. For example, an endpoint requires an
explicitly entered URI.
The tooling’s Properties view provides a form that lists all of the configuration details a particular pattern supports. The Properties view also provides the following convenience features:
To configure a pattern:
On the canvas, select the node you want to configure.
The Properties view lists all of the selected node’s properties for you to edit. For EIPs, the Details tab lists all of a pattern’s properties. For components from the Components drawer, the Details tab lists the general properties and those that require a value, and the Advanced tab lists additional properties grouped according to function.
The Documentation tab describes the pattern and each of its properties.
As you develop and update a route, you may need to remove one or more of the route’s
nodes. The node’s
icon makes this easy to do. When you delete a node from the canvas,
all of its connections with other nodes in the route are also deleted, and the node is
removed from the corresponding route element in the context
file.
![]() | Note |
|---|---|
You can also remove a node by opening its context menu and selecting Remove. |
To remove a node from a route:
The node and all of its connections are deleted from the canvas, and the node is removed from its corresponding route element in the context file.
In some cases you made need to delete an entire route from your routing context. The Route
container’s
icon makes this easy to do. When you delete a route, all of the
nodes inside the Route container are also deleted, and the corresponding route element in the context file is removed.
![]() | Note |
|---|---|
You can also remove a route using the Route container’s context menu and selecting Remove. |
![]() | Important |
|---|---|
You cannot undo this operation. |
To delete a route:
If the routing context contains more than one route, first select the route you want to delete in the Project Explorer view.

On the canvas, click the Route container’s
icon.

The route is removed from the canvas, from the context file, and from the Project Explorer view.
Many routing patterns rely on references to Java objects (beans) for configuration or for implementation details. You manually add the beans into the routing context file by using the route editor’s Source tab. However, this approach is not recommended because it is error prone. The recommendation is to use the Configurations tab. See Adding global endpoints, data formats or beans.
To add beans to your routing context file:
Enter the bean elements needed by your route before the camelContext element.
![]() | Note |
|---|---|
Use the id attribute to identify the bean, not the name attribute. |
For example:
<!-- Configure the Inbound SAP Connections -->
<bean id="sap-configuration" class="org.fusesource.camel.component.sap.SapConnectionConfiguration" activation="eager">
<property name="destinationDataStore">
<map>
<entry key="quickstartDest" value-ref="quickstartDestinationData" />
</map>
</property>
<property name="serverDataStore">
<map>
<entry key="quickstartServer" value-ref="quickstartServerData" />
</map
</property>
</bean>
...
<camelContext trace="false" id="sap-srfc-destination-fuse-context" xmlns="http://camel.apache.org/schema/blueprint">
<route id="sap-srfc-destination-fuse-route">
<from uri="file:work/camel-sap/input"/>
<convertBodyTo type="java.lang.String"/>
<log message="${body}" loggingLevel="INFO"/>
<to uri="sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST"/>
<log message="${body}" loggingLevel="INFO"/>
</route>
</camelContext>Some routes rely on shared configuration provided by global endpoints, global data formats or global beans. You can add global elements to the project’s routing context file by using the route editor’s Configurations tab.
To add global elements to your routing context file:
At the bottom of the route editor, click the Configurations tab to display global configurations, if there are any.

Click to open the Create a new global element dialog.

The options are:
In the Create a new global element dialog, select Endpoint and click to open the Select component dialog.

![]() | Note |
|---|---|
By default, the Select component dialog opens with the Show only palette components option enabled. To see all available components, disable this option. |
![]() | Note |
|---|---|
The Grouped by categories option groups components by type. ![]() |
In the Select component dialog, scroll through the list of Camel components to find and select the component you want to add to the context file, and then enter an ID for it in the Id field.

In this example, the JMS component is selected and
myJMS is the Id value.
Click .

You can now set properties in the Properties view as needed.
The tooling autofills Id with the value you entered in
the component’s Id field in [globalEndptSelect]. In this example, Camel builds the
uri (required field) starting with the component’s
schema (in this case, jms:), but you must specify the
destinationName and the destinationType to
complete the component’s uri.
![]() | Note |
|---|---|
For the JMS component, the destination type defaults to |
In the Destination Name field, enter the name of the
destination endpoint (for example, FOO.BAR). In the
Destination Type field, enter the endpoint
destination’s type (for example, queue,
topic), temp:queue, or
temp:topic).

The Properties view’s Details and Advanced tabs provide access to all properties available for configuring a particular component.
For example, click the Consumer (advanced) tab.

Enable the properties Eager Loading Of Properties and Expose Listener Session.
In the route editor, switch to the Source tab to see the code that the tooling added to the context file (in this example, a configured JMS endpoint), before the first route element.

In the Create a new global element dialog, select Data Format and click to open the Create a global Data Format dialog.

The data format defaults to avro, the format at the top of
the list of those available.
xmljson.In the Id field, enter a name for the format, for example, myDataFormat).

Click .

In the Properties view, set property values as appropriate for your project, for example:

In the route editor, click the Source tab to see the code that the tooling added to the context file. In this example, a configured xmljson data format is before the first route element.

A global bean enables out-of-route bean definitions that can be referenced from anywhere in the route. When you copy a Bean component from the palette to the route, you can find defined global beans in the Properties view’s Ref dropdown. Select the global bean that you want the Bean component to reference.
To add a global bean element:
In the Create a new global element window, select Bean and click to open the Bean Definition dialog.

Identify a bean class or a factory bean.
To specify a factory bean, you must have already added another global bean with a factory class specified. You can then select that global bean to declare it as a global bean factory. One instance of the bean factory class will be in the runtime. Other global beans can call factory methods on that class to create their own instances of other classes.
To fill the Class field, do one of the following:
If the bean you are adding requires one or more arguments, in the Constructor Arguments section, for each argument:
java.lang.String.Optionally specify one or more properties that are accessible to the global bean. In the Bean Properties section, do the following for each property:
Click Finish to add the global bean to the configuration. The global bean ID you specified appears in the Configurations tab, for example:

Switch to the Source tab to see the bean element that the
tooling added to the context file. For example:

Click the Configurations tab to return to the list of global elements and select a global bean to display its standard properties in the Properties view, for example:

![]() | Note |
|---|---|
To view or edit a property that you specified when you added a global bean, select the bean in the Configurations tab and then click Edit. |
Set global bean properties as needed:
TransformBean
and you set Depends-on to
ChangeCaseBean then ChangeCaseBean must be
created and then TransformBean can be created. When the
beans are being destroyed then TransformBean is destroyed
first.singleton or
prototype. The default,
singleton, indicates that Camel uses the same
instance of the bean each time the bean is called. Specify
prototype when you want Camel to create a new
instance of the bean each time the bean is called.init() methods to
call when the bean is referenced.The procedure is the same whether removing an endpoint, data format or bean that was previously added to the routing context.
In the Configurations tab, select the global element that you want to delete.
For example, suppose you want to delete the data format
myDataFormat that was added in Adding a global data format:

Click .
The global element myDataFormat disappears from the
Configurations tab.
Switch to the Source tab to check that the tooling removed the XML code from the routing context.

You cannot perform an undo operation for deletion of a global element. If you inadvertently delete a global element that you want to keep in the configuration you might be able to undo the deletion by closing the context file without saving it. If this is not feasible then re-add the inadvertently deleted global element.
The procedure is the same whether modifying the properties of an endpoint, data format or bean that you added to the routing context.
Typically, you do not want to change the ID of a global element. If the global element is already in use in a running route, changing the ID can break references to the global element.
In the Configurations tab, select the global element that you want to edit.
For example, to edit the endpoint myJMS that was added in
Adding a global endpoint:

Click .

In the Properties view, modify the element’s properties as needed.
For example, open the > tab, and change the value of Concurrent
Consumers to 2:

In the route editor, click the Source tab and check that
the tooling added the property concurrentConsumers=2 to the routing
context:

![]() | Note |
|---|---|
Manually adding a global element is possible but not recommended because doing so is error prone. The recommendation is to use the Configurations tab in the route editor. |
Using JBoss Developer Studio preferences, you can specify aspects of the route editor’s behavior when configuring Enterprise Integration Patterns:
To configure the route editor:
When done, click to close the Preferences dialog.
You can restore the route editor’s original defaults at any time by returning to the Editor preferences dialog and clicking .
The tooling’s Source tab displays the contents of a routing context
.xml file.
The Source tab is useful for editing and adding any configuration, comments, or beans to the routing context file. The content assist feature helps you when working with configuration files. In the Source tab, press Ctrl+Space to see a list of possible values that can be inserted into your project.
A common way of testing routes is to use JUnit. The design time tooling includes a wizard that simplifies creating a JUnit test case for your routes. The wizard uses the endpoints you specify to generate the starting point code and configuration for the test.
![]() | Note |
|---|---|
After you create the boilerplate JUnit test case, you need to modify it to add expectations and assertions specific to the route that you’ve created or modified, so the test is valid for the route. |
Before you create a new JUnit test case, you need to perform a preliminary task:
/src/test/java
folder for the test case that is included in the build path. See Creating and adding the src/test/java folder to the build path./src/test/java
folder.Locate the JUnit test case file in the /src/test/java
folder.
Depending on which DSL the project is based on, the JUnit test case file is
named BlueprintXmlTest.java or
CamelContextXmlTest.java.
Right-click the JUnit test case .java file to open the context menu, and then
select Delete.
The JUnit test case .java file disappears from the
Project Explorer view.
You can now create a new JUnit test case.
In the wizard’s project tree pane, expand the project’s root node and select
the src folder.
Make sure <project_root>/src appears in the Enter or
select the parent folder
field.
/test/java.
This folder will store the new JUnit test case you create.Click .
In the Project Explorer view, the new
src/test/java folder appears under the
src/main/resources folder. You can verify that this
folder is on the class path by opening its context menu and selecting
Build Path. If Remove from Build
Path is a menu option, you know the
src/test/java folder is on the class path.
You can now create a new JUnit test case.
To create a new JUnit test case for your route:
.xml file in your project.Right-click it to open the context menu, and then select > to open the New Camel JUnit Test Case wizard, as shown in Figure 10, “New Camel JUnit Test Case wizard”.
Alternatively, you can open the wizard by selecting > > > > from the menu bar.
In Source folder, accept the default location of the source code for the test case, or enter another location.
You can click
to search for a location.
In Package, accept the default package name for the generated test code, or enter another package name.
You can click
to search for a package.
In Camel XML file under test, accept the default pathname of the routing context file that contains the route you want to test, or enter another pathname.
You can click
to search for a context file.
Click
to open the Test Endpoints page. For
example, Figure 11, “New Camel JUnit Test Case page” shows a route’s input and output file
endpoints selected.
Click
.
![]() | Note |
|---|---|
If prompted, add JUnit to the build path. |
The artifacts for the test are added to your project and appear in the
Project Explorer view under src/test/java. The
class implementing the test case opens in the Java editor.
Table of Contents
There are two ways to run your routes using the tooling:
The simplest way to run an Apache Camel route is as a Local Camel Context. This method enables you to launch the route directly from the Project Explorer view’s context menu. When you run a route from the context menu, the tooling automatically creates a runtime profile for you. You can also create a custom runtime profile for running your route.
Your route runs as if it were invoked directly from the command line and uses Apache Camel’s embedded Spring container. You can configure a number of the runtime parameters by editing the runtime profile.
To run a route as a local Camel context:
Right-click it to open the context menu, and then select > .
![]() | Note |
|---|---|
Selecting Local Camel Context (without tests) directs the tooling to run the project without performing validation tests, which may be faster. |
If the project containing your route is a Maven project, you can use the m2e plug-in to run your route. Using this option, you can execute any Maven goals, before the route runs.
To run a route using Maven:
Right-click it to open the context menu, and then select > .
The first time you run the project using Maven, the Edit Configuration and launch editor opens, so you can create a Maven runtime profile.
To create the runtime profile, on the tab:
Make sure the route directory of your Apache Camel project appears in the Base directory: field.
For example, on Linux the root of your project is similar to ~/workspace/simple-router.
In the Goals: field, enter
camel:run.
![]() | Important |
|---|---|
If you created your project using the Java DSL, enter
|
Red Hat JBoss Fuse Tooling stores information about the runtime environments for each project in runtime profiles. The runtime profiles keep track of such information as which Maven goals to call, the Java runtime environment to use, any system variables that need to be set, and so on. A project can have more than one runtime profile.
A Local Camel Context runtime profile configures how Apache Camel is
invoked to execute a route. A Local Camel Context runtime profile
stores the name of the context file in which your routes are defined, the name of the
main to invoke, the command line options passed into the JVM,
the JRE to use, the classpath to use, any environment variables that need to be set, and
a few other pieces of information.
The runtime configuration editor for a Local Camel Context runtime profile contains the following tabs:
The first time an Apache Camel route is run as a Local Camel Context, Red Hat JBoss Fuse Tooling creates for the routing context file a default runtime profile, which should not require editing.
at the top, left of the context
selection pane.The Camel Context File tab has one field, Select Camel Context file…. Enter the full path to the routing context file that contains your route definitions.
The button accesses the Open Resource dialog, which facilitates locating the target routing context file. This dialog is preconfigured to search for files that contain Apache Camel routes.
By default the only command line option passed to the JVM is:
-fa context-fileIf you are using a custom main class you may need to pass in different options. To do so, on the Main tab, click the Add button to enter a parameter’s name and value. You can click the Add Parameter dialog’s Variables… button to display a list of variables that you can select.
To add or modify JVM-specific arguments, edit the VM arguments field on the JRE tab.
By default, the output generated from running the route is sent to the Console view. But you can redirect it to a file instead.
To redirect output to a file:
In the Standard Input and Output pane, click the checkbox next to the Output File: field, and then enter the path to the file where you want to send the output.
The , , and buttons facilitate building the path to the output file.
A Maven runtime profile configures how Maven invokes Apache Camel. A Maven runtime profile stores the Maven goals to execute, any Maven profiles to use, the version of Maven to use, the JRE to use, the classpath to use, any environment variables that need to be set, and a few other pieces of information.
![]() | Important |
|---|---|
The first time an Apache Camel route is run using Maven, you must create a default runtime profile for it. |
The runtime configuration editor for a Fuse runtime profile contains the following tabs:
at the top, left of the context
selection pane.The most commonly used goal when running a route is camel:run. It loads the routes into a Spring container running in its own JVM.
The Apache Camel plug-in also supports a camel:embedded goal that loads the Spring container into the same JVM used by Maven. The advantage of this is that the routes should bootstrap faster.
Projects based on Java DSL use the exec:java goal.
If your POM contains other goals, you can change the Maven goal used by clicking the Configure… button next to the Maven Runtime field on the Main tab. On the Installations dialog, you edit the Global settings for <selected_runtime> installation field.
By default, Red Hat JBoss Fuse Tooling for Eclipse uses m2e, which is embedded in Eclipse. If you want to use a different version of Maven or have a newer version installed on your development machine, you can select it from the Maven Runtime drop-down menu on the Main tab.
By default, the output from the route execution is sent to the Console view. But you can redirect it to a file instead.
To redirect output to a file:
Click the checkbox next to the Output File: field, and then enter the path to the file where you want to send the output.
The , , and buttons facilitate building the path to the output file.
Fuse Integration Services (FIS) provides a set of tools and containerized xPaaS images for developing, deploying, and managing microservices on OpenShift.
![]() | Important |
|---|---|
For FIS projects, JBoss Fuse Tooling requires installation of the Red Hat Container Development Kit (CDK) v3.x. See Getting Started Guide: Container Development Kit for instructions. In addition to the prerequisites specified in this guide, you need to establish a Red Hat account if you do not have one. Your Red Hat user name and password are required to start the virtual OpenShift instance provided in the Red Hat Container Development Kit. You can easily get an account by registering on the Red Hat Customer Portal. Click
|
JBoss Fuse Tooling enables you to develop and deploy FIS 2.0 projects using the s2i binary workflow. In this workflow, the tooling builds your project locally, assembles it into an image stream, then pushes the image stream to OpenShift, where it is used to build the Docker container. Once the Docker container is built, OpenShift deploys it in a pod.
![]() | Important |
|---|---|
JBoss Fuse Tooling works only with the S2I binary workflow and only with projects based on the Spring Boot framework. |
![]() | Note |
|---|---|
Although JBoss Fuse Tooling can deploy FIS projects created using the tooling to remote OpenShift servers, this chapter describes creating and deploying FIS projects to a virtual OpenShift instance, installed locally using the Red Hat Container Development Kit (CDK) v3.x. |
Creating and deploying your first Fuse FIS project involves:
![]() | Note |
|---|---|
You can also run a Fuse FIS project as a local Camel context, see Running routes as a local Camel context, and then connect to it in the JMX Navigator view, where you can monitor and test the routing context. You can also run the Camel debugger on a Fuse FIS project (Debugging Routing Contexts) to expose and fix any logic errors in the routing context. |
Add the Red Hat Container Development Kit to the Servers view:
If necessary, switch to the Fuse Integration perspective.
![]() | Note |
|---|---|
If, in this or any other section in this chapter, a view described in a procedure is not open, you can open it by clicking > > > . |
In the Servers view, click the link No servers are available. Click this link to create a new server… to open the Define a New Server wizard. This link appears only when the Servers view contains no server entry.
Otherwise, right-click in the view to open the context menu, and then select > to open the Define a New Server wizard.

Select > .
Accept the defaults for:
localhostContainer
Development EnvironmentSet the credentials this way:
Click to return to the Red Hat Container Development Environment page, which is now populated. For example:

Click . Container Development Environment 3 [Stopped, Synchronized] appears in the Servers view. Container Development Environment 3 is the default server name when you add a CDK 3.x server.

Starting the Container Development Environment (CDE) also starts the virtual OpenShift server. Stopping the CDE also stops the virtual OpenShift server.
In the Servers view, select Container
Development Environment 3 [stopped, Synchronized], and then click
on the Servers menu bar.
Console view opens and displays the status of the startup process:

![]() | Note |
|---|---|
On initial startup, the CDE asks whether you accept the untrusted SSL certificate. Click . |
When the startup process has finished, the Servers view displays:

Switch to the OpenShift Explorer view.
The virtual OpenShift server instance, developer, is also running:

https://192.168.99.100:8443 is an example of a URL for the
OpenShift developer web console. Your installation displays the
URL for your instance. For more details, see Accessing the OpenShift Web Console.
When you deploy your Fuse FIS project to OpenShift, it is published to the OpenShift project you create here.
Set the new project’s properties this way:
In the Project Name field, enter the name for the project’s namespace on the virtual OpenShift server.
Only lower case letters, numbers, and dashes are valid.
Leave the Description field as is.
For example:

Click .
The new OpenShift project (in this example, New FIS Test newtest) appears in the OpenShift Explorer tab, under, in this example, developer https://192.168.99.100:8443:

![]() | Note |
|---|---|
MyProject myproject is an initial example project included with OpenShift. |
With New FIS Test newtest selected in the OpenShift Explorer view, the Properties view displays the project’s details. For example:

![]() | Note |
|---|---|
When you deploy the project to OpenShift, the Properties view gathers and displays the same information about the project that the OpenShift web console does. |
Before you create a new Fuse FIS project, you should enable staging repositories. This is needed because some Maven artifacts are not in default Maven repositories. To enable staging repositories, select > > > .
To create a FIS project, use the Spring Boot on OpenShift template:
In the Project Explorer view, right-click to open the context menu and then select > to open the wizard’s Choose a project name page:

In the Project Name field, enter a name that is unique to
the workspace you are using, for example,
myFISproject.
Accept the defaults for the other options.
Click to open the Select a Target Runtime page:

Leave the defaults for Target Runtime (No Runtime selected) and Camel Version (2.18.1.redhat-000015).
Click to open the Advanced Project Setup page:

Click Use a predefined template, and then expand the Fuse on OpenShift option:

Select SpringBoot on OpenShift, and then click .
![]() | Note |
|---|---|
Because of the number of dependencies that are downloaded for a first-time Fuse FIS project, building it can take some time. If the Fuse Integration perspective is not already open, Developer Studio prompts you to indicate whether you want to open it now. Click Yes. |
When the build is done the *Fuse Integration * perspective displays the project, for example:

At this point, you can:
Running routes as a local Camel context to verify that the routing context runs successfully on your local machine
Connecting to the running context in the JMX Navigator view (see Viewing processes in a local JMX server), you can monitor route components and test whether the route performs as expected:
camel-context.xml file to discover and fix logic
errors — see Debugging Routing ContextsmyFISproject) to open the context
menu.In the sidebar menu, select > > (in this example, Deploy myFISproject on OpenShift) to open the project’s default run configuration:

Leave the default settings as they are on the Main tab.
Open the JRE tab to access the VM arguments:

In the VM arguments pane, change the value of the
-Dkubernetes.namespace=test argument to match the
Project name you used for the OpenShift project when
you created it (OpenShift project name in
Creating a new OpenShift project.
In this example, change the default value test to
newtest:

Depending on your OpenShift configuration, you may need to modify other`VM arguments to support it:
-Dkubernetes.master=https://192.168.99.1:8443
When running multiple OpenShift instances or using a remote instance, you need to specify the URL of the OpenShift instance targeted for the deployment. The URL above is an example.
-Dkubernetes.trust.certificates=true
true.false.Click and then click .
Because of the number of dependencies to download, first-time deployment can take some time. The speed of your computer and your internet connection are contributing factors. Typically, it takes 25 to 35 minutes to complete a first-time deployment.
In the Console view, you can track the progress of the deploy process. In the following output, the entry *Pushing image 172.30.1 ….. * indicates that the project built successfully and the application images are being pushed to OpenShift, where they will be used to build the Docker container.

The Console view displays BUILD SUCCESS when deployment completes successfully:

Switch to the OpenShift Explorer view and select New FIS Test newtest:

In the Properties view, the Details page displays all of the project’s property values.

Open the other tabs (Builds, Build Configs, Deployments,…) to view other properties of the project. The Properties view provides the same information as the OpenShift Web Console.
In the OpenShift Explorer view, select
camel-ose-springboot-xml to view its details in
the Properties view:

Scroll through the other tabs to view other properties of the deployment configuration.
In the OpenShift Explorer view, select
camel-ose-springboot-xml-1-mdmtd Pod Running, and then
view the details of the running instance in the Properties
view:

In the OpenShift Explorer view, right-click
camel-ose-springboot-xml-1-mdmtd Pod Running, and then
select Pod Logs….
![]() | Note |
|---|---|
If prompted, enter the path to the installed |
The Console view automatically opens, displaying the logs from the running pod:

Click
in the Console view’s menu bar to
terminate the session and clear console output.
![]() | Note |
|---|---|
This information applies to Red Hat Container Development Kit installations only. |
To access the OpenShift Web Console, open a browser and enter the OpenShift server’s
URL, which is specific to your instance and your machine. For example,
enter https://192.168.99.100:8443, in the browser’s address field.
You can log into the web console either as a developer or as an administrator, using the default credentials:
Default developer role
Developer users can view only their own projects and the supplied OpenShift sample project, which demonstrates OpenShift v3 features. Developer users can create, edit and delete any project that they own that is deployed on OpenShift.
developerdeveloperDefault administrator role
An administrator user can view and access all projects on OpenShift (CDK). Administrator users can create, edit and delete, any project deployed on OpenShift.
adminadminFor more information on using the OpenShift web console, see Getting Started Guide: Container Development Kit.
Table of Contents
The JBoss Fuse SAP Tool Suite makes it possible to integrate your Camel routes with a remote SAP Application Server. A variety of SAP components are provided to support Remote Function Calls (RFC) and the sending and receiving of Intermediate Documents (IDocs). The SAP Tool Suite depends on the JCo and IDoc client libraries from SAP. To install and use these libraries, you must have an SAP Service Marketplace Account.
The JBoss Fuse SAP Tool Suite provides the Edit SAP Connection Configuration dialog, which helps you to create and manage the SAP Application Server and Destination connections. The suite is not installed by default, because it requires third-party JCo and IDoc client libraries, which are licensed separately by SAP.
Because the SAP tool suite depends on the third-party JCo 3.0 and IDoc 3.0 libraries, it can only be installed on the platforms that these libraries support. For more details about the platform restrictions for SAP tooling, see Red Hat JBoss Fuse Supported Configurations.
Before you can install the JBoss Fuse SAP Tool Suite, you must download the JCo and IDoc libraries from the following location:
To download these libraries, you must have an SAP Service Marketplace Account. Be sure to choose the appropriate JCo and IDoc libraries for your operationg system. Also:
For this installation procedure, you can leave the downloaded files in archive format. There is no need to extract the contents.
To install the JBoss Fuse SAP Tool Suite into JBoss Developer Studio, perform the following steps:
The Select JCo3 and IDoc3 Archive to Import screen opens. Next to the JCo Archive File field, use the Browse button to select the JCo archive that you downloaded from the SAP Service Marketplace. After selecting the JCo archive, the Archive Version and Archive OS Platform fields are automatically filled in, so that you can check whether the library you are installing has the correct version and OS platform.
Next to the IDoc3 Archive File field, use the Browse button to select the IDoc archive that you downloaded from the SAP Service Marketplace.
After selecting both archive files, click Finish.
A new Install wizard (for installing Eclipse plug-ins) opens automatically. This wizard displays the following to plug-ins to be installed:
SAP JCo3 and IDoc3 Libraries
Make sure that both of these plug-ins are selected. Click Next.
![]() | Note |
|---|---|
The |
In JBoss Fuse SAP Tool suite, the Edit SAP Connection Configuration dialog helps you to create and manage the SAP Application Destination connections. This section describes how to create and test the SAP destination connection.
To create and test an SAP destination connection, perform the following steps:
Navigate to the global tab of the route editor and click Add.
The view appears.
Under , select the type of connection you would like to create. Choose the and click Ok.
The dialog appears. It allows you to create, edit and delete the Destination and Server Connection Configurations.
To create a new Destination Data Store, click the Add Destination tab.
The dialog appears.
In the Properties dialog,
Click the Basic tab to configure the basic properties required to connect to an SAP destination. In this tab, fill in the following property fields to configure the connection:
Click the Connection tab to add values required to connect to an SAP destination. Fill in the following property fields to configure the connection:
Click the Authenticate tab to add values required to validate an SAP destination. Fill in the following property fields to configure the connection.
Click the Special tab. In this tab, fill in the following property fields to configure the connection:
Click the Pool tab and fill in the following property fields to configure the connection:
Click the SNC tab and fill in the following property fields to configure the connection:
Click the Repository tab and fill in the following property fields to configure the connection:
Repository Logon Password
![]() | Note |
|---|---|
If you need more information about these settings, refer the SAP documentation. |
You are now ready to test the destination connection. In the dialog, right-click on the destination name and select Test.
The Test Destination Connection dialog opens.
The dialog uses the current destination configuration settings to connect to the SAP Destination Data Store. If the test is successful, you will see the following message in the status area:
Connection test for destination 'YourDestination' succeeded.
Otherwise, an error report appears in the status area.
In JBoss Fuse SAP Tool suite, the Edit SAP Connection Configuration dialog helps you to create and manage the SAP Application Server connections. This section describes how to create and test the SAP Server connection.
To create and test the SAP Server connection, perform the following steps:
Navigate to the global tab of route editor and click Add.
The view appears.
Under , select the type of connection you would like to create. Choose the and click Ok.
The dialog appears. It allows you to create, edit and delete the Destination and Server Connection Configurations.
To create a new Server Data Store, click the Add Server tab.
The dialog appears.
In the Properties dialog,
Click the Mandatory tab to configure the basic properties required to connect to an SAP server. In this tab, fill in the following property fields to configure the connection:
Click the Optional tab and fill in the following property fields to configure the connection:
Click the SNC tab and fill in the following property fields to configure the connection.
SNC Library Path
![]() | Note |
|---|---|
For more information about the settings, refer the SAP documentation. |
You are now ready to test the server connection. In the dialog, right-click on the server name and select Test.
The Test Server Connection dialog opens.
The dialog uses the current server configuration settings to connect to the SAP Server Data Store. If the test is successful, you will see the following message in the status area:
Server state: STARTED Server state: ALIVE
If the test fails, the server status is reported as DEAD.
This following section describes how to delete the SAP Destination and Server connections in the Edit SAP Connection Configuration dialog.
If you want to delete the Destination and Server connections, perform the following steps:
Navigate to the global tab of route editor and click Add.
The view appears.
Under , select the and click Ok.
The dialog appears. It allows you to create, edit and delete the Destination and Server Connection Configurations.
Click Delete. It will delete the selected connections.
Atlast, click Finish. It will save all the changes.
You can use the Components palette in the route editor to add SAP components to a route with the help of the Edit SAP Connection Configuration dialog.
![]() | Note |
|---|---|
If you are using the SAP Connection view, remember to paste the requisite SAP connection configuration data into your Blueprint XML or Spring XML code. |
You must already have created some SAP destination connections and/or server connections with the help of the Edit SAP Connection Configuration dialog.
![]() | Note |
|---|---|
If you are using the SAP Connection view, export this configuration to a file of the appropriate type (Blueprint XML or Spring XML). |
To create a new SAP endpoint, perform the following steps:
Open your Camel XML file in the route editor. If you have already installed the JBoss Fuse SAP Tool Suite, you should be able to see the SAP components under the Components palette in the route editor. The following SAP components are provided by the tool suite:
SAP tRFC Server
In the Design tab of the route editor, drag one of these
components onto the canvas to create a new SAP endpoint in the current
camelContext.
![]() | Note |
|---|---|
The SAP Netweaver component does not belong to the JBoss Fuse SAP Tool Suite. It is hosted in the Apache Camel project. |
When specifying an SAP endpoint URI, you must embed either a destination name
or a server connection name in the URI format. For example, the
sap-srfc-destination component has the following URI
format:
sap-srfc-destination:destinationName:rfcName
To reference a particular destination, use the value of the relevant
entry element’s key attribute as the destinationName in this URI.
Table of Contents
One of the challenges that comes with system and data integration is that the component systems often work with different data formats. You cannot simply send messages from one system to another without translating it into a format (or language) recognized by the receiving system. Data transformation is the term given to this translation.
In this tutorial you will learn how to use the data transformation tooling to include data transformation in a predefined Camel route. The Camel route directs messages from a source endpoint that produces XML data to a target endpoint that consumes JSON data. You will add and define a data transformation component that maps the source’s XML data format to the target’s JSON data format.
Click to open the Maven Projects wizard.

Click to find and select the root directory
of the starter quickstart application.
If the browse operation finds multiple projects, make sure you select the
starter quickstart application. The full path to the
starter quickstart application appears in the
pane.
Click .
After the import operation finishes, the starter project
appears in the Project Explorer view.
starter project.Double-click
starter/src/main/resources/META-INF/spring/camel-context.xml
to open the route in the route editor’s Design
tab.

Click the Source tab to view the underlying XML.
You can see that an XML file is produced from a source endpoint and a JSON file is consumed by a target endpoint.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="camelContext-272d04f8-e498-466d-b34b-3c24d01a4e10" xmlns="http://camel.apache.org/schema/spring"
<route id="_route1">
<from id="_from1" uri="file:src/data?fileName=abc-order.xml&noop=true"/>
<to id="_to1" uri="file:target/messages?fileName=xyz-order.json"/>
</route>
</camelContext>
</beans>![]() | Note |
|---|---|
Although the following mini tutorials are written to be run in consecutive order, you can run them in any order. If you change the order then the console output for a tutorial will differ from that shown here. |
Drag a Data Transformation pattern over the canvas and drop it on the
Route_route1 container.
The New Transformation wizard opens with the Project, Dozer File Path, and Camel File Path fields auto filled.

Fill in the remaining fields:
xml2json.Click .
The Source Type (XML) definition page opens, where you specify either an XML Schema (default) or an example XML Instance Document to provide the type definition of the source data:

For Source file, browse to the location of the XML schema file or the XML
instance file to use for the type definition of the source data, and select
it (in this case, abc-order.xsd).
The XML Structure Preview pane displays a preview of the XML structure.
In the Element root field, enter
ABCOrder.
The tooling uses this text to label the pane that displays the source data items to map.
The Source Type (XML) definition page should now look like this:

Click to open the Target Type (JSON) definition page. This is where you specify the type definition for the target data.

Click JSON Instance Document.
In the Target File field, enter the path to the
xyz-order.json instance document, or browse to it.
The JSON Structure Preview pane displays a preview of
the JSON data structure:

The transformation editor opens. This is where you can map data items in your XML source to data items in your JSON target.

The transformation editor is composed of three panels:
In addition, the editor’s details pane, located just below the editor’s three panels (once the first mapping has been made), graphically displays the hierarchical ancestors for both the mapped source and target data items currently selected. For example:

Using the details pane, you can customize the mapping for the selected source and target data items:
Expand all items in the Source and Target panels located on left and right sides of the Mappings panel.

Drag a data item from the Source panel and drop it on its corresponding data item in the Target panel.
For example, drag the customerNum data item from the
Source panel and drop it on the custId
data item in the Target panel.

The mapping appears in the Mappings panel, and the details of both the Source and Target data items appear below in the details pane.
Continue dragging and dropping source data items onto their corresponding target data items until you have completed all basic mappings.
In the starter example, the remaining data items to
map are:
| Source | Target + |
|---|---|
|
+ |
|
+ |
|
+ |
|
+ |
|
+ |
![]() | Note |
|---|---|
You can map collections (data items containing lists or sets) to noncollection data items and vice versa, but you cannot map collections to other collections. |
Click
on both the Source and
Target panels to quickly determine whether all data
items have been mapped.

Only data items that have not been mapped are listed in the Source and Target panels.
In the starter example, the remaining unmapped
Target attributes are
approvalCode and
origin.
Hover your cursor over each endpoint to reveal its connecter arrow.

Selecting the file:src/data?fil… node, drag and drop its connector arrow
onto the ref:xml2json node. Likewise drag and drop the connector arrow from
the ref:xml2json node onto the
file:target/messa… node.

Connecting the nodes on the canvas creates a valid Camel route, which you can now save.
You can run a JUnit test on your transformation file after you create the transformation test. For details, see Creating the transformation test file and running the JUnit test. If you do so at this point, you will see this output in the Console view:
<?xml version="1.0" encoding="UTF-8"?>
<ABCOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com">
<header>
<status>GOLD</status>
<customer-num>ACME-123</customer-num>
<order-num>ORDER1</order-num>
</header>
<order-items>
<item id="PICKLE">
<price>2.25</price>
<quantity>1000</quantity>
</item>
<item id="BANANA">
<price>1.25</price>
<quantity>400</quantity>
</item>
</order-items>
</ABCOrder>for the source XML data, and
{"custId":"ACME-123","priority":"GOLD","orderId":"ORDER1","lineItems":[{"itemId":"PICKLE",
"amount":1000,"cost":2.25},{"itemId":"BANANA","amount":400,"cost":1.25for the target JSON data.
starter project in the
Project Explorer view, and select menu:[New > Other > Fuse Tooling > Fuse Transformation Test].In the New Transformation Test wizard, set the following values:
| Field | Value + |
|---|---|
Package |
+ |
Transformation ID |
+ |
starter/src/test/java/example, and open the
TransformationTest.java file.Add the following code to the transform method:
startEndpoint.sendBodyAndHeader(readFile("src/data/abc-order.xml"), "approvalID", "AUTO_OK");Click > .
You can now run a JUnit test on your transformation file at any point in these tutorials.
starter project to expose the
/src/test/java/example/TransformationTest.java
file.Right click it to open the context menu, and select Run as JUnit Test.
The JUnit Test pane opens to display the status of the test. To avoid cluttering your workspace, drag and drop the pane in the bottom panel near the Console view.

When a source/target data item has no corresponding target/source data item, you can map a constant variable to the existing data item.
In the starter example, the target data item
origin does not have a corresponding source data item. To
map the origin attribute to a constant variable:
In the Source panel, click the Variables view.

In the Variables view, click
to open the Enter a new variable
name dialog.

Enter a name for the variable you want to create.
For the starter example, enter
ORIGIN.
Click .
The newly created variable ORIGIN appears in the
Variables view in the Name
column and the default value ORIGIN in the Value
column.
Web.Drag and drop the new variable ORIGIN onto the
origin data item in the
Target panel.

The new mapping of the variable $(ORIGIN) appears in
the Mappings panel and in the details pane.
Run a JUnit test on your
TransformationTest.java file. For details, see
Creating the transformation test file and running the JUnit test.
The Console view displays the JSON-formatted output data:
{"custId":"ACME-123","priority":"GOLD","orderId":"ORDER1","origin":"Web",
"approvalCode":"AUTO_OK","lineItems":[{"itemId":"PICKLE","amount":1000,"cost":2.25},
{"itemId":"BANANA","amount":400,"cost":1.25}]}This feature enables you, for example, to map a target data item to the dynamic evaluation of a Camel language expression.
Use the target approvalCode data item, which lacks a
corresponding source data item:
Click
to add an empty transformation map to the
Mappings panel.

From the Target panel, drag and drop the
approvalCode data item to the target field of the
newly created mapping in the Mappings
panel.

The approvalCode data item also appears in the
details pane’s target box.
In the details pane, click
on the ABCOrder source box to open
the drop-down menu.

Menu options depend on the selected data item’s data type. The available options are bolded.
Select Set expression to open the Expression dialog.

In Language, select the expression language to use from the list of those available. Available options depend on the data item’s data type.
For the starter example, select
Header.
In the details pane, select the source of the expression to use.
The options are Value and Script.
For the starter example, click
Value, and then enter
ApprovalID.
Click OK.

Both the Mappings panel and the details pane display
the new mapping for the target data item
approvalCode.
Run a JUnit test on your TransformationTest.java
file. For details, see Creating the transformation test file and running the JUnit test.
The Console view displays the JSON-formatted output data:
{"custId":"ACME-123","priority":"GOLD","orderId":"ORDER1","origin":"Web",
"approvalCode":"AUTO_OK","lineItems":[{"itemId":"PICKLE","amount":1000,"cost":2.25},
{"itemId":"BANANA","amount":400,"cost":1.25}]}You may need to modify the formatting of source data items when they do not satisfy the requirements of the target system.
For example, to satisfy the target system’s requirement that all customer IDs be enclosed in brackets:
In the Mappings panel, select the customerNum
mapping to populate the details pane.

In the details pane, click
on the ABCOrder source box to open
the drop-down menu.

Select Add custom transformation to open the Add Custom Transformation page.

Click
next to the Class field to open
the Create a New Java Class wizard.

Modify the following fields:
example.MyCustomMapper.Method Name — Change
map to
brackets.
Leave all other fields as is.
Click Finish.
The Add Custom Transformation page opens with the Class and Method fields auto filled:

Click OK to open the
MyCustomMapper.java file in the
Java editor:

Edit the brackets method to change the last line return null;
to this:
return "[" + input + "]";
Click the transformation.xml tab to switch back to the transformation editor.

The details pane shows that the brackets method
has been associated with the customerNum data
item.
The brackets method is executed on the source
input before it is sent to the target system.
Run a JUnit test on your TransformationTest.java
file. For details, see Creating the transformation test file and running the JUnit test.
The Console view displays the JSON-formatted output data:
{"custId":"[ACME-123]","priority":"GOLD","orderId":"ORDER1","origin":"Web",
"approvalCode":"AUTO_OK","lineItems":[{"itemId":"PICKLE","amount":1000,"cost":2.25},
{"itemId":"BANANA","amount":400,"cost":1.25}]}In this tutorial, you will modify an existing mapping that maps all
ids in the Source to the itemIds in
the Target. The new mapping will map the customerNum data item
in the Source to the itemId of the second item in the
lineItems collection in the Target.
With this change, no ids in the Source will be mapped to
itemIds in the Target.
In the Mappings panel, select the mapping id
— > itemId to display the mapping in the details
pane.

On the Source box, click
to open the drop-down menu, and select Set
property.

In the Select a property page, expand the
header node and select
customerNum. Click to save the changes.

The details pane now shows that XyzOrder has a
lineItems field. Click the toggle button next to
lineItems to increase its value to
1.
![]() | Note |
|---|---|
Indexes are zero-based, so a value of |

Notice that the details pane shows customerNum mapped
to the itemId of the second item in the
lineItems collection.
Run a JUnit test on your TransformationTest.java
file. For details, see Creating the transformation test file and running the JUnit test.
The Console view displays the JSON-formatted output data:
{"custId":"[ACME-123]","priority":"GOLD","orderId":"ORDER1","origin":"Web",
"approvalCode":"AUTO_OK","lineItems":[{"amount":1000,"cost":2.25},
{"itemId":"ACME-123","amount":400,"cost":1.25}]}You can use the built-in string-related functions to apply transformations to mapped data items.
In the Transformations panel, select the
status to priority mapping to
populate the details pane.

In the Source box, click
to open the drop-down menu, and select Add
transformation.

In the Transformations pane, select
append, and in the Arguments
pane, enter -level for the value of
suffix.
This append function adds the specified suffix to the
end of the status string before mapping it to the
target priority data item.

Click .

By default, the details pane displays the results of adding the
append function to the status
data item in a user-friendly format. You can change this formatting by
clicking the right-most
on the Source box, and selecting Show
standard formatting.

Run a JUnit test on your TransformationTest.java
file. For details, see Creating the transformation test file and running the JUnit test.
The Console view displays the JSON-formatted output data:
{"custId":"[ACME-123]","priority":"GOLD-level","orderId":"ORDER1","origin":"Web",
"approvalCode":"AUTO_OK","lineItems":[{"amount":1000,"cost":2.25},{"itemId":"ACME-123",
"amount":400,"cost":1.25}]}server
Before you publish your data transformation project to a JBoss Fuse server (see Publishing Fuse Integration Projects to a Server), you need to install the following features in the JBoss Fuse runtime:
camel-dozercamel-jacksoncamel-jaxbTo install the required features on the JBoss Fuse runtime:
Start the JBoss Fuse Server (see Starting a Server), and wait for the JBoss Fuse shell to appear in the Terminal view:

For each of the required camel- features, at the
JBossFuse:admin@root> prompt type:
features:install camel-<featureName>
Where featureName is one of
dozer, jackson, or
jaxb.
To verify that each of the features was successfully installed, at the
JBossFuse:admin@root> prompt type:
features:list --ordered --installed
You should see the camel features you just installed in the output listing:

Ignite is a Red Hat JBoss Fuse feature that provides a web interface for integrating applications. Without writing code, a business expert can use Ignite to connect to applications and optionally operate on data between connections to different applications. In Ignite, a data operation is referred to as a step in an integration.
Ignite provides steps for operations such as filtering and mapping data. To operate on data in ways that are not provided by Ignite built-in steps, you can develop an Ignite extension to define one or more custom steps.
Here is an overview of the tasks for developing an Ignite extension:
.jar file..jar file to the Ignite user.The Ignite user uploads the .jar file to Ignite and can then add the custom step(s) defined in the extension to an integration. For information about Ignite and how to build integrations, see Integrating Applications with Ignite.
Before you begin, you need the following information and knowledge:
The version of each of the following components for the extension:
You should be familiar with :
To use the Fuse tooling to create an extension project, follow these steps.
In Red Hat JBoss Developer Studio, select > > > > .
The New Fuse Ignite Extension Project wizard opens.
Specify the versions of the extension dependencies:
Specify the following extension details:
.jar file.The new project appears in the Red Hat JBoss Developer Studio Project Explorer view. It includes the following files:
A descriptor file: META-INF/syndesis/syndesis-extension-definition.json
This is the file that you edit to add actions and their properties. An action in the .json file becomes a custom step in Ignite. A property becomes an action parameter in Ignite.
A Camel context file: extension.xml
This file contains a sample route with a log component. You customize the Camel routes in this file.
A Maven Project Object Model file: pom.xml
This file contains information about the project and configuration details used by Maven to build the project, including default extension dependencies. You edit this file to add custom dependencies or to edit the Extension Id, Name, Version, Tags, or Description values.
To write the code that implements a custom step for Ignite:
extension.xml file, create routes that address the purpose of the extension. The entrypoint of each route must match the entrypoint that you define in the syndesis-extension-definition.json file, as described in Step 2.In the syndesis-extension-definition.json file, write the code that defines the actions and their properties. You need a new action for each entrypoint. Each property corresponds to an action parameter. In Ignite, when the user selects a custom step, Ignite prompts for values for action properties. For example, a custom log step might have a level property that indicates how much information to sent to the log.
Each action that you create corresponds to a custom step in Ignite. You can use different types of code for each action. That is, you can use XML for one action and Spring Boot routes and beans for another action.
Here is the template for the .json file that contains the extension metadata, including properties that will be filled in by the user in Ignite after uploading the extension and adding its custom step to an integration:
{
"actions": [
{
"actionType": "extension",
"id": "${actionId}",
"name": "Action Name",
"description": "Action Description",
"tags": [
"xml"
],
"descriptor": {
"kind": "ENDPOINT|BEAN|STEP",
"entrypoint": "direct:${actionId}",
"inputDataShape": {
"kind": "any"
},
"outputDataShape": {
"kind": "any"
},
"propertyDefinitionSteps": []
}
}
],
"tags": [
"feature",
"experimental"
]
}Note: The tags are ignored in this release. They are reserved for future use.
To edit the extension dependencies, open the pom.xml file in the editor. If you add a dependency, you must define its scope. The scope for any dependency that Red Hat ships is provided, for example:
<dependency>
<groupId>io.syndesis.integration-runtime</groupId>
<artifactId>runtime-api</artifactId>
<version>${syndesis.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<scope>provided</scope>
</dependency>Note: You can optionally edit the Extension Id, Name, Version, Tags, or Description values.
To build the .jar file for the extension:
In the Project Explorer view, open the target folder to see the generated .jar file:
The name of the .jar file follows Maven defaults: ${artifactId}-$6.3.jar
For example: ignite-extension-1.0.0-SNAPSHOT
This .jar file defines the extension steps, its required dependencies, and its metadata: Extension Id, Name, Version, Tags, and Description. For example:
{
"name" : "Syndesis Extension (XML)",
"description" : "A simple Syndesis Extension (XML)",
"extensionId" : "com.mycompany:syndesis-extension-example-xml",
"version" : "1.0.0-SNAPSHOT",
"tags" : [ "experimental", "feature" ],
"actions" : [ {
"id" : "log-body",
"name" : "simple-log-body",
"description" : "A simple xml based logging extension",
"descriptor" : {
"kind" : "ENDPOINT",
"entrypoint" : "direct:log-body",
"inputDataShape" : {
"kind" : "any"
},
"outputDataShape" : {
"kind" : "any"
},
"propertyDefinitionSteps" : [ ]
},
"tags" : [ "xml" ],
"actionType" : "extension"
} ],
"dependencies" : [ {
"type" : "MAVEN",
"id" : "io.syndesis.integration-runtime:runtime-api:jar:1.2.1"
}, {
"type" : "MAVEN",
"id" : "org.apache.camel:camel-core:jar:2.20.1"
}, {
"type" : "MAVEN",
"id" : "org.springframework.boot:spring-boot-starter:jar:1.5.8.RELEASE"
} ],
"properties" : { }
}Provide the following to the Ignite user:
.jar fileIn Ignite, the user uploads the .jar file as described in Integrating Applications with Ignite.
As you work with a Fuse tooling project, you might want to change the Camel version that it uses. This can be helpful, for example, if you want to use a feature supported in a more recent Camel version or if you want to use a community version.
To change the Camel version that a project uses:
In the Change Camel Version window, to the right of the Camel Version field, click the down caret to display available Camel versions.
To use a community version of Apache Camel, you enter its version number,
for example, 2.19.2.
Fuse Tooling checks whether the version you selected is available and
supported by Fuse Tooling. If it is then Fuse Tooling changes the Camel
version and saves the project’s updated pom.xml file. You receive an error
message if the Camel version you select is not available or not supported.
You can check the project’s Camel version in its pom.xml file,
in the <camel.version> element.