Download - JEEConf JBoss Drools
JBoss Drools
Who am I?
● Victor Polischuk● A man with a terrible character.● Java architect, team leader and coach.● 10+ years of software development experience.● 8+ years of Java experience.● 2+ years of Drools usage.● Employed at Infopulse
To the Point
Business Flow
Examples: Accounting
Salary
Taxes
CashAid
Laws
FeesIncome
Examples: Sales
Warehouse
Order
Terms
VIP
Destination
Examples: Insurance
AccidentHistory
FeeAttributes
CaseStatistics
Payment
VIP
Vogue
Sudden Change Request?
Sudden Change Request?
What Next?
Level 10
if (…) {if (…) {
if (…) {…}if (…) {…} else {...}
} else if (…) {if (…) {…} else {...}
} else {throw new Exception(...);
}} else if (…) {
if (…) {if (…) {…}
} else {if (…) {…}
}if (…) {
if (…) {…} else {...}} else {
if (…) {…}}
} else {if (…) {…} else {...}
}
Level 40
Rule
Context
RuleConfig
RuleRunner
Data
Level 80
Production Rule System
Rule
WorkingMemory
KnowledgeBase
RuleEngine
Facts
Expert System
Rule
Rule
Rule
Rule
1Decision Block
Decision Block
Decision Block
Decision Block
Result
Assumptions
Time Redundancy
Structural Similarity
Rete Algorithm
Dr Charles L. Forgy
1974, 1979, 1982
JBoss Drools
http://www.jboss.org/drools/team.html
Drools Guvnor
Drools Flow
Drools Expert
Drools Fusion
Drools Planner Drools Grid
LHS? RHS?
Left Hand Side Right Hand Side
LHS? RHS?
Left Hand Side Right Hand Side
IF THEN
LHS? RHS?
Left Hand Side Right Hand Side
IF
WHEN
THEN
THEN
Rule Structure
rule “<unique name>”
[<rule attributes (grouping, priority, etc)>]
when
then
[<LHS (can be zero or more conditions)>]
[<RHS (can be zero or more commands)>]
end
Demo
Links
● https://github.com/victor-cr/jeeconfua-drools-example
● https://github.com/victor-cr/uadev-drools-example
● http://www.jboss.org/drools/documentation