SlideShare a Scribd company logo
1 of 27
Download to read offline
An Introduction to
   Business Rules with
       JBoss Drools

John Paulett
October 12, 2009
Goals
     Introduction to “business rules”


     High level overview of JBoss Drools


     Discussion of benefits and shortcomings




10/12/2009                                     2
Business Rules




10/12/2009                    3
Problem Domain
     Basic problem:
             how to model “business logic”


     In this context:
             “business logic” ≠ code between UI and DB
             “business logic” = policies of the business




10/12/2009                                                 4
Business Logic Examples
     Rate calculations at insurance company
       ●     Depends on laws, age, sex, location, previous
             history, desired coverage, etc.


     Critical lab values at hospital
       ●     Depends on age, previous values, other lab
             tests, diagnose, mandates, etc.




10/12/2009                                                5
Business Rule Engine
     Type of Expert System


     Two types of rules:
       ●     “Production (or Inference) Rules”
             –   If x, then y
             –   Often stateless
       ●     “Reaction Rules” (Complex Event Processing)
             –   Wait for set of events
             –   Stateful

10/12/2009                                                 6
Forward Chaining
     1) Iterate through antecedents (if …)


     2) Each time an antecedent is matched,
     add knowledge of consequent (then …)


     3) Go to #1, until goal reached




10/12/2009                                    7
Rete Algorithm
     Naïve forward chaining does not scale
     well as number of rules increases


     Efficient implementation using directed
     acyclic graph representation of rules


     Higher memory consumption for
     increased speed

10/12/2009                                     8
JBoss Drools




10/12/2009                  9
JBoss Drools Suite
     Guvnor – Business Rule Management
     System


     Expert – Production Rules


     Flow – Workflow


     Fusion – Complex Event Processing
10/12/2009                               10
Drools Expert
     Core Drools product


     Forward chaining rules with Rete


     Eclipse authoring plugin




10/12/2009                              11
Ways to Write Rules
     Technical Rule Language


     Custom Domain Specific Languages


     Guided Editor


     Decision Table


10/12/2009                              12
Technical Rule Language

  rule "Hello World"
      when
             m : Message( status == Message.HELLO, myMessage : message )
      then
             System.out.println( myMessage );
             m.setMessage( "Goodbye cruel world" );
             m.setStatus( Message.GOODBYE );
             update( m );
  end




10/12/2009                                                                 13
Custom DSLs
     Map “natural language” into Technical
     Rule Language




10/12/2009                                   14
Guided Editor




              From http://www.jboss.org/drools/drools-expert.html




10/12/2009                                                          15
Decision Table
     Excel XLS based




10/12/2009                     16
Drools Guvnor
     BRMS – Business Rule Management
     System


     Centralized knowledgebase


     Web-based rule authoring


     Versioning of rules
10/12/2009                             17
Drools Guvnor
     Manage rules through web console




                 From http://www.jboss.org/drools/drools-guvnor.html




10/12/2009                                                             18
Drools Guvnor
     Edit rules through web console




                  From http://www.jboss.org/drools/drools-guvnor.html




10/12/2009                                                              19
Drools Flow
     Workflow management




                From http://www.jboss.org/drools/drools-guvnor.html




10/12/2009                                                            20
Drools Fusion
     Extension to Drools Expert for temporal
     reasoning


     Detects relevant patterns in “cloud or
     stream of events”




10/12/2009                                     21
Discussion




10/12/2009                22
When To Use a Rules Engine
     Large set of rules, with complex
     branching


     Rules likely to change over time, likely out
     of sync with code changes


     Involve “business users” in creation &
     maintenance of rules

10/12/2009                                      23
Benefits
     Separates “business logic” from
     application code


     “Hot” changes of rules (no recompile)


     Improved performance for large rule sets


     Communicates rules more clearly than
     Java code
10/12/2009                                      24
Downsides
     New tool
       ●     Learning curve
       ●     Extra point of failure


     Overhead
       ●     Not practical for small rule sets




10/12/2009                                       25
Alternatives
     Java Rule Engine API - JSR 94


     Closed Source:
       ●     IBM's ILOG JRules, Fair Isaac's Blaze Advisor


     Open Source:
       ●     Jess, OpenRules, Zilonis, take


10/12/2009                                                   26
References
     http://www.jboss.org/drools/
     http://java.sun.com/developer/technicalArticles/J2SE/JavaRule.html
     http://java.sys-con.com/node/45082
     http://herzberg.ca.sandia.gov/guidelines.shtml




10/12/2009                                                            27

More Related Content

What's hot

Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Mark Proctor
 
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningDrools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningGeoffrey De Smet
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineAnil Allewar
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 OverviewMark Proctor
 
Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engineDuoyi Wu
 
How to Prepare for CKA Exam
How to Prepare for CKA ExamHow to Prepare for CKA Exam
How to Prepare for CKA ExamAlfie Chen
 
Devoxx 2012 hibernate envers
Devoxx 2012   hibernate enversDevoxx 2012   hibernate envers
Devoxx 2012 hibernate enversRomain Linsolas
 
The redux saga begins
The redux saga beginsThe redux saga begins
The redux saga beginsDaniel Franz
 
(Fios#03) 4. 파워셸 포렌식 조사 기법
(Fios#03) 4. 파워셸 포렌식 조사 기법(Fios#03) 4. 파워셸 포렌식 조사 기법
(Fios#03) 4. 파워셸 포렌식 조사 기법INSIGHT FORENSIC
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
Lets make a better react form
Lets make a better react formLets make a better react form
Lets make a better react formYao Nien Chung
 
Implantando e escalando kubernetes com rancher
Implantando e  escalando kubernetes com rancherImplantando e  escalando kubernetes com rancher
Implantando e escalando kubernetes com rancherClaudemir de Almeida Rosa
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)martincabrera
 
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinC* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinDataStax Academy
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deploymentsOdoo
 

What's hot (20)

Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planningDrools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
Drools Planner webinar (2011-06-15): Drools Planner optimizes automated planning
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
 
Virtual machine and javascript engine
Virtual machine and javascript engineVirtual machine and javascript engine
Virtual machine and javascript engine
 
How to Prepare for CKA Exam
How to Prepare for CKA ExamHow to Prepare for CKA Exam
How to Prepare for CKA Exam
 
Support distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcastSupport distributed computing and caching avec hazelcast
Support distributed computing and caching avec hazelcast
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
Devoxx 2012 hibernate envers
Devoxx 2012   hibernate enversDevoxx 2012   hibernate envers
Devoxx 2012 hibernate envers
 
React
React React
React
 
The redux saga begins
The redux saga beginsThe redux saga begins
The redux saga begins
 
React introduction
React introductionReact introduction
React introduction
 
Introduction à React
Introduction à ReactIntroduction à React
Introduction à React
 
(Fios#03) 4. 파워셸 포렌식 조사 기법
(Fios#03) 4. 파워셸 포렌식 조사 기법(Fios#03) 4. 파워셸 포렌식 조사 기법
(Fios#03) 4. 파워셸 포렌식 조사 기법
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
Lets make a better react form
Lets make a better react formLets make a better react form
Lets make a better react form
 
Implantando e escalando kubernetes com rancher
Implantando e  escalando kubernetes com rancherImplantando e  escalando kubernetes com rancher
Implantando e escalando kubernetes com rancher
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)
 
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinC* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deployments
 

Similar to Drools

JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEtsurdilovic
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info SheetMark Proctor
 
Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Dan Selman
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBug Italy
 
Gluster: where weve been - a history
Gluster: where weve been - a historyGluster: where weve been - a history
Gluster: where weve been - a historyJohn Mark Walker
 
How WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityHow WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityBruno Borges
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batchtimfanelli
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software designTech_MX
 
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Patrick Chanezon
 
JBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic PlatformJBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic Platformelliando dias
 
Rdbms Practical file diploma
Rdbms Practical file diploma Rdbms Practical file diploma
Rdbms Practical file diploma mustkeem khan
 
All the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSAll the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSJBug Italy
 
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Fabrice Bernhard
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformationMichael Dawson
 
Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02shubham gupta
 

Similar to Drools (20)

JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
 
Rules With Drools
Rules With DroolsRules With Drools
Rules With Drools
 
Rules with Drools
Rules with DroolsRules with Drools
Rules with Drools
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logic
 
Gluster: where weve been - a history
Gluster: where weve been - a historyGluster: where weve been - a history
Gluster: where weve been - a history
 
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
 
How WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityHow WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your Productivity
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batch
 
Quality control in a cloudy world
Quality control in a cloudy worldQuality control in a cloudy world
Quality control in a cloudy world
 
Software engineering principles in system software design
Software engineering principles in system software designSoftware engineering principles in system software design
Software engineering principles in system software design
 
Cloud foundry and openstackcloud
Cloud foundry and openstackcloudCloud foundry and openstackcloud
Cloud foundry and openstackcloud
 
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
 
JBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic PlatformJBoss Drools - Open-Source Business Logic Platform
JBoss Drools - Open-Source Business Logic Platform
 
Rdbms Practical file diploma
Rdbms Practical file diploma Rdbms Practical file diploma
Rdbms Practical file diploma
 
All the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSAll the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMS
 
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
 
Accelerate your digital transformation
Accelerate your digital transformationAccelerate your digital transformation
Accelerate your digital transformation
 
Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02Preparing forr12-140703020001-phpapp02
Preparing forr12-140703020001-phpapp02
 

More from John Paulett

GeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationGeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationJohn Paulett
 
XNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderXNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderJohn Paulett
 
XNAT Open Source Development
XNAT Open Source DevelopmentXNAT Open Source Development
XNAT Open Source DevelopmentJohn Paulett
 
XNAT Tuning & Monitoring
XNAT Tuning & MonitoringXNAT Tuning & Monitoring
XNAT Tuning & MonitoringJohn Paulett
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementJohn Paulett
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverJohn Paulett
 
Getting Started with (Distributed) Version Control
Getting Started with (Distributed) Version ControlGetting Started with (Distributed) Version Control
Getting Started with (Distributed) Version ControlJohn Paulett
 

More from John Paulett (8)

GeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationGeoDjango & HTML5 Geolocation
GeoDjango & HTML5 Geolocation
 
XNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderXNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC Uploader
 
XNAT Open Source Development
XNAT Open Source DevelopmentXNAT Open Source Development
XNAT Open Source Development
 
XNAT Tuning & Monitoring
XNAT Tuning & MonitoringXNAT Tuning & Monitoring
XNAT Tuning & Monitoring
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control Management
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
Automated Testing
Automated TestingAutomated Testing
Automated Testing
 
Getting Started with (Distributed) Version Control
Getting Started with (Distributed) Version ControlGetting Started with (Distributed) Version Control
Getting Started with (Distributed) Version Control
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Drools

  • 1. An Introduction to Business Rules with JBoss Drools John Paulett October 12, 2009
  • 2. Goals Introduction to “business rules” High level overview of JBoss Drools Discussion of benefits and shortcomings 10/12/2009 2
  • 4. Problem Domain Basic problem: how to model “business logic” In this context: “business logic” ≠ code between UI and DB “business logic” = policies of the business 10/12/2009 4
  • 5. Business Logic Examples Rate calculations at insurance company ● Depends on laws, age, sex, location, previous history, desired coverage, etc. Critical lab values at hospital ● Depends on age, previous values, other lab tests, diagnose, mandates, etc. 10/12/2009 5
  • 6. Business Rule Engine Type of Expert System Two types of rules: ● “Production (or Inference) Rules” – If x, then y – Often stateless ● “Reaction Rules” (Complex Event Processing) – Wait for set of events – Stateful 10/12/2009 6
  • 7. Forward Chaining 1) Iterate through antecedents (if …) 2) Each time an antecedent is matched, add knowledge of consequent (then …) 3) Go to #1, until goal reached 10/12/2009 7
  • 8. Rete Algorithm Naïve forward chaining does not scale well as number of rules increases Efficient implementation using directed acyclic graph representation of rules Higher memory consumption for increased speed 10/12/2009 8
  • 10. JBoss Drools Suite Guvnor – Business Rule Management System Expert – Production Rules Flow – Workflow Fusion – Complex Event Processing 10/12/2009 10
  • 11. Drools Expert Core Drools product Forward chaining rules with Rete Eclipse authoring plugin 10/12/2009 11
  • 12. Ways to Write Rules Technical Rule Language Custom Domain Specific Languages Guided Editor Decision Table 10/12/2009 12
  • 13. Technical Rule Language rule "Hello World" when m : Message( status == Message.HELLO, myMessage : message ) then System.out.println( myMessage ); m.setMessage( "Goodbye cruel world" ); m.setStatus( Message.GOODBYE ); update( m ); end 10/12/2009 13
  • 14. Custom DSLs Map “natural language” into Technical Rule Language 10/12/2009 14
  • 15. Guided Editor From http://www.jboss.org/drools/drools-expert.html 10/12/2009 15
  • 16. Decision Table Excel XLS based 10/12/2009 16
  • 17. Drools Guvnor BRMS – Business Rule Management System Centralized knowledgebase Web-based rule authoring Versioning of rules 10/12/2009 17
  • 18. Drools Guvnor Manage rules through web console From http://www.jboss.org/drools/drools-guvnor.html 10/12/2009 18
  • 19. Drools Guvnor Edit rules through web console From http://www.jboss.org/drools/drools-guvnor.html 10/12/2009 19
  • 20. Drools Flow Workflow management From http://www.jboss.org/drools/drools-guvnor.html 10/12/2009 20
  • 21. Drools Fusion Extension to Drools Expert for temporal reasoning Detects relevant patterns in “cloud or stream of events” 10/12/2009 21
  • 23. When To Use a Rules Engine Large set of rules, with complex branching Rules likely to change over time, likely out of sync with code changes Involve “business users” in creation & maintenance of rules 10/12/2009 23
  • 24. Benefits Separates “business logic” from application code “Hot” changes of rules (no recompile) Improved performance for large rule sets Communicates rules more clearly than Java code 10/12/2009 24
  • 25. Downsides New tool ● Learning curve ● Extra point of failure Overhead ● Not practical for small rule sets 10/12/2009 25
  • 26. Alternatives Java Rule Engine API - JSR 94 Closed Source: ● IBM's ILOG JRules, Fair Isaac's Blaze Advisor Open Source: ● Jess, OpenRules, Zilonis, take 10/12/2009 26
  • 27. References http://www.jboss.org/drools/ http://java.sun.com/developer/technicalArticles/J2SE/JavaRule.html http://java.sys-con.com/node/45082 http://herzberg.ca.sandia.gov/guidelines.shtml 10/12/2009 27