此内容没有您所选择的语言版本。
Chapter 2. New features
This section highlights new features in Red Hat Decision Manager 7.2.
2.1. Container support 复制链接链接已复制到粘贴板!
You can install Red Hat Decision Manager on Red Hat JBoss Web Server 5.0.1 or later.
You can install Red Hat Decision Manager on Red Hat JBoss EAP 7.2.
Red Hat JBoss EAP 7.1 is not supported with Red Hat Decision Manager 7.2.
2.2. Business application generator 复制链接链接已复制到粘贴板!
You can use the http://start.jbpm.org website to generate a Red Hat Decision Manager business application based on Spring Boot starters. After you create and configure your business application, you can deploy it to an existing service or to the cloud, through OpenShift.
2.3. Decision Central 复制链接链接已复制到粘贴板!
2.3.1. Experimental properties administration page 复制链接链接已复制到粘贴板!
Decision Central now includes an experimental features administration page which is disabled and hidden by default. When enabled, this page displays a list of some experimental features that are in technology preview. You can enable or disable individual features from this page. To enable the experimental features administration page, set the value of the appformer.experimental.features property to true.
Some experimental features are enabled by default and might not be listed on the experimental properties administration page.
2.3.2. Support for SSH Keystore 复制链接链接已复制到粘贴板!
Red Hat Decision Manager uses the SSH protocol for user authentication. It now has a configurable default SSH keystore (where you can register multiple public keys), extensible APIs (for custom implementations), and support for multiple SSH public keys formats.
For more information about SSH keystore, see Configuring Decision Central settings and properties.
2.4. Decision engine 复制链接链接已复制到粘贴板!
2.4.1. Rule units 复制链接链接已复制到粘贴板!
Red Hat Decision Manager 7.2 now supports rule units that you can use to partition a rule set into smaller units, bind different data sources to those units, and then execute the individual unit. A rule unit consists of data sources, global variables, and rules.
You can define a rule unit by implementing the RuleUnit interface as shown in the following example:
Example rule unit class
package org.mypackage.myunit;
public static class AdultUnit implements RuleUnit {
private int adultAge;
private DataSource<Person> persons;
public AdultUnit( ) { }
public AdultUnit( DataSource<Person> persons, int age ) {
this.persons = persons;
this.age = age;
}
// A DataSource of Persons in this rule unit
public DataSource<Person> getPersons() {
return persons;
}
// A global variable valid in this rule unit
public int getAdultAge() {
return adultAge;
}
// --- life cycle methods
@Override
public void onStart() {
System.out.println("AdultUnit started.");
}
@Override
public void onEnd() {
System.out.println("AdultUnit ended.");
}
}
For more information about rule units, see the Drools Documentation.
2.4.2. Multithreaded evaluation in the decision engine 复制链接链接已复制到粘贴板!
In Red Hat Decision Manager 7.2, the decision engine can now evaluate more business rules in parallel by dividing the RETE and PHREAK pattern-matching algorithms in independent partitions and evaluating them in parallel.
Multithreaded evaluation is disabled by default in Red Hat Decision Manager. To enable multithreaded evaluation for a parallel KIE base, use one of the following options:
Enable multithreaded evaluation with
KieBaseConfiguration:KieServices ks = KieServices.Factory.get(); KieBaseConfiguration kieBaseConf = ks.newKieBaseConfiguration(); kieBaseConf.setOption(MultithreadEvaluationOption.YES); KieBase kieBase = kieContainer.newKieBase(kieBaseConf);Enable the multithreaded evaluation system property:
drools.multithreadEvaluation = true
Rules using queries, salience, or agenda groups are currently not supported by the parallel decision engine. If these rule elements are present in the KIE base, the compiler emits a warning and automatically switches back to single-threaded evaluation. However, in some cases, the decision engine might not detect the unsupported rule elements and rules might be evaluated incorrectly. For example, the decision engine might not detect when rules rely on implicit salience given by rule ordering inside the DRL file, resulting in incorrect evaluation due to the unsupported salience attribute.
In Red Hat Decision Manager 7.2, you can now declaratively set one or more calendars on a KIE session through the kmodule.xml configuration file, as shown in the following example:
<ksession name="KSession1">
<calendars>
<calendar name="monday" type="org.domain.Monday"/>
</calendars>
</ksession>
The type is the name of the class that implements the org.kie.api.time.Calendar interface.
2.5. Decision Server 复制链接链接已复制到粘贴板!
Red Hat Decision Manager 7.2 provides a Swagger web interface for the Decision Manager controller REST API. You can use this Swagger interface instead of a standalone REST client or curl utility to interact with your Decision Server templates (configurations), Decision Server instances (remote servers), and associated KIE containers (deployment units) in Red Hat Decision Manager.
To access the Swagger interface for the Decision Manager controller REST API, you can either start Decision Central, which contains a built-in Decision Manager controller, or run the headless Decision Manager controller application and navigate to http://SERVER:PORT/CONTROLLER/docs in a web browser.
Example Swagger URLs:
-
http://localhost:8080/decision-central/docs(for a Decision Manager controller in Decision Central) -
http://localhost:8080/my-controller/docs(for a headless Decision Manager controller)
For more information about the Decision Manager controller REST API, see Interacting with Red Hat Decision Manager using KIE APIs.
2.5.2. Decision Model and Notation (DMN) models 复制链接链接已复制到粘贴板!
Red Hat Decision Manager 7.2 provides both design and runtime support for DMN 1.2 models at conformance level 3, and includes enhancements and fixes to FEEL and DMN model components to optimize the experience of implementing DMN decision services with Red Hat Decision Manager. You can design your DMN models directly in Decision Central or import existing DMN models into your Red Hat Decision Manager projects for deployment and execution.
The DMN designer in Red Hat Decision Manager 7.2 is a Technology Preview feature and is disabled by default in Decision Central. To enable the DMN designer preview in Decision Central, in the upper-right corner of the window, click Settings
For more information about DMN support in Red Hat Decision Manager 7.2, see Designing a decision service using DMN models.
In Red Hat Decision Manager 7.2, you can now use the kie-maven-plugin build component to generate DMN executable model classes and compile them in a Red Hat Decision Manager project (KJAR file). DMN executable model classes are similar to executable rule models used for rule assets. This support enables DMN decision table logic in DMN projects to be evaluated more efficiently.
To enable executable models in DMN projects, add the required kie-dmn-core dependency in the pom.xml file:
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-dmn-core</artifactId>
<scope>provided</scope>
</dependency>
To build a DMN project with DMN model compilation enabled, navigate to your Maven project directory in a command terminal and run the following command:
mvn clean install -DgenerateDMNModel=YES
Alternatively, you can define the DMN model property directly in the pom.xml file:
<project>
...
<properties>
<generateDMNModel>YES</generateDMNModel>
</properties>
...
</project>
For more information about configuring executable models for your Maven or Java project, see Packaging and deploying a Red Hat Decision Manager project.
2.5.4. Deactivation of KIE containers on Decision Server 复制链接链接已复制到粘贴板!
You can now deactivate KIE containers on Decision Server. This enables you to stop the creation of new process instances from a specified container while enabling you to continue working on existing process instances and tasks. The deactivated container can be activated again. This feature does not require server restarts.
2.5.5. Decision Server support for rendering forms 复制链接链接已复制到粘贴板!
New Decision Server support for rendering forms enables you to interact with the Decision Server to perform the following operations:
- Render process forms: Used to start new instances
- Render case forms: Used to start new case instances, including data and role assignments
- Render user task forms: Used to interact with user tasks, including life cycle operations
Rendered forms include buttons that perform all operations based on context. For example, if a user task is in the progress state, you can use the Stop, Release, Save, and Complete buttons to interact with the process.
2.6. Red Hat Business Optimizer 复制链接链接已复制到粘贴板!
2.6.1. Defining weights for constraints 复制链接链接已复制到粘贴板!
In Red Hat Business Optimizer, you can now define weights for constraints inside a class marked with the @ConstraintsConfiguration annotation. You can assign weights to constraints by the Java or DRL name of the constraint, without needing to modify the code of the constraints.
2.7. OpenShift 复制链接链接已复制到粘贴板!
2.7.1. LDAP role mapping on OpenShift deployments 复制链接链接已复制到粘贴板!
When deploying Red Hat Decision Manager on Red Hat OpenShift Container Platform, you can now configure LDAP role mapping.
2.7.2. KJAR services in immutable OpenShift deployments 复制链接链接已复制到粘贴板!
When deploying Red Hat Decision Manager on Red Hat OpenShift Container Platform in an immutable deployment, you can now create Decision Servers that run services from KJAR files, not from source.
2.7.3. CORS support in trial deployment on OpenShift 复制链接链接已复制到粘贴板!
In a trial deployment on Red Hat OpenShift Container Platform, you can use client-side JavaScript applications, served from a different domain, to access a Decision Server.