Integration Guide

Red Hat JBoss Fuse

Use Integration packs for Red Hat JBoss Fuse

Red Hat

Version 6.2.1
21 Sep 2017

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.2.1 contain libraries and components that can interact with other integration modules that are not included in the base JBoss Fuse 6.2.1 package.

Pack Definitions

The JBoss Fuse Integration Packages contain the following components:

  1. Fuse Integration distros for both Karaf and JBoss EAP - SwitchYard BRMS components: Rules component and BPM component
  2. KIE JBoss Fuse Distributions BPMS layer - Camel components used in KIE: kie-camel and jbpm-workitem-camel components

1.1. Instructions for JBoss Fuse on JBoss EAP

Prerequisites

JBoss Fuse 6.2.1 must be installed on JBoss EAP 6.4. If you need to install JBoss EAP 6.4, download it from JBoss EAP 6.4 Installer Download. See JBoss EAP 6.4 Installation Guide for installation instructions.

Identify the correct sequence of packages to install

When installing JBoss Fuse on EAP and the integration package over the base JBoss EAP 6.4 installation, it is essential to install the correctly matching packages in the right order. The following types of package can be downloaded from the JBoss Fuse 6.2.1 Software Downloads page on the Red Hat Customer Portal:
Red Hat JBoss Fuse 6.2.1 [Rollup N] on EAP Installer
For the JBoss Fuse on EAP package, you have a choice between the original GA package or subsequent rollup patches, identified by Rollup N in the package name. Generally, we recommend that you install the latest rollup patch.
Integration Pack for Red Hat JBoss Fuse 6.2.1 [Roll Up N] on EAP, BRMS VersionOfBRMS and BPM Suite VersionOfBPMS Installer
The integration package that you pick must have a rollup number, Roll Up N, that matches rollup number of the underlying JBoss Fuse on EAP package.

Install the SwitchYard/BRMS Integration Pack on JBoss EAP

The integration SwitchYard/BRMS pack must be installed on the Fuse/EAP instance of JBoss EAP. Make sure that the server is stopped.
  1. It is assumed that JBoss EAP 6.4 is already installed, where the installation directory is given by the environment variable EAP_HOME.
  2. If you have not already installed the JBoss Fuse on EAP package, install it now. Download the appropriate GA package or rollup patch, and install it over JBoss EAP using the following command:
    java -jar fuse-eap-installer-version.jar ${EAP_HOME}
  3. (For integration packages released before JBoss Fuse 6.2.1 Rollup 3) Prior to JBoss Fuse 6.2.1 Rollup 3, integration packages were released as a single Jar file which could be installed directly over the JBoss EAP installation using the following command:
    java -jar fuse-integration-eap-installer-version.jar ${EAP_HOME}
  4. (For subsequent integration packages) More recent integration packages consist of an archive file, fuse-integration-eap-installer-distro-version.zip, which must be unpacked to obtain two separate Jar files that are installed in sequence. To install this kind of integration package, proceed as follows:
    1. Use an archive utility to extract the Jar packages from the downloaded integration package file, fuse-integration-eap-installer-distro-version.zip, into a convenient temporary location.
    2. Install the KIE EAP package over JBoss EAP using the following command:
      java -jar kie-eap-installer-version.jar ${EAP_HOME}
    3. Install the Fuse integration package over JBoss EAP using the following command:
       java -jar fuse-integration-eap-installer-version.jar ${EAP_HOME}

Run the Quickstarts

The Fuse integration quickstarts can be found in $EAP_HOME/quickstarts/fuse-integration.
  1. 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"
  2. Navigate to $EAP_HOME/quickstarts/fuse-integration.
  3. 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.

1.2. Instructions for JBoss Fuse on Karaf

Install the Integration Pack on JBoss Fuse on Karaf

Procedure 1.1. Install the SwitchYard/BRMS Integration Pack on JBoss Fuse on Karaf

The integration SwitchYard/BRMS pack must be installed on an instance of JBoss Fuse on Karaf. Make sure that the server is stopped.
  1. Download fuse-integration-karaf-distro-1.3.0.redhat-002.zip and unpack the .zip files on to JBoss Fuse on Karaf.
  2. Start JBoss Fuse.
  3. In Karaf, add Drools if it has not already been added:
    features:addurl mvn:org.drools/drools-karaf-features/6.3.0.Final-redhat-5/xml/features
  4. Add the JBoss Fuse integration features files:
    features:addurl mvn:org.jboss.integration.fuse/karaf-features/1.3.0.redhat-002/xml/features
  5. 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
    
  6. Add the JBoss Fuse integration quickstart features files:
    features:addurl mvn:org.jboss.integration.fuse.quickstarts/karaf-features/1.3.0.redhat-002/xml/features
  7. 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-switchyard-quickstart-rules-camel-cbr
    fuse-bxms-switchyard-quickstart-rules-interview
    fuse-bxms-switchyard-quickstart-rules-dtable
    fuse-bxms-switchyard-quickstart-rules-interview-container
    fuse-bxms-switchyard-quickstart-bpm-service
    fuse-bxms-switchyard-demo-library
    fuse-bxms-switchyard-demo-helpdesk
    fuse-bxms-camel-spring-drools-decision-table
    fuse-bxms-camel-blueprint-drools-decision-table
    fuse-bxms-switchyard-quickstart-rules-csv
    fuse-bxms-switchyard-quickstart-rules-multithread
The Fuse integration quickstarts can be found in 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.

Install the Integration Pack on JBoss Fuse Fabric

Procedure 1.2. Install the SwitchYard/BRMS Integration Pack on JBoss Fuse Fabric

The integration SwitchYard/BRMS pack must be installed on an instance of JBoss Fuse on Karaf. Make sure that the server is stopped.
  1. Download fuse-integration-karaf-distro-1.3.0.redhat-002.zip and unpack the .zip files on to JBoss Fuse on Karaf.
  2. Add a new management user.
    fabric:create --wait-for-provisioning --new-user admin --new-user-password admin
  3. Start JBoss Fuse.
  4. Create a new fabric profile for integration pack.
    fabric:profile-create --parent jboss-fuse-full jboss-fuse-full-ip
  5. Modify the list of Maven repositories in the io.fabric8.agent properties PID.
    fabric:profile-edit --append --pid io.fabric8.agent/org.ops4j.pax.url.mvn.repositories=http://download.lab.bos.redhat.com/brewroot/repos/jb-bxms-6.3-build/latest/maven@id=jb-bxms-6.3-build default
  6. Edit the Integration pack fabric profile to add repository url.
    fabric:profile-edit --repository mvn:org.drools/drools-karaf-features/6.4.0.Beta2-redhat-1/xml/features jboss-fuse-full-ip
    fabric:profile-edit --repository mvn:org.jboss.integration.fuse.quickstarts/karaf-features/1.4.0.redhat-001/xml/features jboss-fuse-full-ip
    fabric:profile-edit --repository mvn:org.switchyard.karaf/switchyard/2.0.1.redhat-621107/xml/core-features jboss-fuse-full-ip
    
    Install the quickstart features by entering the following command and replacing feature-name with the feature name one at a time.
    features:install feature-name
    For example, install the switchyard rules quickstart feature.
    fabric:profile-edit --feature fuse-bxms-switchyard-quickstart-rules-camel-cbr jboss-fuse-full-ip

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.2.1.redhat-084 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.

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:

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. Download the Offline Repository

A Maven repository that contains the artifacts required for the Integration Pack is available for download. It is an optional download and is provided for use of an offline Maven repository.
Note
This repository is useful only if you are using offline Maven repositories.
To use an offline Maven repository:
  1. Select the Fuse version you are using. This displays the downloads for that Fuse version.
  2. Select the offline Maven repository that meets your needs.
  3. Click Download.
  4. Unpack the downloaded zip file into an accessible location.
  5. 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.2.1/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>

Legal Notice

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.