Your SlideShare is downloading. ×
0
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
2011-03-29 London - Decision tables in depth (Michael Anstis)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

2011-03-29 London - Decision tables in depth (Michael Anstis)

4,843

Published on

Decision tables in depth

Decision tables in depth

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total Views
4,843
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
212
Comments
1
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Michael Anstis Decision Tables in depth
  • 2. Agenda <ul><li>Overview
  • 3. Types
  • 4. Validation & Verification
  • 5. Transformation
  • 6. Decision Tables in Guvnor
  • 7. Roadmap
  • 8. Summary
  • 9. Q&A </li></ul>
  • 10. Agenda <ul><li>Overview </li></ul><ul><li>Types
  • 11. Validation & Verification
  • 12. Transformation
  • 13. Decision Tables in Guvnor
  • 14. Roadmap
  • 15. Summary
  • 16. Q&A </li></ul>
  • 17. Overview <ul><li>Tabular representation of decisions.
  • 18. Compact way to model large sets of related rules. </li></ul><ul><li>The state of a number of conditions determines the execution of a set of actions. </li></ul><ul><li>Many variations of the decision table concept exist which look similar at first sight. </li></ul>
  • 19. Agenda <ul><li>Overview </li></ul><ul><li>Types </li></ul><ul><li>Validation & Verification
  • 20. Transformation
  • 21. Decision Tables in Guvnor
  • 22. Roadmap
  • 23. Summary
  • 24. Q&A </li></ul>
  • 25. Types <ul>Types </ul><ul><ul><li>Layout </li><ul><ul><ul><li>Horizontal
  • 26. Vertical
  • 27. Limited entry
  • 28. Extended entry </li></ul></ul></ul><li>Categorisation </li><ul><ul><ul><li>Expanded form, contracted form
  • 29. Multi-hit, all hits
  • 30. Multi-hit, first hit
  • 31. Single hit </li></ul></ul></ul></ul></ul>
  • 32. Layouts <ul>Horizontal </ul>
  • 33. Layouts <ul>Vertical </ul>
  • 34. Layouts <ul>Limited entry </ul>
  • 35. Layouts <ul>Extended entry </ul>
  • 36. Categorisation <ul>Expanded form </ul><ul><li>Single column for every condition combination
  • 37. The number of columns should equal the product of the number of states for every condition. </li><ul><li>e.g. 3 conditions each with 2 states gives: </li></ul></ul>2 * 2 * 2 = 8 combinations <ul><ul><li>e.g. 2 conditions each with 3 states and 1 condition with 4 states gives: </li></ul></ul>3 * 3 * 4 = 36 combinations
  • 38. Categorisation <ul>Expanded form (continued) </ul><ul><li>Condition states should be digitised </li><ul><li>e.g. age: <18, 18-35, 36-60, >60 not a free-form integer field </li></ul><li>Condition states should be continuous </li><ul><li>e.g. GOOD: age<18, age>=18; BAD: age<18, age>=30
  • 39. Not essential for expansion but ensures completeness </li></ul><li>This guarantee of completeness of condition combinations is one of the main advantages of decision tables. </li></ul>
  • 40. Categorisation <ul>Expanded form (continued) </ul>
  • 41. Categorisation <ul>Contracted form </ul><ul><li>Contraction is the first optimisation.
  • 42. Reduces the number of condition columns.
  • 43. If the same actions exist for rules covering all condition states for a given condition they can be combined and the condition state becomes irrelevant. </li></ul>
  • 44. Categorisation <ul>Contracted form – stage 1 Rules 2 and 3 are impossible conditions </ul>
  • 45. Categorisation <ul>Contracted form – stage 2 Merge adjacent column groups with identical action parts </ul>
  • 46. Categorisation <ul>Multi-hit, all hits </ul><ul><li>To get complete result all rules matching need to have their actions executed.
  • 47. Condition columns are not mutually exclusive
  • 48. If the Condition columns are not exclusive, some combination of conditions are present in more than one column, which may lead to ambiguity or inconsistency. </li></ul>
  • 49. Categorisation <ul>Multi-hit, all hits </ul>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
  • 50. Categorisation <ul>Multi-hit, first hit </ul><ul><li>To get complete result the first rule (from left-to-right) matching needs to have its action executed.
  • 51. Condition columns are not mutually exclusive.
  • 52. If the Condition columns are not exclusive, some combination of conditions are present in more than one column, which may lead to ambiguity or inconsistency. </li></ul>
  • 53. Categorisation <ul>Multi-hit, first hit </ul>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
  • 54. Categorisation <ul>Single hit </ul><ul><li>Each possible combination of conditions matches exactly one, and only one, rule.
  • 55. Condition columns are mutually exclusive
  • 56. As the Condition columns are exclusive; combinations of conditions cannot be present in more than one column which eliminates ambiguity and inconsistency.
  • 57. Classic form if Single-hit is &quot;expanded decision table&quot;; but this can be optimised or “contracted”. </li></ul>
  • 58. Categorisation <ul>Single hit </ul>Given a 35 year old with 15 years service 1. Rule 3 matches, giving 25 days 2. No other rules match
  • 59. Agenda <ul><li>Overview
  • 60. Types </li></ul><ul><li>Validation & Verification </li></ul><ul><li>Transformation
  • 61. Decision Tables in Guvnor
  • 62. Roadmap
  • 63. Summary
  • 64. Q&A </li></ul>
  • 65. Validation & Verification <ul><li>Redundancy
  • 66. Ambivalence (conflicting)
  • 67. Deficiency
  • 68. Mitigation </li></ul>
  • 69. Validation & Verification <ul><li>Redundancy </li></ul><ul><li>Duplication
  • 70. Subsumption </li></ul><ul><ul><li>Two rules have the same actions, but one contains additional conditions in which it will succeed. Whenever the more restrictive rule succeeds, the less restrictive rule also succeeds, resulting in redundancy. </li></ul></ul><ul><li>Impossible conditions </li><ul><li>Conditions that do not make sense (e.g. age < 0) </li></ul></ul>
  • 71. Validation & Verification <ul><li>Redundancy - Subsumption </li></ul>
  • 72. Validation & Verification <ul><li>Ambivalence </li></ul><ul><li>Contradictory rules </li></ul><ul><ul><li>Two (or more) rules have the same conditions but with different actions. </li></ul></ul><ul><li>Conflicting rules </li><ul><li>An action for one rule is the opposite of the same action for the other rule. </li></ul></ul><ul><li>Ambiguous rules </li><ul><li>The actions are different but not opposite. </li></ul></ul>
  • 73. Validation & Verification <ul><li>Ambivalence </li></ul><ul><ul><li>Premium is £500 if applicant age is less than 30
  • 74. Premium is £300 if Years Without Claim is greater than or equal to 10 years. </li></ul></ul><ul><ul><li>Applicant is 29, premium is £500
  • 75. Applicant has 12 years without claim, premium is £300 </li></ul></ul><ul><ul><li>Applicant is 29 with 12 years without claim, premium is ?!? </li></ul></ul>
  • 76. Validation & Verification <ul><li>Deficiency </li></ul><ul><li>Missing rules </li><ul><li>A situation exists in which a particular action is required, but there is no rule that succeeds in that situation and produces the desired conclusion. </li></ul><li>Unused input state or domain attribute
  • 77. Missing knowledge </li><ul><li>The absence of some essential elements from the problem situation. </li></ul></ul>
  • 78. Validation & Verification <ul><li>Mitigation – redundancy </li></ul><ul><li>Duplication </li></ul><ul><li>Cannot occur in the Single-hit decision table, because columns do not overlap. </li></ul><ul><li>Subsumption </li></ul><ul><li>Cannot occur in the Single-hit decision table, because columns do not overlap. </li></ul><ul><li>Impossible conditions </li></ul><ul><li>Impossible combinations may still exist. </li></ul>
  • 79. Validation & Verification <ul><li>Mitigation - ambivalence </li></ul><ul>The single-hit table format avoids such conflicts. </ul><ul><ul><li>Premium is £500 if applicant age is less than 30
  • 80. Premium is £300 if Years Without Claim is greater than or equal to 10 years. </li></ul></ul><ul><ul><li>Applicant is 29 with 12 years without claim, premium is £300 </li></ul></ul>
  • 81. Validation & Verification <ul><li>Mitigation - deficiency </li></ul><ul><li>Missing rules </li></ul><ul><ul><li>Expanded decision table is exhaustive
  • 82. All combinations of condition states are included </li></ul></ul><ul><li>Unused input state or domain attribute </li></ul><ul><ul><li>Expanded decision table is exhaustive
  • 83. All combinations of condition states are included </li></ul></ul><ul><li>Missing knowledge </li><ul><li>Validation of domain model by domain expert </li></ul></ul>
  • 84. Agenda <ul><li>Overview
  • 85. Types
  • 86. Validation & Verification </li></ul><ul><li>Transformation </li></ul><ul><li>Decision Tables in Guvnor
  • 87. Roadmap
  • 88. Summary
  • 89. Q&A </li></ul>
  • 90. Transformation <ul><li>Decision Trees </li></ul><ul><li>Requirements </li><ul><li>Digitised condition states
  • 91. Each Condition in a column becomes a branch </li></ul><li>Multi-hit </li><ul><li>Walk every path through tree </li></ul><li>Single-hit </li><ul><li>Walk single path through tree </li></ul></ul>
  • 92. Transformation <ul><li>Example - Decision Table </li></ul>
  • 93. Transformation <ul><li>Example - Decision Tree </li></ul>
  • 94. Transformation <ul><li>Paying attention?
  • 95. Rules 1, 2 and 3, 4 have the same action no matter what the state of “Hunger”. Therefore they can be contracted... </li></ul>
  • 96. Agenda <ul><li>Overview
  • 97. Types
  • 98. Validation & Verification
  • 99. Transformation </li></ul><ul><li>Decision Tables in Guvnor </li></ul><ul><li>Roadmap
  • 100. Summary
  • 101. Q&A </li></ul>
  • 102. Decision Tables in Guvnor <ul><li>What do we currently provide? </li></ul><ul><li>Vertical layout
  • 103. Generalised categorisation </li><ul><li>Multi-hit, all hit; Multi-hit first hit; Single hit </li></ul><li>Extended entry
  • 104. Digitised condition states (enumerated fields)
  • 105. New decision table editor </li></ul><ul><ul><li>Foundation for future work
  • 106. Condition and rule negation
  • 107. Cell merging
  • 108. Cell grouping </li></ul></ul>
  • 109. Decision Tables in Guvnor <ul><li>What do we currently provide? </li></ul><ul>Cell merging </ul>
  • 110. Decision Tables in Guvnor <ul><li>What do we currently provide? </li></ul><ul>Cell grouping </ul>
  • 111. Decision Tables in Guvnor <ul><li>What do we currently provide? </li></ul><ul><li>Video demonstration </li></ul><ul><ul><li>Demonstration available online at http://vimeo.com/21438537 </li></ul></ul>
  • 112. Decision Tables in Guvnor <ul><li>Generation of DRL
  • 113. Each row compiles into a separate DRL rule </li></ul>
  • 114. Decision Tables in Guvnor <ul><li>Generation of DRL
  • 115. Each row compiles into a separate DRL rule
  • 116. rule &quot;Row 1 dtable&quot;
  • 117. dialect &quot;mvel&quot;
  • 118. when
  • 119. $person : Person( age < &quot;18&quot; )
  • 120. then
  • 121. $person.setHolidayEntitlement( 27 );
  • 122. end
  • 123. rule &quot;Row 2 dtable&quot;
  • 124. dialect &quot;mvel&quot;
  • 125. when
  • 126. $person : Person( age >= &quot;18&quot; , age < &quot;45&quot; , lengthOfService < &quot;15&quot; )
  • 127. then
  • 128. $person.setHolidayEntitlement( 22 );
  • 129. end </li></ul>
  • 130. Agenda <ul><li>Overview
  • 131. Types
  • 132. Validation & Verification
  • 133. Transformation
  • 134. Decision Tables in Guvnor </li></ul><ul><li>Roadmap </li></ul><ul><li>Summary
  • 135. Q&A </li></ul>
  • 136. Roadmap <ul><li>What does the future hold? </li></ul><ul><li>Provision of other layouts </li><ul><li>Horizontal
  • 137. Limited entry </li></ul></ul><ul><li>Automated optimisation
  • 138. Improved support for digitised condition states
  • 139. Integration of V&V providing visual feedback </li></ul><ul><li>Pluggable editors for Model Fact Types
  • 140. Usability enhancements </li></ul>
  • 141. Agenda <ul><li>Overview
  • 142. Types
  • 143. Validation & Verification
  • 144. Transformation
  • 145. Decision Tables in Guvnor
  • 146. Roadmap </li></ul><ul><li>Summary </li></ul><ul><li>Q&A </li></ul>
  • 147. Summary Decision Tables <ul><li>Are an important tool for modelling decisions
  • 148. Provide a simple, yet powerful, visualisation of decision components
  • 149. Allow large sets of related rules to be easily worked upon simultaneously
  • 150. Provide the means to easily validate and verify rules </li></ul>Guvnor <ul><li>Existing capabilities suitable for most
  • 151. A solid foundation for the future
  • 152. A roadmap to become the market leader </li></ul>
  • 153. Agenda <ul><li>Overview
  • 154. Types
  • 155. Validation & Verification
  • 156. Transformation
  • 157. Decision Tables in Guvnor
  • 158. Roadmap
  • 159. Summary </li></ul><ul><li>Q&A </li></ul>
  • 160. Useful links <ul><li>Project </li><ul><li>http://www.jboss.org/drools </li></ul><li>Reference Manual </li><ul><li>http://www.jboss.org/drools/documentation.html </li></ul><li>Blog </li><ul><li>http://blog.athico.com/ </li></ul><li>Mailing Lists </li><ul><li>http://www.jboss.org/drools/lists.html </li></ul></ul>
  • 161. Michael Anstis Decision Tables in depth

×