Red Hat Training

A Red Hat training course is available for Red Hat Decision Manager

Chapter 4. Installing the Red Hat Business Optimizer engine in your application

Red Hat Business Optimizer can be installed using Maven or other applications, such as Gradle, Ivy, or Buildr.

Prerequisite

The Red Hat Decision Manager has been downloaded and installed from the Red Hat Customer Portal. See Getting started with decision services for more information about installing Red Hat Decision Manager.

Procedure

  1. Get the Red Hat Business Optimizer optaplanner-core JARs at the Red Hat JBoss Maven Repository.
  2. Identify the latest version by checking the Red Hat JBoss Maven Repository.
  3. Add a dependency to optaplanner-core in your project’s pom.xml:

      <dependency>
          <groupId>org.optaplanner</groupId>
          <artifactId>optaplanner-core</artifactId>
          <version>{MAVEN_ARTIFACT_VERSION}</version>
      </dependency>
  4. (Optional) Add any other Red Hat Business Optimizer engine modules that you require, such as the optaplanner-persistence-jpa or optaplanner-persistence-xstream integration modules. For more information about how to configure Red Hat Business Optimizer for use with other Java technologies, see the Optaplanner documentation.
Note

The optaplanner-benchmark module is included as part of the engine, however, it is recommended to be used as a separate module, as demonstrated in the this Employee Rostering module. This is to avoid leaking the optaplanner-benchmark into the .war file.

Alternatively, if you are using Ant (without Ivy) you can install the engine by copying all of the JARs from the downloaded ZIP’s binaries directory. Manually verify that your classpath does not contain duplicate JARs.

Note

The downloaded .zip file binaries directory contains far more JARs then optaplanner-core actually uses. It also contains the JARs used by other modules, such as optaplanner-benchmark.

Check the Maven repository pom.xml files to determine the minimal dependency set for a specific version of a specific module.