Red Hat Training

A Red Hat training course is available for Red Hat Process Automation Manager

Chapter 6. Other migration considerations

Red Hat Process Automation Manager 7.0 contains changes to APIs, rule logic, and Red Hat Business Optimizer features that you should note during your migration. These changes are generally backward compatible between product versions, but in some cases, migration effort is required to resolve build or migration errors.

As part of your migration to Red Hat Process Automation Manager 7.0, review these changes and address any inconsistencies or errors in your projects that arise.

6.1. Red Hat Business Optimizer changes in Red Hat Process Automation Manager 7.0

Red Hat Business Optimizer is an embeddable planning engine in Red Hat Process Automation Manager that optimizes planning problems. Red Hat Business Optimizer is based on the community OptaPlanner project that is regularly updated and in some cases requires code changes for the latest Red Hat Business Optimizer features. For an overview of the latest OptaPlanner changes and migration requirements, see the OptaPlanner upgrade recipe archive. OptaPlanner upgrade information for versions 7.0 through 7.7, inclusive, is relevant for upgrading from Red Hat JBoss BPM Suite 6.4 to Red Hat Process Automation Manager 7.0.

In Red Hat Process Automation Manager 7.0, certain Red Hat Business Optimizer configurations in Business Central must be updated to accommodate recent OptaPlanner changes.

6.1.1. Updating Red Hat Business Optimizer asset configurations in Business Central

If you have any solver configuration assets (.solver.xml files) or solution-related data objects in Business Central, you must make certain updates to these assets in Red Hat Process Automation Manager 7.0 to accommodate recent Red Hat Business Optimizer changes.

Prerequisite

Business Central data has been migrated from Red Hat JBoss BPM Suite 6.4 to Red Hat Process Automation Manager 7.0. For example, see Chapter 3, Migrating Business Central as design environment only.

Procedure

  1. Log in to Business Central for Red Hat Process Automation Manager 7.0.
  2. Go to MenuDesignProjects and select the project name.
  3. Open any solver configuration asset (.solver.xml file), if present.
  4. In the solver configuration designer, click Save without making any changes. This step is required to generate the new code for solver configuration assets in Red Hat Process Automation Manager 7.0. Do this step with any other solver configuration assets.
  5. Under Data Objects in the Project Explorer (left menu), open any data object (.java file) configured as a Planning Solution, if applicable.

    To verify if this setting is selected for this data object, click the OptaPlanner icon on the right side of the data objects designer. If Planning Solution is not selected, then this procedure does not apply.

  6. Under general properties in the data objects designer, set the Superclass drop-down option to Nothing selected. This setting is no longer required by Red Hat Business Optimizer in Red Hat Process Automation Manager 7.0.
  7. On the right side of the data objects designer, click the OptaPlanner icon to reveal the Planner Settings. The Planning Solution option should be selected (if not, then this procedure does not apply).
  8. Select No selected, then re-select Planning Solution and specify the Solution Score Type. This step is required to generate the new code for planning solutions in Red Hat Process Automation Manager 7.0.
  9. Click Save in the data objects designer and make the same changes to any other data objects configured as a Planning Solution.

6.2. API changes in Red Hat Process Automation Manager 7.0

Many of the API changes from Red Hat JBoss BPM Suite 6.4 to Red Hat Process Automation Manager 7.0 are backward compatible and do not affect migration. However, the following table lists class changes in APIs that may not be compatible in all cases.

If you encounter build or migration errors related to these changes, review the full List of API changes in the Red Hat Customer Portal and update your code as needed.

Table 6.1. API changes in Red Hat Process Automation Manager 7.0 (abbreviated)

APIDescriptionChanged classes

Drools core

(drools-core)

The process engine

  • org.drools.core.command.*
  • org.drools.core.common.*

KIE API

(kie-api)

The main API for all projects from KIE Group

  • org.kie.api.task.*
  • org.kie.api.executor.*
  • org.kie.api.concurrent.*
  • org.kie.api.builder.*
  • org.kie.api.command.*
  • org.kie.api.runtime.*

KIE server API

(kie-server-api)

The general Process Server API

  • org.kie.server.api.commands.*
  • org.kie.server.api.marshalling.*
  • org.kie.server.api.model.*
  • org.kie.server.api.rest.RestURI (constants have slightly changed, omitting leading /)

KIE server client API

(kie-server-client)

The API for Process Server client

  • org.kie.server.client.SolverServicesClient
  • org.kie.server.client.UIServicesClient
  • org.kie.server.client.admin.ProcessAdminServicesClient
  • org.kie.server.client.ProcessServicesClient
  • org.kie.server.client.QueryServicesClient
  • org.kie.server.client.JobServicesClient
  • org.kie.server.client.UserTaskServicesClient
  • org.kie.server.client.KieServicesClient
  • org.kie.server.client.KieServicesConfiguration

KIE server controller API

(kie-server-controller-api)

The API for the headless Process Automation Manager controller

  • org.kie.server.controller.api.service.*

KIE server controller REST API

(kie-server-controller-rest)

The REST API for headless Process Automation Manager controller

  • org.kie.server.controller.rest.RestSpecManagementServiceImpl
  • org.kie.server.controller.rest.RestKieServerControllerImpl

6.3. Logic changes in Red Hat Process Automation Manager 7.0

Note the following logic changes in Red Hat Process Automation Manager 7.0:

  • In Red Hat JBoss BPM Suite, when a rule executes the sum function in an accumulate pattern, the result always returns as a double data type regardless of the data type of the inputs. Red Hat Process Automation Manager 7.0 preserves the data type of the inputs on which the sum is executed. This enhancement provides a more accurate result from the sum function. In the following example, the result type of the accumulate function is Long instead of double:

    Long(...) from accumulate(..., sum($p.getLongWeight()))

    If the rules in your Red Hat JBoss BPM Suite 6.4 project include the sum function in an accumulate pattern, search for these functions and review them. These functions return a double data type in Red Hat JBoss BPM Suite 6.4, but will return the data type of the input values in Red Hat Process Automation Manager 7.0.

  • When no fact matches the accumulate pattern, min and max accumulate functions in Red Hat Process Automation Manager 7.0 do not return +/-Integer.MAX_VALUE, but return null. Therefore, unlike in Red Hat JBoss BPM Suite 6.4, the accumulate in the rule is not matched and the rule does not fire in Red Hat Process Automation Manager 7.0.
  • Business processes that contain business rule tasks with an implementation=Java configuration will not be compiled in Red Hat Process Automation Manager 7.0 due to stricter validation requirements. To resolve compilation errors related to this restriction, set the implementation configuration to implementation=##unspecified or remove the implementation attribute.