此内容没有您所选择的语言版本。
Chapter 4. Other migration considerations
Red Hat Decision Manager 7.1 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 Decision Manager 7.1, review these changes and address any inconsistencies or errors in your projects that arise.
Red Hat Business Optimizer is an embeddable planning engine in Red Hat Decision 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.11, inclusive, is relevant for upgrading from Red Hat JBoss BRMS 6.4 to Red Hat Decision Manager 7.1.
In Red Hat Decision Manager 7.1, certain Red Hat Business Optimizer configurations in Decision Central must be updated to accommodate recent OptaPlanner changes.
If you have any solver configuration assets (.solver.xml
files) or solution-related data objects in Decision Central, you must make certain updates to these assets in Red Hat Decision Manager 7.1 to accommodate recent Red Hat Business Optimizer changes.
Prerequisite
Decision Central data has been migrated from Red Hat JBoss BRMS 6.4 to Red Hat Decision Manager 7.1. For migration instructions, see Chapter 2, Decision Central data migration.
Procedure
- Log in to Decision Central for Red Hat Decision Manager 7.1.
-
In Decision Central, go to Menu
Design Projects and select the project name. -
Open any solver configuration asset (
.solver.xml
file), if present. - 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 Decision Manager 7.1. Do this step with any other solver configuration assets.
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.
- 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 Decision Manager 7.1.
- 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).
- 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 Decision Manager 7.1.
- Click Save in the data objects designer and make the same changes to any other data objects configured as a Planning Solution.
4.2. API changes in Red Hat Decision Manager 7.1 复制链接链接已复制到粘贴板!
Many of the API changes from Red Hat JBoss BRMS 6.4 to Red Hat Decision Manager 7.1 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.
API | Description | Changed classes |
---|---|---|
Drools core
( | The decision engine |
|
KIE API
( | The main API for all projects from KIE Group |
|
KIE server API
( | The general Decision Server API |
|
KIE server client API
( | The API for Decision Server client |
|
KIE server controller API
( | The API for the Decision Manager controller |
|
KIE server controller REST API
( | The REST API for Decision Manager controller |
|
4.3. Logic changes in Red Hat Decision Manager 7.1 复制链接链接已复制到粘贴板!
Note the following logic changes in Red Hat Decision Manager 7.1:
In Red Hat JBoss BRMS 6.4, 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 Decision Manager 7.1 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 ofdouble
:Long(...) from accumulate(..., sum($p.getLongWeight()))
Long(...) from accumulate(..., sum($p.getLongWeight()))
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the rules in your Red Hat JBoss BRMS 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 BRMS 6.4, but will return the data type of the input values in Red Hat Decision Manager 7.1.
-
When no fact matches the accumulate pattern,
min
andmax
accumulate functions in Red Hat Decision Manager 7.1 do not return+/-Integer.MAX_VALUE
, but returnnull
. Therefore, unlike in Red Hat JBoss BRMS 6.4, the accumulate in the rule is not matched and the rule does not fire in Red Hat Decision Manager 7.1. -
Business processes that contain business rule tasks with an
implementation=Java
configuration will not be compiled in Red Hat Decision Manager 7.1 due to stricter validation requirements. To resolve compilation errors related to this restriction, set the implementation configuration toimplementation=##unspecified
or remove theimplementation
attribute.