当前位置: 首页 > 工具软件 > NxBRE > 使用案例 >

NxBRE 学习笔记1

公良信然
2023-12-01

英文原版:在压缩包\Docs文件夹里NxBRE-Documentation-3_1_0.pdf

NxBRE is the first1 open-source rule engine for the .NET platform and a lightweight Business Rules Engine (aka Rule-Based Engine) that offers two different approaches:

NXBRE是第一个基于.net的轻量开源商业级规则引擎(基于aka Rule-Based 引擎),它提供两种不同的方法途径:

• the Flow Engine, which uses XML as a way to control process flow for an application in an external entity. It is basically a wrapper on C#, as it offers all its flow control commands (if/then/else, while, foreach), plus a context of business objects and results. It started as a port of JxBRE v1.7.1 (from Sloan Seaman).
   1、流程引擎,就是程序的外部实体通过XML来控制进程流,他基本上是一个C#的封装,提供所有的流控制命令(if/then/else,while,foreach),在加上商业对象关系和规则。它发展自JxBre v1.7.1(form Sloan Seaman)。

• the Inference Engine, which is a forward-chaining (data driven) deduction engine and that supports concepts like Facts, Queries and Implications (as defined in RuleML Datalog) and like Rule Priority, Mutual Exclusion and Precondition (as found in many commercial engines). It is designed in a way that encourages the separation of roles between the expert who designs the business rules and the programmer who binds them to the business objects.

   2、推论引擎,就是一个演绎法(data driven)引擎,支持概念相似的论据,询问和暗示(定义在RuleML Datalog)、相似规则的优先级,互斥和预处理(建立在众多的商业引擎内).它的设计路线是鼓励在专家设计的商业规则与程序员建立的商业对象之间进行分离。
  
NxBRE's interest lies first into its simplicity, second in the possibility of easily extending its features by delegating to custom code in the Flow Engine or by writing custom RuleBase adapters or Business Objects binders in the Inference Engine.
 
NxBRE吸引的地方在于:首先,简单,第二,功能扩展性:在流程引擎中使用委托客户代码,在推论引擎中编写客户规则适配器或商业对象包

NxBRE can be really useful for projects that have to deal with:
• complex business rules that can not be expressed into one uniform structured manner but require the possibility to have free logical expressions,
• changing business rules that force recompilation if the new rules must meet unexpected requirements.

MXBRE 能有效使用在有下面所列情况的工程中:
1 复杂的商业规则不能在一个统一的结构组织中表示,而又需要尽可能的有一个灵活的逻辑表达。
2 变化的商业规则要强制被重新编辑,当这个新规则必须要适应意想不到的需求;


How to choose between the Flow and the Inference Engine?
怎么选择,流程引擎或者推论引擎?

To select between the Flow Engine and the Inference Engine, consider the following differences:
需要考虑两种引擎的区别;

• the Inference Engine supports priority, mutual exclusions and pre-conditions,
• the Inference Engine uses a "standard" rule format (RuleML),
• the Inference Engine has an elaborated memory model with support for isolated deduction space.

推论引擎支持 规则优先,互斥和预处理(预置条件);
推论引擎使用“标准”的规则格式(RuleML);
推论引擎拥有一个提供支持独立演绎的详尽内存模型

If any of these things is important for you, you can consider using the Inference Engine ;else stick to the Flow Engine.
如果这些都重要,你可以考虑使用推论引擎,否则,使用流程引擎。

Moreover, the Inference Engine is well suited for knowledge bases and expert systems where facts are important to keep and persist because they represent knowledge.
此外,推论引擎更适合于知识库或专家系统,因为在这样的系统中,facts必须被保持,因为它们表述知识

The Flow Engine is really an instantaneous traversal of logical branches using transient data for evaluations of boolean expressions: if you think in terms of “if, then else, while” then you surely want to go for the Flow Engine.

流程引擎 是即时的数据移动,通过使用数据的布尔表述的动态逻辑分支判断。如果您在“if, then else, while” 这些方面那么使用流程引擎。

 

 

 

 

转载于:https://www.cnblogs.com/august/archive/2008/05/10/1191336.html

 类似资料: