Your SlideShare is downloading. ×
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
Buenos Aires Decision Table presentation
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

Buenos Aires Decision Table presentation

1,800

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,800
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
94
Comments
0
Likes
1
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 & Guvnor
  • 2. Agenda
  • 11. Agenda
    • Introduction
  • 19. Agenda Some decisions are simple
  • 20. Introduction - Some decisions are simple Should I fly to Buenos Aires?
  • 21. Introduction - Some decisions are simple I want to treat myself
  • 22. Introduction - Some decisions are simple
  • 23. Agenda Some decisions are complex
  • 24. Introduction - Some decisions are complex What insurance premium should I charge?
  • 25. Introduction - Some decisions are complex
    • Business considerations
      • Applicant's age
      • 26. Applicant's experience
      • 27. Sailing qualifications
      • 28. Value of vessel
      • 29. Type of cover
  • 30. Introduction - Some decisions are complex
    • Business considerations
      • Applicant's age
        • Only insure people over 25 years of age
        • 31. If less than 35 add 10% surcharge
        • 32. If less than 45 add 5% surcharge
  • 33. Introduction - Some decisions are complex
    • Business considerations
      • Applicant's experience
        • If sailing < 5 years then charge +10%
      • Sailing qualifications
        • None charge +100%
    • Etc...
  • 34. Introduction - Enter the decision table
    • Extract of decision table
  • 35. Introduction - Overview
    • Tabular representation of decisions.
    • 36. Compact way to model large sets of related rules.
    • The state of a number of conditions determines the execution of a set of actions.
    • Many variations of the decision table concept exist which look similar at first sight.
  • 37. Agenda
    • Introduction
    • Types
  • 44. Types
      Types
      • Layout
      • Categorisation
            • Expanded form, contracted form
            • 49. Multi-hit, all hits
            • 50. Multi-hit, first hit
            • 51. Single hit
  • 52. Layouts
      Sections
    Conditions stub Actions stub Action states Condition states Rule identifiers
  • 53. Layouts
      Sections
  • 54. Layouts
      Horizontal
  • 55. Layouts
      Vertical
  • 56. Layouts
      Limited entry
  • 57. Layouts
      Extended entry
  • 58. Categorisation
      Expanded form
    • Single column for every condition combination
    • 59. The number of columns should equal the product of the number of states for every condition.
      • e.g. 2 conditions, one with 3 states the second with 2 states gives:
    2 * 3 = 6 combinations
  • 60. Categorisation
      Expanded form (continued)
    • Condition states should be discretized
      • e.g. age: <18, 18-35, 36-60, >60 not a free-form integer field
    • Discretization should cover entire domain range
      • e.g. GOOD: age<18, age>=18; BAD: age<18, age>=30
      • 61. Not essential for expansion but ensures completeness
    • This guarantee of completeness of condition combinations is one of the main advantages of decision tables.
  • 62. Categorisation
      Expanded form (continued)
  • 63. Categorisation
      Contracted form
    • Contraction is the first optimisation.
    • 64. Reduces the number of condition columns.
    • 65. 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.
  • 66. Categorisation
      Contracted form – stage 1 Rules 2 and 3 are impossible conditions
  • 67. Categorisation
      Contracted form – stage 2 Merge adjacent column groups with identical action parts
  • 68. Categorisation
      Multi-hit, all hits
    • To get complete result all rules matching need to have their actions executed.
    • 69. Condition columns are not mutually exclusive
    • 70. 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.
  • 71. Categorisation
      Multi-hit, 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
  • 72. Categorisation
      Multi-hit, first hit
    • To get complete result the first rule (from left-to-right) matching needs to have its action executed.
    • 73. Condition columns are not mutually exclusive.
    • 74. 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.
  • 75. Categorisation
      Multi-hit, 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
  • 76. Categorisation
      Single hit
    • Each possible combination of conditions matches exactly one, and only one, rule.
    • 77. Condition columns are mutually exclusive
    • 78. As the Condition columns are exclusive; combinations of conditions cannot be present in more than one column which eliminates ambiguity and inconsistency.
    • 79. Classic form if Single-hit is &quot;expanded decision table&quot;; but this can be optimised or “contracted”.
  • 80. Categorisation
      Single hit
    Given a 35 year old with 15 years service 1. Rule 3 matches, giving 25 days 2. No other rules match
  • 81. Agenda
    • Validation & Verification
  • 88. Validation & Verification
  • 92. Validation & Verification
    • Redundancy
    • Duplication
    • 93. Subsumption
      • 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.
    • Impossible conditions
      • Conditions that do not make sense (e.g. age < 0)
  • 94. Validation & Verification
    • Redundancy - Subsumption
  • 95. Validation & Verification
    • Ambivalence
    • Contradictory rules
      • Two (or more) rules have the same conditions but with different actions.
    • Conflicting rules
      • An action for one rule is the opposite of the same action for the other rule.
    • Ambiguous rules
      • The actions are different but not opposite.
  • 96. Validation & Verification
    • Ambivalence
      • Premium is £500 if applicant age is less than 30
      • 97. Premium is £300 if Years Without Claim is greater than or equal to 10 years.
      • Applicant is 29, premium is £500
      • 98. Applicant has 12 years without claim, premium is £300
      • Applicant is 29 with 12 years without claim, premium is ?!?
  • 99. Validation & Verification
    • Deficiency
    • Missing rules
      • 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.
    • Unused input state or domain attribute
    • 100. Missing knowledge
      • The absence of some essential elements from the problem situation.
  • 101. Validation & Verification
    • Mitigation – redundancy
    • Duplication
    • Cannot occur in the Single-hit decision table, because columns do not overlap.
    • Subsumption
    • Cannot occur in the Single-hit decision table, because columns do not overlap.
    • Impossible conditions
    • Impossible combinations may still exist.
  • 102. Validation & Verification
    • Mitigation - ambivalence
      The single-hit table format avoids such conflicts.
      • Premium is £500 if applicant age is less than 30
      • 103. Premium is £300 if Years Without Claim is greater than or equal to 10 years.
      • Applicant is 29 with 12 years without claim, premium is £300
  • 104. Validation & Verification
    • Mitigation - deficiency
    • Missing rules
      • Expanded decision table is exhaustive
      • 105. All combinations of condition states are included
    • Unused input state or domain attribute
      • Expanded decision table is exhaustive
      • 106. All combinations of condition states are included
    • Missing knowledge
      • Validation of domain model by domain expert
  • 107. Agenda
    • Transformation
  • 114. Transformation
    • Decision Trees
    • Requirements
        • Discretized condition states
        • 115. Each Condition in a column becomes a branch
    • Multi-hit
      • Walk every path through tree
    • Single-hit
      • Walk single path through tree
  • 116. Transformation
    • Example - Decision Table
  • 117. Transformation
    • Example - Decision Tree
  • 118. Transformation
    • Paying attention?
    • 119. Rules 1, 2 and 3, 4 have the same action no matter what the state of “Hungry”. Therefore they can be contracted...
  • 120. Agenda
    • What is Guvnor?
  • 127. What is Guvnor?
    • Asset management system
  • 128. What is Guvnor?
    • Asset authoring environment
  • 129. What is Guvnor?
    • Asset quality assurance provider
  • 130. What is Guvnor?
    • Asset compilation service
  • 131. Agenda
    • Decision Tables in Guvnor
  • 138. Decision Tables in Guvnor
    • What do we currently provide?
    • Vertical layout
    • 139. Multi-hit, all hits
    • 140. Extended entry
    • 141. Discretized condition states (enumerated fields)
    • 142. New decision table editor
      • Foundation for future work
      • 143. Condition and rule negation
      • 144. Cell merging
      • 145. Cell grouping
  • 146. Decision Tables in Guvnor
    • What do we currently provide?
      Cell merging
  • 147. Decision Tables in Guvnor
    • What do we currently provide?
      Cell grouping
  • 148. Decision Tables in Guvnor
    • Generation of DRL
    • 149. Each row compiles into a separate DRL rule
  • 150. Decision Tables in Guvnor
    • Generation of DRL
    • 151. Each row compiles into a separate DRL rule
    • 152. rule &quot;Row 1 dtable&quot;
    • 153. dialect &quot;mvel&quot;
    • 154. when
    • 155. $person : Person( age < &quot;18&quot; )
    • 156. then
    • 157. $person.setHolidayEntitlement( 27 );
    • 158. end
    • 159. rule &quot;Row 2 dtable&quot;
    • 160. dialect &quot;mvel&quot;
    • 161. when
    • 162. $person : Person( age >= &quot;18&quot; , age < &quot;45&quot; , lengthOfService < &quot;15&quot; )
    • 163. then
    • 164. $person.setHolidayEntitlement( 22 );
    • 165. end
  • 166. Decision Tables in Guvnor
    • What do we currently provide?
    • Video demonstration
      • Demonstration available online at http://vimeo.com/21438537
  • 167. Agenda
    • Roadmap
  • 174. Roadmap
    • What does the future hold?
    • Provision of other layouts
      • Horizontal
      • 175. Limited entry
    • Automated optimisation
    • 176. Improved support for digitised condition states
    • 177. Integration of V&V providing visual feedback
    • Pluggable editors for Model Fact Types
    • 178. Usability enhancements
  • 179. Agenda
    • Summary
    • Q&A
  • 186. Summary Decision Tables
    • Are an important tool for modelling decisions
    • 187. Provide a simple, yet powerful, visualisation of decision components
    • 188. Allow large sets of related rules to be easily worked upon simultaneously
    • 189. Provide the means to easily validate and verify rules
    Guvnor
    • Existing capabilities suitable for most
    • 190. A solid foundation for the future
    • 191. A roadmap to become the market leader
  • 192. Agenda
    • Q&A
  • 200. Useful links
    • Project
      • http://www.jboss.org/drools
    • Reference Manual
      • http://www.jboss.org/drools/documentation.html
    • Blog
      • http://blog.athico.com/
    • Mailing Lists
      • http://www.jboss.org/drools/lists.html
  • 201. Michael Anstis Decision Tables & Guvnor

×