1. What is drools.
Drools is a Java-language based rule engine framework. Solves the problem that the complex business logic in the business system is hard coded into the program code. The advent of drools can separate business logic from program code, and can also change business logic in real time. Support the rule implementation of simple scripting language,
Kie-server is a stand-alone execution server that can be used to remotely execute rules using the REST,JMS or Java interface. In the case of Workbench installation, to install Kie-server,workbench installation method see younger brother Blog
First, the installation environment
1.windows operating System (for example, Linux is similar to Windows here)
2.tomcat8
3.jdk1.8
Second, installation steps
1. Download good tomcat and install the JDK, from the drools
The blog about Drools 6.0 has been written for a long time. On the one hand is recently more rambling, although also learned not to click on the open link less new things, but are not willing to record down; on the other hand, drools itself is more cumbersome, even if the introduction also needs to involve a lot of internal things, more write more feel the power is insufficient. This is the third time that
before entering this question, let's look at Drools:
in many industry applications such as banking, insurance, business rules are often very complex and rules are constantly evolving, and many of the existing system practices are essentially binding business rules to program code.
the main problems are as follows:
1) When the business rules change, the corresponding code will have to change, every time even small changes need to go through the develo
The instance is transferred from: http://blog.csdn.net/quzishen/article/details/6163012
Easy to understand application Example 1:
Now we are simulating an application scenario: a site that is associated with a business-generated point issuance operation. such as Alipay credit card repayment bonus points.
Issuance points may be accompanied by different operating strategies and seasonal adjustments, the number and rules of issuance are completely different, if the use of hard-coded to accompan
Tags: Different version number of BSP down Open Blog folder https droolsThe demo here is drools7.5.0, you can install different drools versions according to your needsDrools Installation Address:http://download.jboss.org/drools/release/OneSecond, click to enter 7.6.0.Final, and select Droolsjbpm-tools-distribution-xxx.zip (XXX for version number) to downloadThird, unzip the downloaded plugin to the localLau
Ilog jrules
Today, we have compared these three representative Rule Engine rule languages. Among them, ilog is a commercial product and has no chance to practice it.
Author: Jiangnan Baiyi1. The same if-then sentence and Rete Engine
All three will solve the chaotic if --- else --- elseif ---- else mystery,Split it into the sentence format of "If condition statement then execution statement" with N strip priority.The three mainly use the foreward-chaining rete engine to execute the rule Statement
Problem Description:1, Xiao Ming Hand has 50 yuan money;2, 1 yuan money can buy a bottle of drink;3, 2 empty bottles can be exchanged for a bottle of drink;4. The question is: how many bottles of drink can Xiao Ming drink at last?First, create a new MAVEN project and join the drools dependencyPackage Com.lala.bean;public class Drinks {private integer money;private integer total = 0;//drink quantity private integer bottle = 0; Number of empty bottles p
1, the basic matching rules
1.1 Variables
Drools uses the matching method to compare the fact,
such as Java code account:account (Balance > 100)
The meaning of this rule is to find all account instances with the type account in fact and the balance property value greater than 100.
You can specify a variable to describe a type or a property that maps a class.
For example, Java code $account: Account ($type: type)
Use $variable to define a variable, whe
1.1. ConditionsDrools It is a Java open-source rule engine. Therefore, using drools and pre-installed in the development machine JDK perimeter, Drools5.5 requires a JDK version number of 1.5 or more.1.2. Development environment ConstructionThe first step in most software learning is to build the development environment for the software, and Drools is no exception.This section describes how to build a Drools
1.1. Pre-conditionsDrools is a Java-based open source rule engine, so you need to install the JDK environment on your development machine before using drools, DROOLS5 requires a JDK version of 1.5 or more.1.2. Development environment ConstructionThe first step in most software learning is to build the development environment for the software, and Drools is no exception. This section describes how to build a
①: First of all, please open the link http://download.jboss.org/drools/release/5.5.0.Final/Two files in a red box in the Download box650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/6C/wKiom1YctYGCyPZbAAKx5PZo2_I348.jpg "title=" Untitled. png "alt=" wkiom1yctygcypzbaakx5pzo2_i348.jpg "style=" float:left; "/>②: Unzip it separately as shown650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/6C/wKiom1YctrvTR1OkAADpA2wD6Fw740.jpg "t
Little brother here to talk about his drools in combat in the end how to use the view:
First, if the rules are written by developers, such as programming DRL files, in this case, you can play the rules into a jar package, deployed to Workbench, or kie-server;
Second, if the rules are configurable, so that the business staff to configure, do not require the participation of developers, you can save the rules in the form of a string to the database;
The rule engine is applicable to complex and variable rules, such as product full reduction, bonus points, and attendance rules.
1. Introduce Maven dependency
2. drools can be executed in two ways. The first is based on the kmodule. xml and DRL configuration files, and the second is the dynamic read Rule.
Kmodule-based
1) create a fact. The fact in drools is a common bean in Java and is used to pass par
Plugin:http://download.jboss.org/drools/release/1, open the corresponding version of the file, select the Red two compressed package download, other if necessary, you can choose:2, will download the compressed package decompression, this side put in the E:\tools\drools directory, open eclipse,help->install New software->add, select e:/tools/drools/ droolsjbpm-to
1. Download the following two zip packages from the official website. Http://www.drools.org/download/download.html
Drools-distribution-6.2.0.final.zip
Droolsjbpm-tools-distribution-6.2.0.final.zip
2. Install Eclipse Plugin
1. Unzip the Droolsjbpm-tools-distribution-6.2.0.final.zip
2. Create the folder Drools under the Dropins package in the installation directory of Eclipse, Droolsjbpm-tools-distribu
Introduction: Using the Rules engine can reduce the maintenance and scalability costs of applications by reducing the complexity of components that implement complex business logic. This updated article shows how to use the open source Drools rule engine to make Java™ applications more adaptable to change. The Drools project introduces a new local rule expression language and an Eclipse plug-in that makes
DroolsJBoss rules is an open-source business rule engine that is easy to access enterprise policies, easy to adjust, and easy to manage. It complies with industry standards and is fast and efficient. Business analysts or reviewers can use it to easily view business rules, so as to check whether the encoded rules have executed the required business rules.
The predecessor of JBoss rules is a codehaus open-source project called drools. Recently added to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.