当前位置:网站首页>Drools 开发决策表
Drools 开发决策表
2022-07-24 05:00:00 【菜鸟-要努力】
Drools除了支持drl形式的文件外还支持xls格式的文件(即Excel文件)。这种xls格式的文件通常称为决策表(decision table) 。
决策表(decision table)是一个”精确而紧凑的”表示条件逻辑的方式,非常适合商业级别的规则。决策表与现有的drl文件可以无缝替换。Prools提供了相应的API可以将xls文件编译为drl格式的字符串。
举个例子:
决策表语法:
| 关键字 | 说明 | 是否必须 |
|---|---|---|
| RuleSet | 相当于drl文件中的package | 必须,只能有一个,如果没有设置RuleSet对应的值则使用默认rule_table |
| Sequential | 取值为Boolean类型。true表示规则按照表格自上到下的顺序执行,false表示乱序 | 可选 |
| Import | 相当于drl文件中的import,如果引入多个类则类之间用逗号分隔 | 可选 |
| Variables | 相当于drl文件中的global,用于定义全局变量,如果有多个全局变量则中间用逗号分隔 | 可选 |
| RuleTable | 它指示了后面将会有一批rule,RuleTable的名称将会作为以后生成rule的前缀 | 必须 |
| CONDITION | 规则条件关键字,相当于drl文件中的when。下面两行则表示 LHS 部分,第三行则为注释行,不计为规则部分,从第四行开始,每一行表示一条规则 | 每个规则表至少有一个 |
| ACTION | 规则结果关键字,相当于drl文件中的then | 每个规则表至少有一个 |
| NO-LOOP | 相当于drl文件中的no-loop | 可选 |
| AGENDA-GROUP | 相当于drl文件中的agenda-group | 可选 |
后面将会举列子~
边栏推荐
- How is it that desktop icons can't be dragged? Introduction to the solution to the phenomenon that desktop file icons can't be dragged
- Array force buckle (continuously updated)
- Nautilus 3.19.2 adds momentum to Gnome
- Threejs+shader drawing commonly used graphics
- [advanced mathematics] the difference between differentiable and differentiable functions
- Introduction to MapReduce
- OWA dynamic password SMS authentication scheme solves the problem of outlook email two factor authentication
- Chapter III encog workbench
- [JDBC] error exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.communicationsexception: communica
- MySQL transaction and its problems and isolation level
猜你喜欢

Zhaoyi innovation gd25wdxxk6 SPI nor flash product series comes out

The difference between run and start in thread class

An online accident, I suddenly realized the essence of asynchrony

Icml2022 | rock: causal reasoning principle on common sense causality

Middle aged crisis, workplace dad who dare not leave, how to face life's hesitation

Quick reference manual for the strongest collation of common regular expressions (glory Collection Edition)

greatest common divisor

Chiitoitsu(期望dp)

The second chapter is encog's data acquisition

Forward proxy, reverse proxy and XFF
随机推荐
How to get the signature file of Baidu Post Bar? Baidu Post Bar signature file setting and use method graphic introduction
Two methods of modifying configuration files in PHP
e D件系统 NFDavi化,对工程师达高
Pony activation tool appears cannot open file k:\oemsf solution
项目普遍格式问题 src下添加 .eslinctrc.js
Icml2022 | rock: causal reasoning principle on common sense causality
OWA dynamic password SMS authentication scheme solves the problem of outlook email two factor authentication
Kingbase v8r6 cluster installation and deployment case - script online one click capacity reduction
What programmer is still being grabbed by the company at the age of 35? Breaking the "middle-aged crisis" of programmers
The second chapter is encog's data acquisition
The x-fkgom supporting the GOM engine key.lic is authorized to start
Want to know how a C program is compiled—— Show you the compilation of the program
。单类型数字传感一个应用程.0。 Up- 开址在出厂
Journey of little black leetcode: 341. Flattening nested list iterator
后 SQL 时代降临:EdgeDB 2.0 发布会预告
Sort - quicksort
C language: generation of random numbers
The difference between statement and Preparedstatement and how to use placeholders
Leetcode 46 full arrangement
Technical team: improve team effectiveness, starting from never doing three things