1 Decision Tables and Business Rules April 24, 2008 Decision Tables and Business Rules Prof. dr. Jan Vanthienen Katholieke Universiteit Leuven (Belgium) Leuven Institute for Research on Information Systems jan.vanthienen@econ.kuleuven.be Who? Issues Objectives Examples Decision tables Concept Jan Vanthienen K.U.Leuven, Belgium Faculty of Business and Economics Business Information Systems Group Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Research and teaching: • Business rules, processes and information systems • Verification & Validation European Conference on V&V of KBS (EuroVaV) • Business intelligence & Knowledge discovery • Decision tables Publications, research, expertise: see Google, etc. Email: jan.vanthienen@econ.kuleuven.be Conclusions Decision Tables and Business Rules 2008 2 2 Decision Tables and Business Rules Issues Objectives Examples • Building customer-focus • Flexibility • Personalization Decision tables Concept Applications Representation need business rules and the ability to create and manage business rules in a well organized setting Kinds of tables Consistency by construction Construction V&V • by bringing business rules out of obscurity. • by bringing business rules out of implementation • by bringing business rules out of code • and into the business management side. Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 Introduction • Objectives • Decision Tables • Message & Vision • Examples 3 3 Decision Tables and Business Rules Objectives Issues Objectives Examples Decision tables Concept • The Vision: policies and rules of the business are an important source of change, – dealing with constraints, guidelines, events, actions, contracts, derivations, policies • but these elements are often not explicited, hidden in systems, inflexible and difficult to change by business users Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions • Attention Points – Facilitate specification of business rules by business users – building high quality systems (using verification and validation of business rules) – building flexible systems (using powerful representations) – Maintain business rules by non-technical participants – Change business rules dynamically – Update business rules without changing the system – Straightforward implementation of Business Rules – Design based on explicit executable business rules – run-time application of business rules (end-users maintaining the system) – business rule harvesting (e.g. in the areas of insurance fraud, credit scoring). 2008 Decision Tables and Business Rules 5 Issues Issues The important issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures • Where do the rules come from? – Modeling, specification, harvesting • How do we make sure we have the right rules? – Quality, verification, representation • How do we get new (and the right) rules quickly? – Maintenance by business experts • How do we get them to work immediately? – Declarative Structures EU-Rent • Rule management – Tools Conclusions Decision Tables and Business Rules Business 2008 IT 7 4 Decision Tables and Business Rules Example: UServ Product Derby Case Study Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Auto Discounts (p. 6) • If the car only has Driver airbags then lower the premium by 12 % • If the car has Driver and Passenger airbags then lower the premium by 15 % • If the car has Driver, Passenger and Side airbags then lower the premium by 18 % • If the car’s potential theft rating is high and the car is equipped with an alarm system, then lower the premium by 10 % Structures EU-Rent Conclusions Decision Tables and Business Rules 8 2008 A table of rules Issues Objectives Examples Decision tables Concept Applications Representation Car has Driver airbags Y Y Y - Car has Passenger airbags N Y Y - Car has Side airbags N - Y - Car's potential theft rating - - - high Car is equipped with alarm system - - - Y Lower the premium by 12% x . . . Lower the premium by 15 % . x - - Lower the premium by 18% . . x . Lower the premium by 10% . . . x 1 2 3 4 Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Default rule Decision Tables and Business Rules 2008 Exception 9 5 Decision Tables and Business Rules Completeness by construction Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V - Table Structures x Structures added deleted EU-Rent Conclusions Decision Tables and Business Rules 2008 10 UServ Product Derby Case Study Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Rewriting the rules Auto Discounts (p. 6) • If the car only has Driver airbags then lower the premium by 12 % • If the car only has Driver and Passenger airbags or only has Driver and Side airbags then lower the premium by 15 % • If the car has Driver, Passenger and Side airbags then lower the premium by 18 % • If the car’s potential theft rating is high and the car is equipped with an alarm system, then lower the premium by 10 % Decision Tables and Business Rules 2008 11 6 Decision Tables and Business Rules The total picture Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions 12 2008 Decision Tables and Business Rules The final tables Issues Objectives Examples Decision tables Concept Applications - Representation Kinds of tables x Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 13 7 Decision Tables and Business Rules Decision table: Concept and Application Areas • • • • • Concept Advantages and best practices Consistency by construction Application areas Examples Concept Issues Objectives Examples Decision tables Concept C1. Wholesaler C2. Quantity Ordered (Q) Y Q<10 N 10<=Q<15 Q>=15 - C3. Travel Distance (D) - D<50 50<=D<100 D>=100 - - A1. Discount (%) 0 10 5 2 10 0 A2. Railway Transport - - - - x x A3. Road Transport x x x x - - A4. Bill Type A A A A B A Conditions Actions Applications Representation Subjects Entries Kinds of tables Rule 2 Rule 1 Consistency by construction Construction V&V Table Structures Structures EU-Rent A decision table is a table representing the complete set of mutually exclusive conditional expressions in a predefined area Rule 3 Rule 4 Rule 5 Rule 6 two-dimensional grouping of interrelated rules ... - Completeness criterion - Exclusivity criterion per condition subject Conclusions per action subject Decision Tables and Business Rules 2008 15 8 Decision Tables and Business Rules Decision table Orientation Issues Objectives Examples Decision tables Vertical (rules in columns) Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Horizontal (rules in rows) Table Structures Structures EU-Rent Conclusions 16 2008 Decision Tables and Business Rules Some EU-Rent discount rules Issues Objectives Examples Decision tables Name Car Groups Durations Discount Business Rules 3-day Advance All All 10% All rentals booked at least 3 days in advance qualify for a 10% discount. Summer Week Mid-sized, Full Sized, Luxury, Sport Utility, Minivan Weekly €50.00 Weekly renters of a qualifying car receive a €50 discount. Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 17 9 Decision Tables and Business Rules Consistency by construction Issues • Exclusivity Objectives column 4 subsumes column 1 Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction • Completeness V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 18 Why use decision tables? Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures – Powerful visualisation Compact and structured presentation – Preventing errors is easier Avoid incompleteness and inconsistency – Modular knowledge organisation Group rules into single table – Performance Fast decision tree execution Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 21 10 Decision Tables and Business Rules Multiple languages Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction Airbags chauffeur Airbags passagier Zijdelingse airbags Verminder de premie met 12% - Verminder de premie met 15% x Verminder de premie met 18% V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 22 Example: ORDER PROCESSING Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction 1. Discount Only wholesalers receive a discount. The discount rates are 10%, 5% and 2% : 10% for wholesalers with an order quantity of at least 15 pieces or who are situated within a range of less than 50 miles of the company and order at least 10 pieces; a discount of 5% is allowed to those wholesalers that order at least 10, but less than 15 pieces and whose distance to the company is 50 miles or more; finally, the discount rate comes to 2% for customers that live at least 100 miles from the company, and order at least 10 but less than 15 pieces. 2. Means of Transportation We deliver by rail if the order does not come from a wholesaler or if a wholesaler has ordered at least 15 pieces. In all other cases, road transport is used V&V Table Structures Structures 3. Bill Type The normal bill type is A. Exceptionally, a type B bill has to be made up. This is the case when a wholesaler’s order quantity is at least 15 pieces. EU-Rent Conclusions Decision Tables and Business Rules 2008 23 11 Decision Tables and Business Rules Checking Completeness, Consistency and Correctness Issues 1. Wholesaler Y 2. Quantity Ordered (Q) Examples 3. Travel Distance (D) - D<50 50<=D<100 D>=100 - - 1. Discount 0% - - - - - x 2. Discount 2 % - - - x - - 3. Discount 5 % - - x x - - Decision tables Concept Applications Q<10 N Objectives 10<=Q<15 Q>=15 - Representation 4. Discount 10 % - x - - x - Kinds of tables 5. Railway Transport - - - - x x Consistency by construction Construction 6. Road Transport x x x x - - 7. Bill Type A x x x x - x 8. Bill Type B V&V Table Structures CS Structures EU-Rent - - - - x - 1 2 3 4 5 6 • (C11,C21) • (C11,C22) • (C12,C21) • (C12,C22) • ... • (x,x) • (x,-) • (-,x) • (-,-) • ... AS Conclusions Decision Tables and Business Rules 2008 24 Updated Example: ORDER PROCESSING Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent 1. Discount Only wholesalers receive a discount. The discount rates are 10%, 5% and 2% : 10% for wholesalers with an order quantity of at least 15 pieces or who are situated within a range of less than 50 miles of the company and order at least 10 pieces; a discount of 5% is allowed to those wholesalers that order at least 10, but less than 15 pieces and whose distance to the company is 50 miles or more, but less than 100 miles; finally, the discount rate comes to 2% for customers that live at least 100 miles from the company, and order at least 10 but less than 15 pieces. No discount is given if the order quantity is less than 10 pieces. 2. Means of Transportation We deliver by rail if the order does not come from a wholesaler or if a wholesaler has ordered at least 15 pieces. In all other cases, road transport is used 3. Bill Type The normal bill type is A. Exceptionally, a type B bill has to be made up. This is the case when a wholesaler’s order quantity is at least 15 pieces. Conclusions Decision Tables and Business Rules 2008 25 12 Decision Tables and Business Rules Applying procedures Issues (CASE: wholesaler; quantity ordered = 12; distance = 120) Objectives Examples Decision tables Concept • • Applications Representation Text = action oriented (on average: 7,66 questions) + verbose Decision table = condition oriented (average: 2,33 questions) + correct decision path Kinds of tables Consistency by construction Construction V&V Table Structures • Decision making is faster and correct - less questions (only relevant questons) - no interpretation, ambiguity (‘in other cases’, ‘normally’, ‘unless stated elsewhere’) Structures EU-Rent SPEED CORRECTNESS Conclusions 26 2008 Decision Tables and Business Rules Application areas Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V • Regulations, legislation, compliance … • Business rules, corporate policy, ... accept/refuse orders discounts … • Business Process Management • Knowledge and Expertise • Classification knowledge types of customers risk categories … knowledge engineering • Systems analysis and implementation conditional logic experiments knowledge validation transformations automation of construction Table Structures application field enlargement advanced preprocessors Structures algorithms EU-Rent initial preprocessors initial developments Conclusions 1960 Decision Tables and Business Rules 1970 1980 2008 1990 2000 27 13 Decision Tables and Business Rules Kim Clijsters' Tennis Ranking Issues Objectives “Clijsters becomes the world's number one if she reaches the final, OR If Davenport doesn't reach the final, OR Mauresmo doesn't win the tournament. Examples Decision tables Lindsay Davenport stays number one if she wins the tournament AND Clijsters doesn't reach the final, OR she looses the final (against another player than Mauresmo) AND Clijsters looses in the semi-finals. Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Amélie Mauresmo becomes number one if she wins the tournament and Clijsters looses in the quarter-finals.” (translated from www.sporza.be, 2006 ...) 1. Clijsters 2. Davenport 3. Mauresmo 1. Cijsters number 1 2. Davenport number 1 3. Mauresmo number 1 1. Clijsters 2. Davenport 3. Mauresmo 1. Cijsters number 1 2. Davenport number 1 3. Mauresmo number 1 Decision Tables and Business Rules goes out before semi-final goes out before final runner-up does not win tourn. wins tourn. does not win tourn. wins tourn. x . . 1 goes out before final x . . 6 x . x 2 x . . 3 looses semi-final runner-up or wins tourn. does not win tourn. wins tourn. x x . 7 wins tourn. - . . x 4 x x . 5 runner-up or wins - . . . 8 x . . 9 2008 28 Discovering credit scoring rules Issues Objectives Examples Decision tables Concept Applications EXAMPLE Major Benelux financial institution: • A real life credit-risk evaluation data set is analyzed using neural network rule extraction techniques. The resulting business rules are represented in a format that is easily comprehensible and verifiable by the credit-risk manager. Representation Kinds of tables Consistency by construction • Many classification/data mining techniques have been suggested to develop credit scoring systems – Examples are: logistic regression, discriminant analysis, decision trees and rules, knearest neighbour, genetic algorithms, neural networks, support vector machines, … Construction V&V Table Structures Structures EU-Rent • Most studies primarily focus at developing credit scoring models with a high classification accuracy – But: more focus should lie on developing explanatory systems instead of merely adopting black blox, mathematically complex models! – E.g., open the neural network black box using rule extraction or tree extraction techniques Conclusions Decision Tables and Business Rules 2008 29 14 Decision Tables and Business Rules Comprehensibile credit scoring systems if Term >12 months and Purpose=cash provisioning and Savings account<=12.40 Euro and Years client<=3 then Applicant=bad Issues Term > 12 Months -0.202 Objectives Purpose=cash provisioning -0.287 Examples Purpose=second hand car Savings account > 12.40 Euro Decision tables Representation 0.278 -0.081 -0.162 Concept Years client > 3 years if Purpose=cash provisioning and Income>719 Euro and Owns property=No and Savings account <= 12.40 Euro and Years client<=3 then Applicant=bad -0.102 Income > 719 Euro Property=No Applications if Term >12 months and Purpose=cash provisioning and Owns property=No and Savings account <=12.40 Euro then Applicant=bad Applicant=good 0.137 0.457 if Purpose=second hand car and Income>719 Euro and Owns property=No and Savings account <= 12.40 Euro and Years client<=3 then Applicant=bad -0.453 0.611 0.380 Applicant=bad if Savings account <=12.40 Euro and Economical sector=Sector C then Applicant=bad -0.289 Default class: Applicant=good Economical sector=sector C Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions BAESENS B., SETIONO R., MUES C., VANTHIENEN J., Using Neural Network Rule Extraction and Decision Tables for Credit-Risk Evaluation, Management Science, Vol. 49, No. 3, March 2003, pp. 312-329. http://pubsonline.informs.org/main/pdfstore/cecbaae209_abstract.pdf Decision Tables and Business Rules 2008 Business Rules and Smart Business Processes • Adaptability • Business Processes • Busines Rules ''We are what we repeatedly do. Excellence, then, is not an act, but a habit.'‘ -- Aristotle 31 15 Decision Tables and Business Rules What can change? Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent • • • • • • • • • • The rules and policies governing business process Decision details of business processes Service contracts and protocols Constraints on business processes The business processes itself Calculation procedures Constraints and definitions Decision paths and elements Assumptions and preconditions Presentation, implementation, … So how do we obtain this flexibility in processes, services, components, applications - aligned with the business - in a stable architecture Conclusions Decision Tables and Business Rules 33 2008 The Business Rules Approach Issues Objectives Examples Decision tables Concept Applications • Define business rules explicitly – Rules as data – Rules separated from processes • Organised and stored separately from rest of application Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures • Make the business the owner – Provide owner access for definition and modification • Use the business rules directly: – In the organisation, as guidance for people – In software products that automate them EU-Rent Conclusions Decision Tables and Business Rules A business rule is: – – – – – – 2008 Declarative (i.e. non-procedural); Atomic (indivisible yet inclusive); Expressed in business language; Distinct, independent constructs; Business, not technology, oriented; Business, not technology, owned; 34 16 Decision Tables and Business Rules The Business Rules Manifesto Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Article 1. Primary Requirements, Not Secondary 1.1. Rules are a first-class citizen of the requirements world. 1.2. Rules are essential for, and a discrete part of, business models and technology models. Article 2. Separate From Processes, Not Contained In Them 2.3. Rules apply across processes and procedures. There should be one cohesive body of rules, enforced consistently across all relevant areas of business activity. Article 3. Deliberate Knowledge, Not A By-Product 3.1. Rules build on facts, and facts build on concepts as expressed by terms. 3.2. Terms express business concepts; facts make assertions about these concepts; rules constrain and support these facts. Article 4. Declarative, Not Procedural 4.5. A rule is distinct from any enforcement defined for it. A rule and its enforcement are separate concerns. Article 5. Article 6. Article 7. Article 8. Article 9. Well-Formed Expression, Not Ad Hoc Rule-Based Architecture, Not Indirect Implementation Rule-Guided Processes, Not Exception-Based Programming For the Sake of the Business, Not Technology Of, By, and For Business People, Not IT People 9.2. Business people should have tools available to help them formulate, validate, and manage rules. Article 10. Managing Business Logic, Not Hardware/Software Platforms (Version 2.0, November 1, 2003. Business Rules Group) Conclusions Decision Tables and Business Rules 2008 35 2008 36 Where are the rules? Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction (BPMN 1.0: OMG Final Adopted Specification, 2006) • Decision rules • Calculation rules V&V Table Structures Structures EU-Rent Conclusions but also: • Timing rules • Workflow rules • Access rules • Exception rules • … Decision Tables and Business Rules 17 Decision Tables and Business Rules BPM and Rules Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Graphical maps can get unwieldy Consistency by construction Scripts are too programmer-ese Construction V&V Optimal: 1. BPM controls process 2. Delegate complex decisions to rules and tables Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 37 Separating process logic and rule logic Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 38 18 Decision Tables and Business Rules Business Rules in Enterprise Model Issues defines and constrains terms of Objectives Examples Decision tables Concept Business Vocabulary Model Business Rule Model guides, constrains, defines transitions of Business Process Model Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent • Rules guide a process (decision points, computations) • Rules constrain processes (order, time, resources) – Model the rules first, then derive the process • Externalizing rules produces thin (agile) processes • Rules ensure compliance • Rules ensure alignment Conclusions Decision Tables and Business Rules 2008 39 Example: order-to-cash process Issues Objectives What is wrong with this process model? Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions “Customers under the age of 18 cannot order medication X” (integrity constraint) “Loyal customers receive a 10% discount” (derivation rule) “When the customer does not pay within 30 days, a payment violation notice is sent to the financial department” (reaction rule) Decision Tables and Business Rules 2008 41 19 Decision Tables and Business Rules Permissions and obligations Issues Objectives Examples E.g. “We can only ship after we have accepted an official order” e.g. order-to-cash business process Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures The Permissions and obligations of the actors in a business process constrain and determine the sequence flow. Structures EU-Rent Conclusions Goedertier, S., Vanthienen, J.: Rule-based business process modeling and execution, in Proceedings of the IEEE EDOC Workshop on Vocabularies, Ontologies and Rules for The Enterprise (VORTE 2005). CTIT Workshop Proceeding Series (ISSN 0929-0672), Enschede, 2005. 42 2008 Decision Tables and Business Rules Process-level enforcement Service-Oriented Architecture Issues Objectives Examples Decision tables Concept Applications business rule and process layer rules, rules Call For Proposals processes rules Representation Kinds of tables Consistency by construction services and components layer shipment order e-payment Construction V&V Table Structures Structures EU-Rent application layer MCS LDAP DWH ERP Conclusions Decision Tables and Business Rules 2008 43 20 Decision Tables and Business Rules Two sides of the same coin Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions • Business Process Management • Business Rules Management – BP Modelling – BR Modelling Analysis Quality/Maintenance Improvement Analysis Quality/Maintenance Improvement – BP Enactment – BAM - Business Activity Monitoring – Execution – BP Maturity Decision Tables and Business Rules – BR Enactment – RAM - Rule Activity Monitoring – Execution – BR Maturity 2008 44 Which comes first? Issues Two architectural styles: Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures • Process first –Execution scenarios are explicit, design choices are implicit. –Excellent for stable processes, highly standardized • Rules first –Rules, choices and goals are explicit, execution scenario is derived. –Compliance by design. –Excellent for volatile processes, many exceptions, agility EU-Rent Conclusions • And, of course, combinations of both Decision Tables and Business Rules 2008 45 21 Decision Tables and Business Rules Representing rule sets • Alternative representations: trees, rules, tables, graphs and text • Different representations for different purposes • Kinds of decision tables • Contraction, optimization Decision tables and rules Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent if (credit limit = 'Ok') and (customer = 'Good') and (Stock Sufficient) Sufficient) then Execute Order if (customer = 'Not Good') and (credit limit = 'Not Ok') then Refuse Refuse Order if (credit limit = 'Not Ok') and (customer = 'Good') and not(Stock Sufficient) then Put On Waiting List if (Customer = 'Good') and (Stock Sufficient) then Execute Order if (Customer = 'Good') and not(Stock Sufficient) and (credit limit limit = 'Ok') then Put On Waiting List if (credit limit = 'Ok') and (Customer = 'Not Good') and not(Stock not(Stock Sufficient) then Put On Waiting List Conclusions if (credit limit = 'Ok') and (Stock Sufficient) and (Customer = 'Not Good') then Execute Order Decision Tables and Business Rules 2008 47 22 Decision Tables and Business Rules 50 ways to represent rule sets Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Assign 22 days if always 5 extra days if Age<18 or Age>=60 5 extra days if Service>=30 2 extra days if Age is between 45-<60 and Service <30 2 extra days if Age is between 18-<45 and Service is between 15-<30 3 extra days if Service>=30 and Age is between 18-<60 3 extra days if Age = >=60 Construction V&V Table Structures Structures EU-Rent Conclusions (Clive Spenser) 48 2008 Decision Tables and Business Rules Trees, Graphs, Rules, Tables 1. Customer is not a wholesaler No discount is allowed, we deliver by rail and the bill type is A. 2. Customer is a wholesaler 2.1. Quantity ordered is less than 10 pieces No discount is allowed, road transport is used and the bill type is A. 2.2. Quantity ordered is at least 10, but less than 15 pieces 2.2.1. Distance to the company is less than 50 miles A discount of 10% is allowed, road transport is used and the bill type is A. 2.2.2. Distance to the company is 50 miles or more, but less than 100 miles A discount of 5% is allowed, road transport is used and the bill type is A. 2.2.3. Distance to the company is more than 100 miles A discount of 2% is allowed, road transport is used and the bill type is A. 2.3. Quantity ordered is at least 15 pieces A discount of 10% is allowed, we deliver by rail and the bill type is B. Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction ANIMALS Skin ? Construction V&V feathers hair Birds Table Structures Conclusions (Firefly) Decision Tables and Business Rules Flies ? yes no yes Lays Eggs? Mammals Lays Eggs? Structures EU-Rent ... Flies ? no Gives Milk? yes no yes no Birds Mammals Birds Gives Milk? 2008 yes Mammals no / 49 23 Decision Tables and Business Rules 3 aspects of a decision situation Issues Objectives Examples Decision tables Specification (description, modelling) Business Rules Tables Trees Concept Applications Representation Verification & Validation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Execution (implementation) Graphs Rules Conclusions Decision Tables and Business Rules 2008 50 Example: premiums Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction Suppose we have to give a premium to an employee, depending on age and performance evaluation. There are two kinds of premium: the normal premium and the super premium. Here are the specification rules: – The Super Premium is only given if the evaluation is Good; – The Normal Premium is given if (Age>=45 or Evaluation is Moderate) except in the cases of rule 1; – The Normal Premium is however given if (Age>=45 and Evaluation is Good). Verification: V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 51 24 Decision Tables and Business Rules Implementation Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction • <?xml version="1.0" ?> • <Rulebase> • • <!-- rule 1 --> • <Implies> • <head> • <Atom> • <Rel>equals</Rel> • <Var>SuperPremium</Var> • <Ind>execute</Ind> • </Atom> • </head> • <body> • <Atom> • <Rel>equals</Rel> • <Var>Person.Evaluation</Var> • <Ind>Good</Ind> • </Atom> • </body> • </Implies> V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules • <!-- rule 2 --> • <Implies> • <head> • <Atom> • <Rel>equals</Rel> • <Var>NormalPremium</Var> • <Ind>execute</Ind> • </Atom> • </head> • <body> • <Or> • <And> • <Atom> • <Rel>equals</Rel> • <Var>Person.Age&lt;45</Var> • <Ind>TRUE</Ind> • </Atom> • <Atom> • <Rel>equals</Rel> • <Var>Person.Evaluation</Var> • <Ind>Moderate</Ind> • </Atom> • </And> • <Atom> • <Rel>equals</Rel> • <Var>Person.Age&lt;45</Var> • <Ind>FALSE</Ind> • </Atom> • </Or> • </body> • </Implies> • </Rulebase> 2008 52 Text Rewriting Issues Objectives Examples Decision tables • Discount 0% IF Wholesaler = N or Quantity Ordered (Q) = Q<10 • Discount 2 % IF Wholesaler = Y and Quantity Ordered (Q) = 10<=Q<15 and Travel Distance (D) = D>=100 • Discount 5 % IF Wholesaler = Y and Quantity Ordered (Q) = 10<=Q<15 and Travel Distance (D) = 50<=D<100 Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures • Discount 10 % IF Wholesaler = Y and ((Quantity Ordered (Q) = 10<=Q<15 and Travel Distance (D) = D<50) or Quantity Ordered (Q) = Q>=15) • Railway Transport IF Wholesaler = N or Quantity Ordered (Q) = Q>=15 • Road Transport IF Wholesaler = Y and (Quantity Ordered (Q) = Q<10 or Quantity Ordered (Q) = 10<=Q<15) • Bill Type A IF Wholesaler = N or Quantity Ordered (Q) = Q<10 or Quantity Ordered (Q) = 10<=Q<15 • Bill Type B IF Wholesaler = Y and Quantity Ordered (Q) = Q>=15 EU-Rent Conclusions Decision Tables and Business Rules 2008 53 25 Decision Tables and Business Rules Formal definition: Conditions Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction e.g. C1: condition subject: condition domain: condition states: Quantity (=x) {0,1,2,...,n} {x<10, 10<=x<20, 20<=x} (Integer) C2: condition subject : condition domain : condition states : Color {white, yellow, blue} (Enumeration) {color=white, color=yellow or blue} C3: condition subject : condition domain : condition states : Leap Year {True, False} {Yes, No} (Boolean) V&V Table Structures The 'condition space' is the set of all possible condition combinations. Structures EU-Rent Conclusions 2008 Decision Tables and Business Rules 54 Condition and Action Space Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction Condition list: C= { (Quantity, {x<10, 10<= x<20, 20<= x}), (Color, {white, (yellow or blue)}), (Schrikkeljaar, {Yes, No}) } Condition space: CS= { (x<10, white, Yes), (x<10, white, No), (x<10, (yellow or blue),Yes), (x<10, (yellow or blue),No), (10<= x<20, white, Yes), ... } Action list: A= { give allowance, road transport, … } V&V Table Structures Action space: AS= { (x, x), (x, -), (-, x), … } Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 55 26 Decision Tables and Business Rules The decision table as a relation Issues • The decision table relation DT Objectives Examples Decision tables Concept Applications – is a function: every condition combination has only one image. Multiple condition combinations may have the same image. (consistency) – every condition combination has at least one image (completeness) Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures CS AS • (C11,C21) • (C11,C22) • (C12,C21) • (C12,C22) • ... • (x,x) • (x,-) • (-,x) • (-,-) • ... EU-Rent Conclusions Decision Tables and Business Rules 2008 56 10 Commandments on decision table usage Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Content • Multi-valued states (extended entry conditions) • Exclusivity and completeness of the states (domain partitioning) • Exclusivity and completeness of the columns (single hit tables) • Predefined actions (refined action entries) Form • Optimization (group oriented contraction and row order optimization) • Tree structures (top-down readability) • Concise representation (block-oriented notation) • Indication of impossibilities (contracted impossibilities) Purpose • Selection structure (no initialization or repeat actions) • Subtables (closed subtables) Decision Tables and Business Rules 2008 57 27 Decision Tables and Business Rules Kinds of tables Issues Objectives Examples Decision tables Concept MH Multiple Hit MH/A All Hit table with non-exclusive columns rule table or decision grid chart Applications Representation Kinds of tables Consistency by construction MH/F First Hit SH Single Hit "classic" multiple hit table decision table Construction V&V Table Structures Structures SH/X Expanded the table representation of all single decision columns SH/C Contracted the compact table representation of all decision columns for a given condition order SH/O Optimized the compact table representation of all decision columns for the optimal condition order (cf. infra) EU-Rent Conclusions Decision Tables and Business Rules 2008 58 Example Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction • The number of holidays depends on age and years of service. Every employee receives at least 22 days. Additional days are provided according to the following criteria: • Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days. • If the employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. The 2 extra days can not be combined with the 5 extra days. Construction V&V Table Structures • Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already supplied. Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 59 28 Decision Tables and Business Rules multiple hit versus single hit Issues Objectives multiple hit, all hits Examples Decision tables Concept Applications Representation Kinds of tables multiple hit, first hit Consistency by construction Construction V&V Table Structures single hit Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 Constructing decision tables • Construction steps • Construction: example • Completeness, consistency and correctness • Decision table layout 60 29 Decision Tables and Business Rules Decision Table Construction Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures 1. Define the conditions, the condition states and the actions. 2. Describe the problem using logical expressions, where actions and (combinations of) condition states are related in logical expressions. 3. Construct the empty table: list conditions and actions, fill out the condition entries of the table (the lower conditions will vary first). 4. Fill out the action entries (column by column or action by action), based on the logical expressions. 5. Check table for completeness, correctness and consistency 6. Simplify the decision table Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 66 Example Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction • The number of holidays depends on age and years of service. Every employee receives at least 22 days. Additional days are provided according to the following criteria: • Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days. • If the employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. The 2 extra days can not be combined with the 5 extra days. Construction V&V Table Structures • Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already supplied. Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 67 30 Decision Tables and Business Rules Condition states and actions Issues Objectives Examples Decision tables Concept Applications Representation Condition states Actions Age Years of service Every employee age < 18 age >= 60 jaar >= 30 years of service 15-<30 years of service age >= 45 jaar Number of holidays At least 22 days Extra days 5 extra days 2 extra days (can not be combined with 5 extra days) 3 extra days (on top) Kinds of tables Consistency by construction Construction V&V Condition states age < 18 age >= 60 >= 30 years of service 15-<30 years of service age >= 45 Actions Assign 22 days 5 extra days 2 extra days 3 extra days Table Structures Structures EU-Rent Age <18 18-<45 45-<60 Service <15 15-<30 >=30 >=60 Conclusions 69 2008 Decision Tables and Business Rules Decision Table Construction Issues Objectives 1. Examples Decision tables Concept Applications Representation Kinds of tables 2. 3. Define the conditions, the condition states and the actions. Age <18 18-<45 45-<60 Service <15 15-<30 >=30 >=60 Describe the problem using logical expressions, where actions and (combinations of) condition states are related in logical expressions. Construct the empty table: list conditions and actions, fill out the condition entries of the table (the lower conditions will vary first). Consistency by construction Construction V&V Table Structures Structures EU-Rent 4. 5. 6. Fill out the action entries (column by column or action by action), based on the logical expressions. Check table for completeness, correctness and consistency Simplify the decision table Conclusions Decision Tables and Business Rules 2008 70 31 Decision Tables and Business Rules Decision rules Issues Objectives Examples Decision tables Concept Every employee receives at least 22 days. Action 1 (Assign 22 days) must be executed for every possible combination of condition states. Rule 1: assign 22 days if always Only employees younger than 18 or at least 60 years, or employees with at least 30 years of service will receive 5 extra days. Rule 2: 5 extra days if (and only if) age < 18 or age >= 60 or service >= 30 Applications Representation Kinds of tables Consistency by construction Construction V&V If the employee has at least 15 but less than 30 years of service, 2 extra days are given. These 2 days are also provided for employees of age 45 or more. The 2 extra days can not be combined with the 5 extra days. Rule 3: Employees with at least 30 years of service and also employees of age 60 or more, receive 3 extra days, on top of possible additional days already supplied. Rule 4: Table Structures Structures EU-Rent 2 extra days if (45 <= age < 60 or age >= 60 or 15 <= service < 30) minus rule 2 3 extra days if age >= 60 or service >= 30 From common sense knowledge, it is clear that an employee younger than 18 years can not have 15 or more years of service. The impossible condition combinations can be discarded from the table by adding the rule: Rule 5: impossible if age < 18 and (15 <= service < 30 or service >= 30) Conclusions Decision Tables and Business Rules 2008 74 Fill out action entries Issues Expanded decision table Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Expanded decision table (without impossible combinations) Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 78 32 Decision Tables and Business Rules 4. Check for Completeness, Consistency & Correctness Issues 1. Examine the empty columns. These columns should be examined one by one to verify if it really was the intention to have no actions. 2. Examine the unreferenced actions (or conditions). 3. Examine the completeness of actions and columns. Some actions or groups of actions should have at least one occurrence. This is usually the case if the actions are the representation of an "extended-entry" action (exhaustivity requirement). 4. Examine the table for contradictions between actions. Some actions or action groups may exclude each other and therefore cause contradictions if they occur in the same column (exclusivity requirement). 5. Examine the table for correctness. Here we should not only check if the different columns correspond with the described specifications, but also if this specification corresponds with the desired reality. Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 79 Simplify the decision table Issues Objectives Examples Decision tables 1. Contraction of the table. Adjacent columns with the same action-configuration are contracted into combined columns. 2. An optimal condition order might be computed to minimize the number of columns. 3. Decide upon a suitable layout. To achieve this, several actions can be combined into extended entry actions, as long as this does not cause any contradictions. Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 82 33 Decision Tables and Business Rules Optimization Features Issues Expanded table Objectives Examples Decision tables Concept • Table contraction – merge adjacent column groups with identical action parts Applications Representation Kinds of tables Contracted table Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions • Row order optimization – less columns by changing order of condition rows For a table with n conditions, this implies a choice between n! alternative condition orders, some of which might be infeasible because of precedence constraints Reordered table 2008 Decision Tables and Business Rules 83 Optimization features Issues Objectives Examples Decision tables Concept • Export to minimal rules improved rule notation – Discount 2 % IF Wholesaler = Y and Quantity Ordered (Q) = 10<=Q<15 and Travel Distance (D) = D>=100 – Railway Transport IF Wholesaler = N or Quantity Ordered (Q) = Q>=15 – Bill Type B IF Wholesaler = Y and Quantity Ordered (Q) = Q>=15 Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions • Optimal code generation Execution time optimization: this determines the optimal test sequences (execution tree) – In the resulting execution tree, conditions are not always tested in the same order anymore. – taking into account condition test times and column frequencies (if available). – If condition test times or column frequencies are not supplied, they are assumed equal for all conditions or columns respectively and the average number of tests is minimized. This implies choosing between f(n) decision trees: f(n) Decision Tables and Business Rules = n.[f(n-1)]2, with f(1) = 1 2008 84 34 Decision Tables and Business Rules From the Business Rules Manifesto Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions 2008 Decision Tables and Business Rules Verification & Validation • • • • Redundancy Ambivalence (inconsistency) Deficiency and completeness Validation of correctness 85 35 Decision Tables and Business Rules A few words from V&V Research Issues Objectives Examples Anomalies Special Cases Decision tables Unfirable rule Unsatisfiable condition Subsumed rule Duplicate rules Concept Applications Representation Kinds of tables Redundancy Consistency by construction Ambivalence Construction V&V Circularity Table Structures Deficiency Unusable consequent Contradictory rules Unused input Structures EU-Rent Preece’s anomaly classification Conclusions Decision Tables and Business Rules 2008 90 V&V experiences with decision tables Issues Objectives Examples Decision tables Concept Applications The cleanroom approach • Redundancy Avoided by table mechanism Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent • Inconsistency or contradictions Avoided by modeling tables • Incompleteness Avoided by automatic generation of combinations • Correctness Easy to visualize the decision logic Conclusions Decision Tables and Business Rules 2008 91 36 Decision Tables and Business Rules How decision tables avoid redundancy Issues Objectives Examples Decision tables The main problem with redundancy is maintenance and the risk of creating inconsistencies when changing the specifications. Some common forms of redundancy: • Subsumption: rules with the same conclusions but with one of them containing additional premises (and therefore being less general).. – A credit check must be performed for a customer if the order total is more than $1000 – A credit check must be performed for a customer if the order total is more than $1000 and a waiver has not been authorized Subsumption cannot occur in the decision table, because columns do not overlap Concept Applications Representation Kinds of tables Consistency by construction • Redundant premises: (partly) complementary rules with equal conclusions, which can be combined. – A credit check must be performed for a customer if the order total is more than $1000 and a waiver has not been authorized – A credit check must be performed for a customer if the order total is more than $1000 and a waiver has been authorized In a contracted decision table, complementary rules are combined, leading to the detection of irrelevant or partly irrelevant conditions. The number of distinct columns is thereby minimized. Construction V&V Table Structures Structures EU-Rent • Redundant rules: rules with the same premises and (partly) equal conclusions. Because in the decision table every possible case is included in only one column (exclusivity), redundant rules will not occur. Conclusions Decision Tables and Business Rules 92 2008 Redundancy Issues • Subsumed Column (special case: duplicate column) Objectives exclusivity criterion Examples Decision tables Prevented at tableconstruction time ! Concept Applications Representation Kinds of tables Consistency by construction Construction V&V ! - incremental verification - integration into modelling environment Remark: traditional rule subsumption checking requires pairwise rule comparison subsumption if (credit limit = 'Ok') and (customer = 'Good') and (Stock Sufficient) then Execute Order Table Structures if (customer = 'Not Good') and (credit limit = 'Not Ok') then Refuse Order if not(Stock Sufficient) and (credit limit = 'Not Ok') and (customer = 'Good') then Put On Waiting List Structures EU-Rent if (Customer = 'Good') and (Stock Sufficient) then Execute Order if (Customer = 'Good') and not(Stock Sufficient) and (credit limit = 'Ok') then Put On Waiting List Conclusions etc.. if (credit limit = 'Ok') and (Customer = 'Not Good') and not(Stock Sufficient) then Put On Waiting List if (credit limit = 'Ok') and (Stock Sufficient) and (Customer = 'Not Good') then Execute Order Decision Tables and Business Rules 2008 93 37 Decision Tables and Business Rules How decision tables avoid inconsistency Issues Objectives Examples Decision tables Concept Inconsistency occurs when rules with the same premises, but with different conclusions, exist. In a single-hit decision table (the only type we will use), columns are non-overlapping and therefore conflicting columns will not occur. This is one of the major advantages of decision tables: each condition combination occurs only once and refers to exactly one configuration of conclusions. Some common forms of inconsistency: Applications Representation Kinds of tables Consistency by construction • Conflict: rules with the same premises (or containing overlapping combinations), but leading to contradictory conclusions. – A credit check must be performed for a customer if the order total is more than $1000 – A credit check must not be performed for a customer if the order total is more than $1000 and a waiver has been authorized The single-hit table format avoids such conflicts. Construction V&V Table Structures Structures EU-Rent Conclusions • Invalid attribute values: a rule containing a nonexistent value of an attribute (e.g. because of a typing error). – Once the domain of conditions is well defined, invalid values will not occur, as table entries can be generated automatically. • Cyclical rules: a set of rules where a conclusion occurs somewhere as one of the premises. – In a decision table context, conclusions occurring as premises lead to separate tables. The forward character of the decision table structure eliminates the problem of cyclical references. Decision Tables and Business Rules 2008 95 How decision tables avoid incompleteness Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent No current system is able to incorporate all possible knowledge, but within the specific problem area, the following omissions often occur: • Unused attribute values or combinations: when attribute values (or combinations) never occur as premises, a number of rules may be missing. Detecting the completeness of all combinations of attribute values is not always simple. – A credit check must be performed for a customer if the order total is more than $1000 – A credit check must not be performed for a customer if the order total is less than $500 What if the order total is $800? The nature of the decision table easily allows to check for completeness: the number of simple columns should equal the product of the number of states for every condition. This guaranty of completeness of condition combinations is one of the main advantages of decision tables. • Unreachable conclusions: conclusions which are never deduced and cannot be asked. The format of the decision table easily shows unreachable conclusions. • Missing knowledge: the absence of some essential elements from the problem situation. Inconsistency often is a symptom of incompleteness because of missing premises. Conclusions Decision Tables and Business Rules 2008 98 38 Decision Tables and Business Rules Structures of decision tables • • • • Modeling structures Modularization Table structures Verification and validation of table hierarchies • Table structures: example Modeling Structures Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures •Structures of tables –Condition subtables : subtables that determine the state of a condition (e.g. when do you consider someone a good customer?) –Action subtables : subtables that further elaborate on what additional knowledge holds for certain cases (e.g. what discount to give if an order is accepted) EU-Rent Conclusions Decision Tables and Business Rules 2008 103 39 Decision Tables and Business Rules Table Structures: Example Issues "Customer" subtable Objectives Examples Decision tables Concept Applications Representation Kinds of tables subtable further specifies what is understood by the notion of a "good" customer main table Consistency by construction Construction V&V "Execute Order" subtable is only applicable in cases where Credit Limit = Ok and/or Customer = Good Table Structures "Execute Order" subtable Structures EU-Rent Conclusions Decision Tables and Business Rules 104 2008 Verification and Validation (V&V) Issues Objectives Examples • Intra-tabular verification : verify each table – single-hit decision tables Decision tables intraintra-tabular Concept Applications Representation Kinds of tables Consistency by construction • Inter-tabular verification : verify different (sub)tables with respect to each other interinter-tabular Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 106 40 Decision Tables and Business Rules Unfirable Column: Example Issues main table Objectives Examples Decision tables Concept Applications "Execute Order" subtable Representation Kinds of tables Consistency by construction Construction V&V unfirable Table Structures Structures EU-Rent Conclusions “Credit Limit” and “Customer” are referred to in condition stub of main table, as well as subtable Decision Tables and Business Rules 2008 Example: EU-Rent discount rules • Full table • Modularization • Analysis 107 41 Decision Tables and Business Rules Example: EU-Rent Issues Objectives EU-Rent's current discounted promotion programmes are Examples Decision tables Concept Car Groups Durations Discount Business Rules 3-day Advance All All 10% All rentals booked at least 3 days in advance qualify for a 10% discount. Summer Week Mid-sized, Full Sized, Luxury, Sport Utility, Minivan Weekly €50.00 Weekly renters of a qualifying car receive a €50 discount. New Loyalty Member Compact, Midsized, Full Sized Daily, Weekly, Monthly 2 car group upgrades New loyalty club members are eligible for a 2 level upgrade, subject to availability on their first rental after joining the programme. Name Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 111 EU-Rent: Contracted decision table Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 112 42 Decision Tables and Business Rules Dependency Graph Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 2008 113 2008 114 EU-Rent decomposed Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions Decision Tables and Business Rules 43 Decision Tables and Business Rules Experiences • • • • • Pension Fund Study allowances Hiring programs Medical procedures … PROcedural LOGic Analyzer Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V A tool environment that uses decision tables for knowledge modelling, validation, optimization and implementation Integrated V&V Features Refined specification language Actions [generally] if condition combinations (Not) action definitely if condition combinations Action only possible if condition combinations Action definitely if and only if condition combination Knowledge Optimization Consultation Engine Import/Export Facilities Table Structures Structures EU-Rent Conclusions www.econ.kuleuven.ac.be/prologa Decision Tables and Business Rules 2008 128 44 Decision Tables and Business Rules Conclusions Issues Objectives Examples Decision tables The important issues • Where do the rules come from? – Modeling, specification, harvesting Concept Applications Representation Kinds of tables Consistency by construction Construction • How do we make sure we have the right rules? – Quality, verification, representation • How do we get new (and the right) rules quickly? – Maintenance by business experts V&V Table Structures • How do we get them to work immediately? – Declarative Structures EU-Rent • Rule management – Tools Conclusions Decision Tables and Business Rules 2008 129 Some References Issues Objectives Examples Decision tables Concept Applications Representation Kinds of tables Consistency by construction Construction V&V Table Structures Structures EU-Rent Conclusions • Goedertier, S. and Vanthienen, J. (2007). Declarative Process Modeling with Business Vocabulary and Business Rules. In Halpin, T., Nijssen, S., and Meersman, R., editors, Proceedings of Object-Role Modeling (ORM’07), Lecture Notes in Computer Science (Springer), volume 4805, pp. 603-612. • Vanthienen, J. (2007). How Business Rules (Re)define Business Processes: A Service Oriented View, 10th International Business Rules Forum, Orlando, FL (USA), Oct. 21-25. • Goedertier, S., Mues, C., and Vanthienen, J. (2007), Specifying Process-Aware Access Control Rules in SBVR, in Paschke, A. and Biletskiy, Y., editors, Advances in Rule Interchange and Applications, Proceedings of The International RuleML Symposium (RuleML 2007), Lecture Notes in Computer Science (Springer), volume 4824, pp. 39-52. (Best Paper Award). • Goedertier, S., Haesen, R., and Vanthienen, J. (2007). EM-BrA²CEv0.1: A vocabulary and execution model for declarative business process modeling. FETEW Research Report KBI 0728, K.U.Leuven. http://www.econ.kuleuven.ac.be/public/ndbaf38/EM-BrAACE • Vanthienen, J. (2006). Consistency by construction: Decision table experiences in business rules and processes, 9th International Business Rules Forum, Washington, DC (USA), Nov. 5-9. • Goedertier, S. and Vanthienen, J. (2006). Designing compliant business processes with obligations and permissions. In Eder and Dustdar, editors, Proceedings of BPM 2006 International Workshops, volume 4103 of Lecture Notes in Computer Science. Springer. pages 5–14. • Vanthienen, J. (2006). 50 Ways to represent your rule sets, Business Rules Journal, vol. 7, no. 1 (Jan.), pages 1-7. • Vanthienen, J. (2004), Quality by design: using decision tables in business rules, Business Rules Journal, vol. 5, no. 2 (Feb), pp. 7. • Vanthienen, J., Mues C., Aerts A. (1998), An illustration of verification and validation in the modelling phase of KBS development, Data & Knowledge Engineering, vol. 27, no. 3 (Oct.), pp. 337 - 352. • Vanthienen, J., Mues, C., Wets, G., Delaere, K. (1998), A tool-supported approach to inter-tabular verification, Expert Systems with Applications, vol. 15, no. 3-4 (Oct.-Nov.), pp. 277 - 285. • Vanthienen, J., Wets, G. (1995), Integration of the decision table formalism with a relational database environment, Information Systems, vol. 20, no. 7 (Nov.), pp. 595 - 616. Decision Tables and Business Rules 2008 131