What problem / does the engine control algorithm solve?

What problem / s does the rule algorithm algorithm solve?
Which ones are recommended?

+5
source share
5 answers

A rule engine can encapsulate business logic, often declaratively. This avoids the need to create custom code business logic in software.

The rules engine algorithm is how the rules are negotiated and run, so this is a detail of the implementation, namely the actual solution to the problem itself. Algorithms can have different non-functional strengths or weaknesses. A common example of a rule engine algorithm is the Rete Algorithm , used in the Java JESS and Drools rule engines .

+6
source
  • The problem is too confusing for traditional code . The problem may not be difficult, but you cannot see the non-fragile way to create it.

  • , . , .

  • . ( ), . , "", .

  • ( -) , .

+1

( ) :

if (Condition A) {assert (Condition B)}
if (Condition C) {assert (Condition B)}
if (Condition B) {do something}

:

if (Condition A (X, Y)) {assert (Condition B (X)}
if (Condition C (X)) {assert (Condition B (X)}
if (Condition B (X)) {do something with X}

, . Rete .

, , , - . () , , , , .

, , , , - , .

+1

.

0

, .

, .

0

All Articles