The document discusses decision tables, including what they are, some theory behind them, and the Guvnor tool. It provides the following key points:
- Decision tables are a way to model complicated logic in a precise yet compact tabular format that is easily understood by humans.
- They consist of conditions, condition states, actions, action states, and rule identifiers.
- Different layouts include horizontal and vertical formats.
- Theory discusses expanded and contracted forms, different hit strategies, and how to validate and verify tables.
- Guvnor is a tool that provides a flexible authoring environment for decision tables and allows importing from Excel. It can automatically expand tables and check for completeness,
2. Agenda
What are they?
A little theory
Guvnor
Demo
2
3. What are they?
http://images.wellcome.ac.uk/indexplus/image/V0041734.html
3
4. What are they?
Simply a table
"Decision tables are a precise yet compact way to
model complicated logic." wikipedia
Easily understood by humans
Enable quick and easy analysis
4
5. What are they?
http://commons.wikimedia.org/wiki/File:Formal_Place_Setting_12_Course_Dinner.jpg
5
6. What are they?
Sections
Conditions
Condition states
stub
Actions
Action states
stub
Rule identifiers
6
11. A little theory
http://www.flickr.com/photos/ctbto/4926598654/in/photostream/
11
12. A little theory
Expanded form
Guarantee of completeness
Rule for every combination of conditions
The number of columns should equal the product of the
number of states for every condition.
12
13. A little theory
http://www.flickr.com/photos/marcovdz/4520986339/in/photostream/
13
14. A little theory
Contracted form
Contraction is the first optimization
Stage 1 – impossible matches
Stage 2 – merge condition states
14
17. A little theory
http://www.flickr.com/photos/worldseriesboxing/6334574625/sizes/z/in/photostream/
17
18. A little theory
Multiple, all hits
Given a 35 year old with 15 years service
1. Rule 1 matches, giving 22 days
2. Rule 5 matches, giving an additional 3 days
3. A total of 25 days is assigned
Supported by default in Drools
18
19. A little theory
Multiple, first hit
Given a 35 year old with 15 years service
1. Rule 4 matches, giving 25 days
2. Rule 6 would match but Rule 4 was the first hit
Can be emulated with Drools using Control Facts
19
20. A little theory
Single hit
Given a 35 year old with 15 years service
1. Rule 3 matches, giving 25 days
2. No other rules match
20
21. A little theory
http://www.flickr.com/photos/kmakice/4713798045/sizes/m/in/photostream/
21
22. A little theory
Validation and verification
Completeness
Redundancy
Conflict
Deficiency
22