SlideShare a Scribd company logo
© 2014 OpenRules, Inc. 
Practical Techniques for Resolving Conflicts among Business Rules 
Presenter: Dr. Jacob Feldman 
OpenRules Inc., CTO 
jacobfeldman@openrules.com 
www.OpenRules.com
Motivation 
Contradictory business rules occur in normal business situations, and maintaining rules with exceptions is a very typical example of rule conflicts 
In real-world of complex decision modeling, business analysts frequently face issues related to diagnostic and resolution of business rule conflicts 
To avoid conflicts, business analysts have to add more and more rules making their maintenance a real problem 
© 2014 OpenRules, Inc. 
2
Real-world Examples 
No vehicles in the park (except during parades) 
Offer, acceptance, and memorandum produce a contract (except when the contract is illegal, the parties are minors, inebriated, or incapacitated, etc.) 
•These rules are “defeasible” as they can be defeated by their exceptions 
© 2014 OpenRules, Inc. 
3
Example from Financial Domain: 
–Rule 1: Stock in debt is considered risky 
–Rule 2: Stock in fusion with other stocks may be risky 
–Rule 3: Stock in fusion with a strong stock is not risky 
–Rule 4: Do not buy risky stocks unless they have a good price 
© 2014 OpenRules, Inc. 
4
Questions 
What are the commonly used techniques for resolving rule conflicts? 
Is it possible to automatically resolve rule conflicts? 
We will discuss how traditional and modern BRMS systems address these questions 
© 2014 OpenRules, Inc. 
5
Example of Rules with Conflicts 
Rule 1: Birds can fly 
Rule 2: Chicken cannot fly 
Rule 3: Scared chicken can fly 
Even little children can apply these rules in many practical situations 
How will a BRMS represent these rules? 
© 2014 OpenRules, Inc. 
6
Example of Rules with Conflicts within a BRMS 
Rule 1: Birds can fly 
Rule 2: Chicken cannot fly 
Rule 3: Scared chicken can fly 
© 2014 OpenRules, Inc. 
7 
Decision table that avoids rule conflicts by considering ALL “if-then” combinations in a mutually exclusive way:
All possible If-Then-Else Combinations Become a Challenge 
Rule 1: Birds can fly 
Rule 2: Chicken cannot fly 
Rule 3: Scared chicken can fly 
Add two more rules: 
Rule 4: Penguins cannot fly 
Rule 5: Everybody can fly in the airplane 
© 2014 OpenRules, Inc. 
8
Expanded Single-Hit Decision Table 
Rule 1: Birds can fly 
Rule 2: Chicken cannot fly 
Rule 3: Scared chicken can fly 
Rule 4: Penguins cannot fly 
Rule 5: Everybody can fly in the airplane 
© 2014 OpenRules, Inc. 
9 
If you try to cover all possible combinations for similar rules with conflicts, the number of rules grows exponentially!
Problems with Traditional Single-Hit Decision Tables 
Difficult to read and understand such a decision table not mentioning a necessity to maintain it with future changes 
Think about adding new rules: 
–Birds with broken wings cannot fly 
–Ostriches would not fly even when they are scared 
What if we try to add more rules that cover other 40 kinds of flightless birds that are in existence today? 
© 2014 OpenRules, Inc. 
10
Switching to Multi-Hit Decision Tables 
Rule 1: Birds can fly 
Rule 2: Chicken cannot fly 
Rule 3: Scared chicken can fly 
Rule 4: Penguins cannot fly 
Rule 5: Everybody can fly in the airplane 
© 2014 OpenRules, Inc. 
11 
Multi-Hit Decision Tables allow Rules Overrides: 
Rules with more specific conditions may override previously defined rules with more generic conditions!
Pros and Cons of Multi-Hit Decision Tables 
Pros: 
–more readable and easy to maintain to compare with single-hit decision tables 
–you do not have to cover all possible combinations of decision variables 
Cons: 
–relies on a strict sequencing of the rules inside the decision table that makes an introduction of new concepts and rules much more problematic 
© 2014 OpenRules, Inc. 
12
Auto-Resolution of Rules Conflicts 
Is it even possible to automatically resolve conflicts between business rules? 
The closest theory that deals with business rule conflicts is known as “Defeasible Logic” introduced more than 25 years ago 
This is a kind of reasoning that is based on reasons that are defeasible, i.e. capable of being defeated by other reasons 
13 
© OpenRules, Inc., 2014
Defeasible Logic 
Differentiates between strict rules and defeasible rules: 
–Strict rules are rules in the classical sense that are used in all modern BRMSs, e.g. “If something is a penguin Then it is a bird”. 
–Defeasible rules are rules that can be defeated by contrary evidence, e.g. “Birds typically can fly unless there is other evidence suggesting that it may not fly”. 
–Defeaters are special rules used only to defeat some defeasible rules, e.g. “Heavy animals may not be able to fly”. 
14 
© OpenRules, Inc., 2014
Superiority Relations among Rules 
Used to define priorities among rules, where one rule may override the conclusion of another rule. 
For example, given the defeasible rules 
–R1: Birds typically fly 
–R2: Birds with broken wings cannot fly 
no conclusive decision can be made about whether a bird with broken wings can fly. 
But if we introduce a superiority relation 
R2 > R1 
then we can indeed conclude that it can’t fly. 
15 
© OpenRules, Inc., 2014
Defeasible Logic & BRMSs 
The majority of BRMSs do not support the defeasible logic forcing their users to resolve all conflicts manually 
However, today enterprise-level rule repositories achieved a high level of maturity and internal complexity 
Absence of automatic conflict resolution tools will lead to unnecessary growth of rules and may gradually convert rules repositories to unmaintainable “monsters” 
Defeasible Logic becomes a must-feature 
16 
© OpenRules, Inc., 2014
Open Source BR Products take a Lead 
Last year two major open source BRMSs announced their implementations of the Defeasible Logic: 
–JBoss Drools implemented the classic defeasible logic with strict and defeasible rules along with the superiority relationships between rules 
–OpenRules implemented the defeasible logic with strict and defeasible rules but using a different concepts for conflict resolution based on their constraint-based rule engine 
17 
© OpenRules, Inc., 2014
Defeasible Logic by Drools 
JBoss Drools added the following rule annotations to their rule language (DRL): 
–@Strict 
–@Defeasible 
–@Defeats(“rule1″, “rule2″, “rule3”) 
–@Defeater 
A user may use @Defeats to specify a list of defeasible rules that can be defeated by the current rule 
18 
© OpenRules, Inc., 2014
Defeasible Logic by Drools 
Rules for issuing bus tickets in DRL: 
•Read more 
19 
© OpenRules, Inc., 2014
Defeasible Logic by OpenRules 
While we could also list rules that can be defeated by the current rules, we believe such “superiority relations” will become unmaintainable after a while 
If some rules directly “know” about other rules it may lead to “macaroni” relations especially when new defeasible rules need to be added 
20 
© OpenRules, Inc., 2014
Defeasible Logic by OpenRules 
To implement Defeasible Logic without “superiority relations”, we introduced a “rule probability” (or rule likelihood) 
It means instead of stating “Birds typically can fly” our user is able to write something like: 
–There is a “relatively high” probability that birds can fly (defeasible rule) 
–There is a “very high” probability that penguins cannot fly (defeasible rule) 
–Everybody can fly in an airplane (strict rule) 
21 
© OpenRules, Inc., 2014
Defeasible Logic by OpenRules 
Our user may assume that Rule with a higher probability will in general defeat Rule with a smaller probability 
The rule probabilities may be expressed as: 
NEVER, VERY LOW, LOW, BELOW MID, MID, ABOVE MID, HIGH, VERY HIGH, ALWAYS 
Or using numbers 0 (NEVER), 1, 2, …, 99, and 100% (ALWAYS) 
A rule with probability ALWAYS (or not specified) means a strict rule 
22 
© OpenRules, Inc., 2014
Defeasible Logic by OpenRules 
Actually we added only one optional column to our standard decision table template called “ActionProbability” 
Rule designer should be careful defining relative probabilities. For example, if we forget to specify the condition “Chicken is Yes” in the rule 5, it would not be clear either a scared penguin can fly or not. 
23 
© OpenRules, Inc., 2014
How Does It Work 
The described logic is supported by OpenRules Engine known as “Rule Solver” that is based on a standard constraint solver 
Rule Solver creates a constraint satisfaction problem: 
–Constraints for all “strict” rules are simply posted as hard constraints 
–Constraints for all rules with probabilities are posted as soft constraints with a possible violation cost defined by its probability value 
Then Rule Solver automatically solves this problem by minimizing the total constraint violation for all defeasible rules 
24 
© OpenRules, Inc., 2014
Benefits 
The described approach will work even when not all conflicts can be resolved: the Rule Solver will find a decision with minimal total conflicts 
Business analysts may express their preferences in an intuitive way as they do it in everyday life when they say: 
“There is a high probability of rain tonight” 
without any knowledge of the defeasible logic or the probability theory 
25 
© OpenRules, Inc., 2014
Conclusion 
We did not want to create a false impression that all problems related to rule conflicts have been solved 
Our objective was to bring an attention to the importance of these issues and to show some possible ways for their resolution 
We expect that all major BR vendors gradually will add an automatic ability to solve rule conflicts to their product offerings 
26 
© OpenRules, Inc., 2014

More Related Content

Similar to Practical Techniques for Resolving Conflicts among Business Rules

When speed-is-mission-critical sm
When speed-is-mission-critical smWhen speed-is-mission-critical sm
When speed-is-mission-critical sm
Utkan Uluçay, MSc., CDDP
 
Are You a SOLID Coder?
Are You a SOLID Coder?Are You a SOLID Coder?
Are You a SOLID Coder?
Steve Green
 
Rules in Artificial Intelligence
Rules in Artificial IntelligenceRules in Artificial Intelligence
Rules in Artificial Intelligence
Pierre Feillet
 
Java Chapter 05 - Conditions & Loops: part 1
Java Chapter 05 - Conditions & Loops: part 1Java Chapter 05 - Conditions & Loops: part 1
Java Chapter 05 - Conditions & Loops: part 1
DanWooster1
 
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
MLconf
 
Understanding Open Source
Understanding Open SourceUnderstanding Open Source
Understanding Open Source
Jody Garnett
 
An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
Four ways to represent computer executable rules
Four ways to represent computer executable rulesFour ways to represent computer executable rules
Four ways to represent computer executable rules
Jeff Long
 
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Wendy Knox Everette
 
9 Principles for Salesforce Application Architecture
9 Principles for Salesforce Application Architecture9 Principles for Salesforce Application Architecture
9 Principles for Salesforce Application Architecture
Steven Herod
 
Firewall best-practices-firewall-analyzer
Firewall best-practices-firewall-analyzerFirewall best-practices-firewall-analyzer
Firewall best-practices-firewall-analyzer
iDric Soluciones de TI y Seguridad Informática
 
Rule Violations and Over-Constrained Problems
Rule Violations and Over-Constrained ProblemsRule Violations and Over-Constrained Problems
Rule Violations and Over-Constrained Problems
Jacob Feldman
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
Anil Allewar
 
Getting Started with IBM i Security
Getting Started with IBM i Security Getting Started with IBM i Security
Getting Started with IBM i Security
HelpSystems
 
Rules With Drools
Rules With DroolsRules With Drools
Rules With Drools
Xebia IT Architects
 
Rules with Drools
Rules with DroolsRules with Drools
Rules with Drools
Gaurav Kohli
 
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docxA Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
ransayo
 
Top 9 Critical Findings - Dramatically Improve Your Organization's Security
Top 9 Critical Findings - Dramatically Improve Your Organization's SecurityTop 9 Critical Findings - Dramatically Improve Your Organization's Security
Top 9 Critical Findings - Dramatically Improve Your Organization's Security
Praetorian
 
Patterns of Evolutionary Architecture
Patterns of Evolutionary ArchitecturePatterns of Evolutionary Architecture
Patterns of Evolutionary Architecture
Shawn Button
 
Rewriting the rules
Rewriting the rulesRewriting the rules
Rewriting the rules
Mark Kehoe
 

Similar to Practical Techniques for Resolving Conflicts among Business Rules (20)

When speed-is-mission-critical sm
When speed-is-mission-critical smWhen speed-is-mission-critical sm
When speed-is-mission-critical sm
 
Are You a SOLID Coder?
Are You a SOLID Coder?Are You a SOLID Coder?
Are You a SOLID Coder?
 
Rules in Artificial Intelligence
Rules in Artificial IntelligenceRules in Artificial Intelligence
Rules in Artificial Intelligence
 
Java Chapter 05 - Conditions & Loops: part 1
Java Chapter 05 - Conditions & Loops: part 1Java Chapter 05 - Conditions & Loops: part 1
Java Chapter 05 - Conditions & Loops: part 1
 
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
Alex Korbonits, Data Scientist, Remitly, at MLconf Seattle 2017
 
Understanding Open Source
Understanding Open SourceUnderstanding Open Source
Understanding Open Source
 
An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.
 
Four ways to represent computer executable rules
Four ways to represent computer executable rulesFour ways to represent computer executable rules
Four ways to represent computer executable rules
 
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
 
9 Principles for Salesforce Application Architecture
9 Principles for Salesforce Application Architecture9 Principles for Salesforce Application Architecture
9 Principles for Salesforce Application Architecture
 
Firewall best-practices-firewall-analyzer
Firewall best-practices-firewall-analyzerFirewall best-practices-firewall-analyzer
Firewall best-practices-firewall-analyzer
 
Rule Violations and Over-Constrained Problems
Rule Violations and Over-Constrained ProblemsRule Violations and Over-Constrained Problems
Rule Violations and Over-Constrained Problems
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
 
Getting Started with IBM i Security
Getting Started with IBM i Security Getting Started with IBM i Security
Getting Started with IBM i Security
 
Rules With Drools
Rules With DroolsRules With Drools
Rules With Drools
 
Rules with Drools
Rules with DroolsRules with Drools
Rules with Drools
 
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docxA Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
A Pyramid ofDecision ApproachesPaul J.H. Schoemaker J. E.docx
 
Top 9 Critical Findings - Dramatically Improve Your Organization's Security
Top 9 Critical Findings - Dramatically Improve Your Organization's SecurityTop 9 Critical Findings - Dramatically Improve Your Organization's Security
Top 9 Critical Findings - Dramatically Improve Your Organization's Security
 
Patterns of Evolutionary Architecture
Patterns of Evolutionary ArchitecturePatterns of Evolutionary Architecture
Patterns of Evolutionary Architecture
 
Rewriting the rules
Rewriting the rulesRewriting the rules
Rewriting the rules
 

More from Jacob Feldman

Virtual Loader - Truck Loading Software
Virtual Loader - Truck Loading SoftwareVirtual Loader - Truck Loading Software
Virtual Loader - Truck Loading Software
Jacob Feldman
 
Good old u serv product derby in the brave new world of decision management
Good old u serv product derby in the brave new world of decision managementGood old u serv product derby in the brave new world of decision management
Good old u serv product derby in the brave new world of decision management
Jacob Feldman
 
Building Domain-Specific Decision Models
Building Domain-Specific Decision ModelsBuilding Domain-Specific Decision Models
Building Domain-Specific Decision Models
Jacob Feldman
 
Integrating Business Rules, Constraint Programming and Machine Learning Techn...
Integrating Business Rules, Constraint Programming and Machine Learning Techn...Integrating Business Rules, Constraint Programming and Machine Learning Techn...
Integrating Business Rules, Constraint Programming and Machine Learning Techn...
Jacob Feldman
 
Rules-based Mobile Resource Learner for Field Scheduling Applications
Rules-based Mobile Resource Learner for Field Scheduling ApplicationsRules-based Mobile Resource Learner for Field Scheduling Applications
Rules-based Mobile Resource Learner for Field Scheduling Applications
Jacob Feldman
 
How to Build Smarter Decision Models Capable To Make Optimal Decisions
How to Build Smarter Decision Models Capable To Make Optimal DecisionsHow to Build Smarter Decision Models Capable To Make Optimal Decisions
How to Build Smarter Decision Models Capable To Make Optimal Decisions
Jacob Feldman
 
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
Jacob Feldman
 
Connecting the Dots
Connecting the DotsConnecting the Dots
Connecting the Dots
Jacob Feldman
 
Modeling and Solving Decision Optimization Problems
Modeling and Solving Decision Optimization ProblemsModeling and Solving Decision Optimization Problems
Modeling and Solving Decision Optimization Problems
Jacob Feldman
 

More from Jacob Feldman (9)

Virtual Loader - Truck Loading Software
Virtual Loader - Truck Loading SoftwareVirtual Loader - Truck Loading Software
Virtual Loader - Truck Loading Software
 
Good old u serv product derby in the brave new world of decision management
Good old u serv product derby in the brave new world of decision managementGood old u serv product derby in the brave new world of decision management
Good old u serv product derby in the brave new world of decision management
 
Building Domain-Specific Decision Models
Building Domain-Specific Decision ModelsBuilding Domain-Specific Decision Models
Building Domain-Specific Decision Models
 
Integrating Business Rules, Constraint Programming and Machine Learning Techn...
Integrating Business Rules, Constraint Programming and Machine Learning Techn...Integrating Business Rules, Constraint Programming and Machine Learning Techn...
Integrating Business Rules, Constraint Programming and Machine Learning Techn...
 
Rules-based Mobile Resource Learner for Field Scheduling Applications
Rules-based Mobile Resource Learner for Field Scheduling ApplicationsRules-based Mobile Resource Learner for Field Scheduling Applications
Rules-based Mobile Resource Learner for Field Scheduling Applications
 
How to Build Smarter Decision Models Capable To Make Optimal Decisions
How to Build Smarter Decision Models Capable To Make Optimal DecisionsHow to Build Smarter Decision Models Capable To Make Optimal Decisions
How to Build Smarter Decision Models Capable To Make Optimal Decisions
 
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
Using Decision Tables to Model and Solve Scheduling and Resource Allocation P...
 
Connecting the Dots
Connecting the DotsConnecting the Dots
Connecting the Dots
 
Modeling and Solving Decision Optimization Problems
Modeling and Solving Decision Optimization ProblemsModeling and Solving Decision Optimization Problems
Modeling and Solving Decision Optimization Problems
 

Recently uploaded

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 

Recently uploaded (20)

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 

Practical Techniques for Resolving Conflicts among Business Rules

  • 1. © 2014 OpenRules, Inc. Practical Techniques for Resolving Conflicts among Business Rules Presenter: Dr. Jacob Feldman OpenRules Inc., CTO jacobfeldman@openrules.com www.OpenRules.com
  • 2. Motivation Contradictory business rules occur in normal business situations, and maintaining rules with exceptions is a very typical example of rule conflicts In real-world of complex decision modeling, business analysts frequently face issues related to diagnostic and resolution of business rule conflicts To avoid conflicts, business analysts have to add more and more rules making their maintenance a real problem © 2014 OpenRules, Inc. 2
  • 3. Real-world Examples No vehicles in the park (except during parades) Offer, acceptance, and memorandum produce a contract (except when the contract is illegal, the parties are minors, inebriated, or incapacitated, etc.) •These rules are “defeasible” as they can be defeated by their exceptions © 2014 OpenRules, Inc. 3
  • 4. Example from Financial Domain: –Rule 1: Stock in debt is considered risky –Rule 2: Stock in fusion with other stocks may be risky –Rule 3: Stock in fusion with a strong stock is not risky –Rule 4: Do not buy risky stocks unless they have a good price © 2014 OpenRules, Inc. 4
  • 5. Questions What are the commonly used techniques for resolving rule conflicts? Is it possible to automatically resolve rule conflicts? We will discuss how traditional and modern BRMS systems address these questions © 2014 OpenRules, Inc. 5
  • 6. Example of Rules with Conflicts Rule 1: Birds can fly Rule 2: Chicken cannot fly Rule 3: Scared chicken can fly Even little children can apply these rules in many practical situations How will a BRMS represent these rules? © 2014 OpenRules, Inc. 6
  • 7. Example of Rules with Conflicts within a BRMS Rule 1: Birds can fly Rule 2: Chicken cannot fly Rule 3: Scared chicken can fly © 2014 OpenRules, Inc. 7 Decision table that avoids rule conflicts by considering ALL “if-then” combinations in a mutually exclusive way:
  • 8. All possible If-Then-Else Combinations Become a Challenge Rule 1: Birds can fly Rule 2: Chicken cannot fly Rule 3: Scared chicken can fly Add two more rules: Rule 4: Penguins cannot fly Rule 5: Everybody can fly in the airplane © 2014 OpenRules, Inc. 8
  • 9. Expanded Single-Hit Decision Table Rule 1: Birds can fly Rule 2: Chicken cannot fly Rule 3: Scared chicken can fly Rule 4: Penguins cannot fly Rule 5: Everybody can fly in the airplane © 2014 OpenRules, Inc. 9 If you try to cover all possible combinations for similar rules with conflicts, the number of rules grows exponentially!
  • 10. Problems with Traditional Single-Hit Decision Tables Difficult to read and understand such a decision table not mentioning a necessity to maintain it with future changes Think about adding new rules: –Birds with broken wings cannot fly –Ostriches would not fly even when they are scared What if we try to add more rules that cover other 40 kinds of flightless birds that are in existence today? © 2014 OpenRules, Inc. 10
  • 11. Switching to Multi-Hit Decision Tables Rule 1: Birds can fly Rule 2: Chicken cannot fly Rule 3: Scared chicken can fly Rule 4: Penguins cannot fly Rule 5: Everybody can fly in the airplane © 2014 OpenRules, Inc. 11 Multi-Hit Decision Tables allow Rules Overrides: Rules with more specific conditions may override previously defined rules with more generic conditions!
  • 12. Pros and Cons of Multi-Hit Decision Tables Pros: –more readable and easy to maintain to compare with single-hit decision tables –you do not have to cover all possible combinations of decision variables Cons: –relies on a strict sequencing of the rules inside the decision table that makes an introduction of new concepts and rules much more problematic © 2014 OpenRules, Inc. 12
  • 13. Auto-Resolution of Rules Conflicts Is it even possible to automatically resolve conflicts between business rules? The closest theory that deals with business rule conflicts is known as “Defeasible Logic” introduced more than 25 years ago This is a kind of reasoning that is based on reasons that are defeasible, i.e. capable of being defeated by other reasons 13 © OpenRules, Inc., 2014
  • 14. Defeasible Logic Differentiates between strict rules and defeasible rules: –Strict rules are rules in the classical sense that are used in all modern BRMSs, e.g. “If something is a penguin Then it is a bird”. –Defeasible rules are rules that can be defeated by contrary evidence, e.g. “Birds typically can fly unless there is other evidence suggesting that it may not fly”. –Defeaters are special rules used only to defeat some defeasible rules, e.g. “Heavy animals may not be able to fly”. 14 © OpenRules, Inc., 2014
  • 15. Superiority Relations among Rules Used to define priorities among rules, where one rule may override the conclusion of another rule. For example, given the defeasible rules –R1: Birds typically fly –R2: Birds with broken wings cannot fly no conclusive decision can be made about whether a bird with broken wings can fly. But if we introduce a superiority relation R2 > R1 then we can indeed conclude that it can’t fly. 15 © OpenRules, Inc., 2014
  • 16. Defeasible Logic & BRMSs The majority of BRMSs do not support the defeasible logic forcing their users to resolve all conflicts manually However, today enterprise-level rule repositories achieved a high level of maturity and internal complexity Absence of automatic conflict resolution tools will lead to unnecessary growth of rules and may gradually convert rules repositories to unmaintainable “monsters” Defeasible Logic becomes a must-feature 16 © OpenRules, Inc., 2014
  • 17. Open Source BR Products take a Lead Last year two major open source BRMSs announced their implementations of the Defeasible Logic: –JBoss Drools implemented the classic defeasible logic with strict and defeasible rules along with the superiority relationships between rules –OpenRules implemented the defeasible logic with strict and defeasible rules but using a different concepts for conflict resolution based on their constraint-based rule engine 17 © OpenRules, Inc., 2014
  • 18. Defeasible Logic by Drools JBoss Drools added the following rule annotations to their rule language (DRL): –@Strict –@Defeasible –@Defeats(“rule1″, “rule2″, “rule3”) –@Defeater A user may use @Defeats to specify a list of defeasible rules that can be defeated by the current rule 18 © OpenRules, Inc., 2014
  • 19. Defeasible Logic by Drools Rules for issuing bus tickets in DRL: •Read more 19 © OpenRules, Inc., 2014
  • 20. Defeasible Logic by OpenRules While we could also list rules that can be defeated by the current rules, we believe such “superiority relations” will become unmaintainable after a while If some rules directly “know” about other rules it may lead to “macaroni” relations especially when new defeasible rules need to be added 20 © OpenRules, Inc., 2014
  • 21. Defeasible Logic by OpenRules To implement Defeasible Logic without “superiority relations”, we introduced a “rule probability” (or rule likelihood) It means instead of stating “Birds typically can fly” our user is able to write something like: –There is a “relatively high” probability that birds can fly (defeasible rule) –There is a “very high” probability that penguins cannot fly (defeasible rule) –Everybody can fly in an airplane (strict rule) 21 © OpenRules, Inc., 2014
  • 22. Defeasible Logic by OpenRules Our user may assume that Rule with a higher probability will in general defeat Rule with a smaller probability The rule probabilities may be expressed as: NEVER, VERY LOW, LOW, BELOW MID, MID, ABOVE MID, HIGH, VERY HIGH, ALWAYS Or using numbers 0 (NEVER), 1, 2, …, 99, and 100% (ALWAYS) A rule with probability ALWAYS (or not specified) means a strict rule 22 © OpenRules, Inc., 2014
  • 23. Defeasible Logic by OpenRules Actually we added only one optional column to our standard decision table template called “ActionProbability” Rule designer should be careful defining relative probabilities. For example, if we forget to specify the condition “Chicken is Yes” in the rule 5, it would not be clear either a scared penguin can fly or not. 23 © OpenRules, Inc., 2014
  • 24. How Does It Work The described logic is supported by OpenRules Engine known as “Rule Solver” that is based on a standard constraint solver Rule Solver creates a constraint satisfaction problem: –Constraints for all “strict” rules are simply posted as hard constraints –Constraints for all rules with probabilities are posted as soft constraints with a possible violation cost defined by its probability value Then Rule Solver automatically solves this problem by minimizing the total constraint violation for all defeasible rules 24 © OpenRules, Inc., 2014
  • 25. Benefits The described approach will work even when not all conflicts can be resolved: the Rule Solver will find a decision with minimal total conflicts Business analysts may express their preferences in an intuitive way as they do it in everyday life when they say: “There is a high probability of rain tonight” without any knowledge of the defeasible logic or the probability theory 25 © OpenRules, Inc., 2014
  • 26. Conclusion We did not want to create a false impression that all problems related to rule conflicts have been solved Our objective was to bring an attention to the importance of these issues and to show some possible ways for their resolution We expect that all major BR vendors gradually will add an automatic ability to solve rule conflicts to their product offerings 26 © OpenRules, Inc., 2014