ObjectiveThere are few tutorials on the Kie DROOLS Workbench (JBoss BRMS) in the world, and there are only a few of them that have been translated using machines (the unintelligible ones) or some tutorials based on the old version of JBoss Guvnor or 5.x, and these tutorials are " Lack of arms and legs ", the beginner does not know what it is doing? Are you capable? Be able to solve any problems in your system.So I wrote a few examples myself, the enti
implementation, to realize the separation of technology and business, developer processing technology, business analysts define business rules, each do their own good things.Scenario: There is already a relatively mature open source product support, it is drools, we define business rules in database or brms (Management System), through the management of DB or brms to achieve dynamic change of business logic.When should you use the
interpreted using ANTLR, and groovy and Python itself are scripting languages that can be called directly.The clever thing about drools is that XML nodes are used to standardize the definition of if--then sentences and facts so that the engine is comfortable to work.Using native languages such as java,groovy to make judgments and execute statements makes it easy for programmers to transition and transplant, with low learning curve.
java:condition
>
little higher. You need to implement the conditons and consequence factory classes by yourself, and explain the XML section by yourself, basically, there is no convenient underlying support.As a matter of fact, it is better to simply define the real DSL using anlr, and to implement the conditons and consequence factory classes. It's only explained that XML is common to everyone, and anlr is rarely used.Room. getname (). Equals ("Calvin ")
Converttocelsius (room. gettemperature ()> 20
3.2 ilog'
Drools Rule LearningIn Drools, a standard rule file is a text file that ends with ". DrL" because it is aA standard text file, so you can open, view, and edit it with some Notepad tools. The rules are placed onRules file, a rule file can hold multiple rules, in addition, in
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
Jboss Rule Engine KIE Drools 6.3.0 Final tutorial (3)
The first two tutorials show you how to run the. drools file locally and use the stateless method to access the rules on remote repository. KIE Drools also provides a stateful-stateful access method.Running rules on a KIE-DROOLS
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
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. 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
Infoq published an introduction to the rule engine real-world rule engines, the original http://www.infoq.com/articles/Rule-Engines
There are also two articles on onjava:
Give your business logic a framework with drools http://www.onjava.com/lpt/a/6093
Using drools in your E
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
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:
Rule editor and Business Rule Editor
The origin of the Business Rule EditorThe so-called business rule editor is to write the rules above the business in a simple language, the written
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.