@@ -56,7 +56,7 @@ Back to our example of a simple purchasing system: some business Rules should be
56
56
calculate the final price, probably calculating the tax first, and then the discount. If both the tax and
57
57
discount are known, we can show the price.
58
58
59
- Let's specify some Rules (in psuedocode ).
59
+ Let's specify some Rules (in pseudocode ).
60
60
61
61
``` text
62
62
Rule 1
@@ -114,8 +114,8 @@ Rule 7
114
114
with given Tax and Discount
115
115
```
116
116
117
- If you examine the above Rules, you should easily understand the of ** Rule** concept for Rule Engines.
118
- These collection of rules will form a set of ** Knowledge** . In this case, they form a Knowledge set of
117
+ If you examine the above Rules, you should easily understand the ** Rule** concept for Rule Engines.
118
+ These collections of rules will form a set of ** Knowledge** . In this case, they form a Knowledge set of
119
119
** "how to calculate Item's final price"** .
120
120
121
121
## Cycle
@@ -133,8 +133,8 @@ That depends on the contents of the conflict set:
133
133
* If there are multiple Rules in the Conflict Set, the engine must apply a strategy to prioritize one Rule and execute its action.
134
134
135
135
If an action gets executed, the cycle repeats again, as long as there's an action that needs execution.
136
- When no more actions get executed, this indicates that there are no more Rules that are statisfied
137
- by the fact (no more matching ** IF** statements), and the cycle stops, letting the Rule engine finish evalutation .
136
+ When no more actions get executed, this indicates that there are no more Rules that are satisfied
137
+ by the fact (no more matching ** IF** statements), and the cycle stops, letting the Rule engine finish evaluation .
138
138
139
139
The pseudocode for this conflict resolution strategy is depicted below:
140
140
@@ -172,11 +172,11 @@ an error will be returned.
172
172
173
173
As explained above, the Rule engine will evaluate all Rules' requirements and add
174
174
them into a list of conflicting Rules called the ** Conflict Set** . If only one Rule is
175
- inside the list, it means that are no Rule(s) conflicting with that noe Rule. The engine
175
+ inside the list, it means that there are no Rule(s) conflicting with that one Rule. The engine
176
176
will immediately execute the Rule's action.
177
177
178
- If there are multiple Rules inside the set, there maybe conflicts. There are many conflict resolution
179
- strategies that can be implemented for this type of Ruel conflict resolution. The easiest way to resolve
178
+ If there are multiple Rules inside the set, there may be conflicts. There are many conflict resolution
179
+ strategies that can be implemented for this type of Rule conflict resolution. The easiest way to resolve
180
180
is through specification of a Rule's ** salience** (also known as ** priority** or ** importance** ).
181
181
We can add an indicator of Rule ** salience** or importance into a Rule definition like in the pseudocode below:
182
182
0 commit comments