Red Hat JBoss Fuse

Integration Guide

Use Integration packs for Red Hat JBoss Fuse

Red Hat

Version 6.3

Copyright © 2011-2015 Red Hat, Inc. and/or its affiliates.

Trademark Disclaimer

The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.

Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.

Apache, ServiceMix, Camel, CXF, and ActiveMQ are trademarks of Apache Software Foundation. Any other names contained herein may be trademarks of their respective owners.

06 Dec 2016

Abstract

Use this guide to help you use the Integration packages on Red Hat JBoss Fuse.

Chapter 1. Install Integration Pack

The Integration packages for JBoss Fuse 6.3 contain libraries and components that can interact with other integration modules that are not included in the base JBoss Fuse 6.3 package.

Pack Definitions

The JBoss Fuse Integration Packages contain the following components:

Package Name | Available Download
Fuse Integration distro for Karaf | fuse-integration-karaf-distro-1.5.0.redhat-version.zip
Fuse Integration distro for JBoss EAP | The fuse-integration-eap-full-1.5.0.redhat-version-installer.zip contains fuse-integration-eap-installer-1.5.0.redhat-version.jar and the kie-eap-installer-6.4.0.Final-redhat-8.jar
| The fuse-integration-eap-installer-1.5.0.redhat-version.jar is available for download on its own.
KIE JBoss Fuse Distributions BPMS layer | kie-eap-installer-6.4.0.Final-redhat-8.jar or the kie-eap-distributions-bpms-layer-6.4.0.Final-redhat-8.zip
Fuse Integration Pack Maven repository | jboss-fuse-intpack-1.5.0.redhat-version-maven-repository.zip

Instructions for JBoss Fuse on JBoss EAP

Prerequisites

JBoss Fuse 6.3 must be installed on JBoss EAP 6.4. See JBoss EAP 6.4 Installation Guide and Installation on JBoss EAP for installation instructions.

Identify the correct sequence of packages to install

When you are installing an Integration Pack over JBoss Fuse Fuse on JBoss EAP, you must match the version of the Integration Pack to the version of JBoss Fuse. For example, the JBoss Fuse version may be the GA version or a roll-up patch. If the JBoss Fuse version is the GA version, then the Integration Pack version must be the GA version. However, if the JBoss Fuse version is roll-up pack 3, the Integration Pack version must also be roll-up pack 3. See the JBoss Fuse 6.3 Software Downloads page on the Red Hat Customer Portal for available version numbers.

Install the Fuse Integration Pack on JBoss Fuse on JBoss EAP

The integration Fuse Integration Pack pack must be installed on the Fuse/EAP instance of JBoss EAP.

The JBoss EAP installation directory is referred to as EAP_HOME in these instructions.

Make sure that the JBoss EAP server is stopped. See chapter "Start and Stop the Application Server" in "Installation on JBoss EAP".

Unpack the downloaded Integration Pack file, fuse-integration-eap-installer-distro-version.zip, into a temporary location.

Navigate to EAP_HOME and install the KIE EAP package using the following command:

java -jar temporary location/kie-eap-installer-version.jar

Stay in EAP_HOME and install the Fuse integration package using the following command:

 java -jar temporary location/fuse-integration-eap-installer-version.jar

Run the Quickstarts

The Fuse integration quickstarts can be found in EAP_HOME/quickstarts/fuse-integration.

Start the instance of JBoss EAP where the integraton pack has been installed. See chapter "Start and Stop the Application Server" in "Installation on JBoss EAP"

Navigate to EAP_HOME/quickstarts/fuse-integration.

Navigate to the directory for the quickstart you want to run. Follow the instructions in the README file to execute the quickstart. Each quickstart has different instructions.

Instructions for JBoss Fuse on Karaf

Install the Integration Pack on JBoss Fuse on Karaf

Procedure 1.1. Install the Integration Pack on JBoss Fuse on Karaf

The Integration Pack pack must be installed on an instance of JBoss Fuse on Karaf. Make sure that the server is stopped.

Download fuse-integration-karaf-distro-1.5.0.redhat-version.zip and unpack the .zip files on to JBoss Fuse on Karaf.

Start JBoss Fuse.

In Karaf, add Drools if it has not already been added:

features:addurl mvn:org.drools/drools-karaf-features/6.4.0.Final-redhat-10/xml/features-fuse-6_3

Add the JBoss Fuse integration features files:

features:addurl mvn:org.jboss.integration.fuse/karaf-features/1.5.0.redhat-630018/xml/features

Install the core features by entering the following command:

features:install feature-name

and replacing feature-name with the feature name one at a time:

fuse-bxms-switchyard-bpm
fuse-bxms-switchyard-common-knowledge
fuse-bxms-switchyard-rules

Add the JBoss Fuse integration quickstart features files:

features:addurl mvn:org.jboss.integration.fuse.quickstarts/karaf-features/1.5.0.redhat-630018/xml/features

Install the quickstart features by entering the following command:

features:install feature-name

and replacing feature-name with the feature name one at a time:

fuse-bxms-quickstart-switchyard-bpm-service
fuse-bxms-quickstart-switchyard-rules-camel-cbr
fuse-bxms-quickstart-switchyard-rules-interview
fuse-bxms-quickstart-switchyard-rules-interview-container
fuse-bxms-quickstart-switchyard-rules-interview-dtable
fuse-bxms-quickstart-switchyard-library
fuse-bxms-quickstart-switchyard-rules-multithread
fuse-bxms-quickstart-switchyard-rules-csv
fuse-bxms-quickstart-switchyard-helpdesk-ds
fuse-bxms-quickstart-switchyard-helpdesk
fuse-bxms-quickstart-switchyard-drools-channels
fuse-bxms-quickstart-camel-blueprint-drools-decision-table
fuse-bxms-quickstart-camel-spring-drools-decision-table
fuse-bxms-quickstart-camel-jbpm-workitems

The Fuse integration quickstarts can be found in fuse_install_dir/quickstarts/fuse-integration. Navigate to the directory for the quickstart you want to run. Follow the instructions in the README file to execute the quickstart. Each quickstart has different instructions.

Using Integration Pack with Maven

In order for Maven to resolve the supported versions of CXF and camel-cxf artifacts, the jboss-fuse-parent BOM must be imported into the dependencyManagement section of the top-level pom.xml. For example:

<dependencyManagement>
    ...
    <dependency>
       <groupId>org.jboss.fuse.bom</groupId>
       <artifactId>jboss-fuse-parent</artifactId>
       <version>version.fuse.eap</version>
       <type>pom</type>
       <scope>import</scope>
    </dependency>

The value of version.fuse.eap should be 6.3 in this instance.

Chapter 2. kie-eap-distribution-bpms-layer package

The Integration Pack contains a .zip file which contains JBoss EAP modules for Red Hat JBoss BPM (JBoss BPM) and Red Hat JBoss BRMS (JBoss BRMS) integration.

Warning

JBoss BPM and JBoss BRMS are separate products. The integration package can only be used if you have a subscription to the product you want to integrate with.

Apply the package

The package will be applied by the SwitchYard/BRMS Integration Pack installer jar.

Contents of the JBoss BPMS layer integration package

The following table shows the relationships between different components in BxMS and JBoss Fuse. Expansion of the table entries can be found below the table.

Table 2.1. Relationship Between JBoss BPM/JBoss BRMS components and Fuse components

Camel
SwitchYard

JBoss BPM

JBos BPM can invoke Camel

JBoss BPM can orchestrate SwitchYard services

Camel can invoke JBoss BPM
SwitchYard can invoke JBoss BPM

Rules

Rules does not use Camel.

Rules does not use SwitchYard

Camel can use Rules
SwitchYard can call Rules

JBoss BPM can invoke Camel

JBoss BPM has a Camel WorkItemHandler. See JBoss BPM Suite Development Guide for more information.

Camel can invoke JBoss BPM

There are three interfaces that can be used to invoke JBoss BPM from Camel:

JMS - see JBoss BPM Suite Development Guide - JMS section

REST - JBoss BPM Suite Development Guide - REST API section

Java - see JBoss BPM Suite Development Guide - Remote Java API section

JBoss BPM can orchestrate SwitchYard services

The JBoss BPM process definition must be embedded in the SwitchYard application, not on a remote JBoss BPM server.

JBoss BPM will not execute on a remote JBoss BPM server. It will only run via jars provided in the integration pack.

See the provided quickstart EAP_HOME/quickstarts/fuse-integration/switchyard-bpm-service for an example.

SwitchYard can invoke JBoss BPM

The following scenarios have are supported:

Invoke/signal local JBoss BPM process defined as a SwitchYard service.

Invoke/signal remote JBoss BPM process defined as a SwitchYard service.

Invoke/signal a remote JBoss BPM process and insert/execute rules locally as a SwitchYard service using rules definitions resolved as KIE artifacts using Maven.

JBoss BPM process can be embedded in the SwitchYard application or it can be on a JBoss BPMS server on a different JVM.

If the process is embedded, the engine used must be the .jar file that is installed as part of the Integration pack. If the JBoss BPM engine is running locally in the JBoss Fuse JVM, then it can only be used to orchestrate SwitchYard services and can not be used to perform other tasks.

If the JBoss BPM process is not embedded, the invocation must occur via the SwitchYard JBoss BPM component. In this case, the user does not need to manage the interaction.

Camel can use Rules

You can insert facts and execute rules locally in JBoss Fuse using a Camel route. Rule definitions are resolved as KIE artifacts using Maven.

Camel can invoke Business Rules when the Karaf container is used. This functionality is not available on JBoss Fuse on JBoss EAP. It will be made available in a future release.

For use by JBoss BPM, the Rules must be in a Maven repository where the Kie scanner can find them. The Maven repository can be on the same machine or a remote machine. If the repository is on a remote machine, the rules will be added to the local repository during rules resolution process.

The Rules engine can be placed on the same machine as Camel is installed on, or on a remote JBoss BRMS execution server. For the local engine, binaries are provided by the Integration Pack. For the remote engine, the rules can be invoked using a mechanism such as the REST interface provided by JBoss BRMS.

SwitchYard can use Rules

You can insert facts and execute rules locally as a SwitchYard service using rules definitions deployed with the application. This makes the rules static and will require a rebuild to change them.

Alternatively you can insert facts and execute rules locally as a SwitchYard service using rules definitions resolved as KIE artifacts using Maven.. This repository can be either on the same machine as JBoss Fuse, or on a remote machine. Rules stored in a Maven repository can be updated at runtime using Kie scanning.

The Rules engine is installed on the JBoss Fuse server as part of the integration pack installation.

Chapter 3. Configuring Maven Dependencies

This chapter provides information on how to use the Apache CXF component with Kie-Camel.

Integrating Apache CXF with Kie-Camel

In order to support both EAP and Karaf containers, kie-camel should support Apache CXF 2.7.x and 3.x versions. Both the versions may contain different packages, classes, and methods. In your project, if you are using both kie-camel and Apache CXF, the application may display few classpath collision errors. To avoid this, Red Hat recommends you to exclude the artifacts which do not match the container version, and replace with the version matching the version of Apache CXF in your container.

EAP 6.4.x: You can define eap.cxf.version in properties with Apache CXF version that is in your EAP container.

<dependency>
    <groupId>org.jboss.integration.fuse</groupId>
    <artifactId>kie-camel</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-core</artifactId>
    <version>${eap.cxf.version}</version>
</dependency>

Fuse on Karaf: Define karaf.cxf.version in properties with Apache CXF version that is in your Fuse/Karaf container.

<dependency>
    <groupId>org.jboss.integration.fuse</groupId>
    <artifactId>kie-camel</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-security-oauth</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-features-clustering</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-bindings-soap</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-rs-security-oauth</artifactId>
    <version>${karaf.cxf.version}
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-frontend-jaxws</artifactId>
    <version>${karaf.cxf.version}
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-frontend-jaxrs</artifactId>
    <version>${karaf.cxf.version}
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-features-clustering</artifactId>
    <version>${karaf.cxf.version}
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-bindings-soap</artifactId>
    <version>${karaf.cxf.version}
</dependency

Chapter 4. Download the Offline Repository

A Maven repository containing the artifacts required for the Integration Pack is available for download. It is an optional download and is provided for when an offline Maven repository is used.

Note

This repository is only useful if you are using offline Maven repositories.

Download jboss-fuse-intpack-1.5.0.redhat-version-maven-repository.zip and unpack the .zip file into an accessible location.

Add entries for the unzipped repositories to Maven's settings.xml file. Base your entry on the code below.

    <repository>
​      <id>BPMS-repo</id>
​       <name>Red Hat JBoss Fuse 6.3.0</name>
​        <url>file://file-location/BPMS-repo/maven-repository/</url>
​        <layout>default</layout>
​        <releases>
​          <enabled>true</enabled>
​          <updatePolicy>never</updatePolicy>
​        </releases>
​        <snapshots>
​          <enabled>false</enabled>
​          <updatePolicy>never</updatePolicy>
​        </snapshots>
​    </repository>