Information Technology Reference
In-Depth Information
Integrating components with the existing
workbenches
Workbenches are Maven-based web projects that depend extensively on UberFire and its
internal configurations to work. Due to UberFire being in an alpha state, workbench defini-
tion is something that might still change a lot. It is because of this reason that we will not
see how to create our own workbenches in detail. Instead, we are going to see the necessary
steps to add new components built with UberFire in an already existing workbench. This is
less prone to change to keep compatibility with already defined components. If you wish to
build your own workbench from scratch, visit
http://www.uberfireframework.org
for more
help with that aspect.
Review the
jbpm-console-ng-showcase
project inside the
uberfire-demo
folder. This is one workbench already available in the open source jBPM6 repositories to
which we have added
uberfire-demo
as an extra component.
The steps taken to add new components to an UberFire based workbench are as follows:
1. The first step needed to let GWT compile our Java components into JavaScript
modules in the workbench is to add the component release IDs to the workbench as
dependencies. In this case, we can do this by adding
uberfire-demo-client
and
uberfire-demo-backend
dependencies into a particular workbench's
pom.xml
file.
2. Maven will trigger the GWT code translation to JavaScript, but will need to know
all the dependencies that need to be translated to JavaScript. To do so, we need to
add two
compileSourcesArtifact
tags to the GWT Maven plugin configur-
ation—one for
uberfire-demo-api
, and one for
uberfire-demo-cli-
ent
.
3. GWT uses special XML files to define modules and dependencies between them.
We have defined two of them in our demonstration projects (
UberfireDe-
moAPI.gwt.xml
and
UberfireDemoClient.gwt.xml
). In order to make
the GWT code know that it will use those modules, we need to make the specific
workbench GWT XML file that has those modules (and any other we define) as
dependencies, using the
inherits
tag:
<inherits name="path.to.my.UberfireModule"/>