Chapter 4. Enabling executable rule models when upgrading to Red Hat Process Automation Manager 7.8

Beginning in Red Hat Process Automation Manager 7.8, rule assets are built from executable rule models by default with the standard kie-maven-plugin plugin. The executable model is a more efficient alternative to the standard asset packaging in previous versions of Red Hat Process Automation Manager.

When you install Red Hat Process Automation Manager 7.8, this default executable model behavior is configured for all new projects that you create going forward. However, if you are upgrading to Red Hat Process Automation Manager 7.8 from a previous version of the product and you have not already enabled executable rule models, you must add the required dependency to your existing Red Hat Process Automation Manager projects so that your rule assets are built from executable models in Red Hat Process Automation Manager 7.8. If you do not use the kie-maven-plugin plugin or if the required drools-model-compiler dependency is missing from your project, then rule assets are built without executable models.

For more information about executable rule models, see Packaging and deploying a Red Hat Process Automation Manager project.

Procedure

In the pom.xml file of your Maven project or on the relevant class path of your Java project, add the following dependency to enable rule assets to be built from the default executable model:

<dependency>
  <groupId>org.drools</groupId>
  <artifactId>drools-model-compiler</artifactId>
  <version>${rhpam.version}</version>
</dependency>

This dependency compiles the executable model into Red Hat Process Automation Manager internal data structures so that it can be executed by the decision engine.

The <version> is the Maven artifact version for Red Hat Process Automation Manager currently used in your project (for example, 7.39.0.Final-redhat-00005).

Note

Instead of specifying a Red Hat Process Automation Manager <version> for individual dependencies, consider adding the Red Hat Business Automation bill of materials (BOM) dependency to your project pom.xml file. The Red Hat Business Automation BOM applies to both Red Hat Decision Manager and Red Hat Process Automation Manager. When you add the BOM files, the correct versions of transitive dependencies from the provided Maven repositories are included in the project.

Example BOM dependency:

<dependency>
  <groupId>com.redhat.ba</groupId>
  <artifactId>ba-platform-bom</artifactId>
  <version>7.8.0.redhat-00005</version>
  <scope>import</scope>
  <type>pom</type>
</dependency>

For more information about the Red Hat Business Automation BOM, see What is the mapping between RHPAM product and maven library version?.