SlideShare a Scribd company logo
1 of 11
- L A K S H M I P R A T Y U S H A K U P P A
DROOLS
1
CONTEXT
• Java enterprise level application can be split into
three parts −
• User Interface
• Service layer
• Business layer
• Drool is a standard way to handle the business
layer.
• It is a collection of tools that separates logic and
data within business processes.
2
WHAT IS DROOLS ?
• Drools is a Business Logic integration Platform (BLiP).
• It is written in Java.
• It is an open source project that is backed by JBoss
and Red Hat, Inc.
3
ADVANTAGES
• Declarative Programming
• Rules are written in less complex language.
• Speed and Scalability
• One can add new rules without having to modify the
existing rules and these are very quickly processed.
• Centralization of Knowledge
• By using Rules, you create a repository of knowledge (a
knowledge base) which is executable.
• Tool Integration
• Tools such as Eclipse provide ways to edit and manage rules
and get immediate feedback, validation, and content
assistance.
4
KNOWLEDGE BASE
• Interface that manages a collection of rules,
processes, and internal type.
• The main purpose of Knowledge Base is to store
and reuse them because their creation is
expensive.
• Knowledge Base provides methods for creating
knowledge sessions.
5
KNOWLEDGE SESSIONS
• It is the main interface for interacting with the Drools
Engine.
• The knowledge session can be of two types:
• Stateless Knowledge Session
• Stateful Knowledge Session.
6
STATELESS KNOWLEDGE SESSION
• It is a stateless session that forms the simplest use case, not
utilizing inference.
• It can be called like a function, passing it some data and then
receiving some results back.
• Examples:
• Validation
• Is this person eligible for a mortgage?
• Calculation
• Compute a mortgage premium.
• Routing and Filtering
• Filter incoming messages, such as emails, into folders.
• Send incoming messages to a destination
7
STATEFUL KNOWLEDGE SESSION
• Stateful sessions are longer lived and allow iterative
changes over time.
• Some common use cases for Stateful sessions
include:
• Monitoring
• Stock market monitoring and analysis for semi-automatic buying.
• Diagnostics
• Fault finding, medical diagnostics
• Logistics
• Parcel tracking and delivery provisioning
8
KNOWLEDGE BUILDER
• The interface is responsible for building a
KnowledgePackage from knowledge definitions
(rules, processes, types).
9
EXAMPLE
The objects that the rule
file accesses should be
added to the session.
A kmodule.xml file
defining in a
declaratively way
the KieBases
and KieSessions that can
be created from it.
10
RULE FILE
11

More Related Content

What's hot

Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By Step
Guo Albert
 
Hibernate complete Training
Hibernate complete TrainingHibernate complete Training
Hibernate complete Training
sourabh aggarwal
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentation
John Slick
 
Sql Considered Harmful
Sql Considered HarmfulSql Considered Harmful
Sql Considered Harmful
coderanger
 

What's hot (20)

Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Simple Jdbc With Spring 2.5
Simple Jdbc With Spring 2.5Simple Jdbc With Spring 2.5
Simple Jdbc With Spring 2.5
 
Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By Step
 
Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)Spring Data - Intro (Odessa Java TechTalks)
Spring Data - Intro (Odessa Java TechTalks)
 
Hibernate complete Training
Hibernate complete TrainingHibernate complete Training
Hibernate complete Training
 
Spring framework part 2
Spring framework part 2Spring framework part 2
Spring framework part 2
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
 
jpa-hibernate-presentation
jpa-hibernate-presentationjpa-hibernate-presentation
jpa-hibernate-presentation
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examples
 
Hibernate An Introduction
Hibernate An IntroductionHibernate An Introduction
Hibernate An Introduction
 
Sql Considered Harmful
Sql Considered HarmfulSql Considered Harmful
Sql Considered Harmful
 
Java persistence api 2.1
Java persistence api 2.1Java persistence api 2.1
Java persistence api 2.1
 
hibernate with JPA
hibernate with JPAhibernate with JPA
hibernate with JPA
 
JPA and Hibernate
JPA and HibernateJPA and Hibernate
JPA and Hibernate
 
Hibernate Basic Concepts - Presentation
Hibernate Basic Concepts - PresentationHibernate Basic Concepts - Presentation
Hibernate Basic Concepts - Presentation
 
Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)
 
OOP with Java - Continued
OOP with Java - Continued OOP with Java - Continued
OOP with Java - Continued
 
hibernate
hibernatehibernate
hibernate
 
Java Persistence API
Java Persistence APIJava Persistence API
Java Persistence API
 

Viewers also liked (7)

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 Introduction
Drools IntroductionDrools Introduction
Drools Introduction
 
Drools
DroolsDrools
Drools
 
Jboss jbpm and drools 1 introduction to drools architecture
Jboss jbpm and drools   1 introduction to drools architectureJboss jbpm and drools   1 introduction to drools architecture
Jboss jbpm and drools 1 introduction to drools architecture
 
Drools BeJUG 2010
Drools BeJUG 2010Drools BeJUG 2010
Drools BeJUG 2010
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep dive
 

Similar to Drools Introduction

Scientific Workflows Systems :In Drug discovery informatics
Scientific Workflows Systems :In Drug discovery informaticsScientific Workflows Systems :In Drug discovery informatics
Scientific Workflows Systems :In Drug discovery informatics
Khaled Tumbi
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
bodo-con
 
Ramesh_CV_4_Years_Experience
Ramesh_CV_4_Years_ExperienceRamesh_CV_4_Years_Experience
Ramesh_CV_4_Years_Experience
Ramesh Thadivada
 

Similar to Drools Introduction (20)

Software development planning and essentials
Software development planning and essentialsSoftware development planning and essentials
Software development planning and essentials
 
Software development planning and essentials
Software development planning and essentialsSoftware development planning and essentials
Software development planning and essentials
 
Scientific Workflows Systems :In Drug discovery informatics
Scientific Workflows Systems :In Drug discovery informaticsScientific Workflows Systems :In Drug discovery informatics
Scientific Workflows Systems :In Drug discovery informatics
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Sdlc model
Sdlc modelSdlc model
Sdlc model
 
OpenDJ - An Introduction
OpenDJ - An IntroductionOpenDJ - An Introduction
OpenDJ - An Introduction
 
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
Apex Enterprise Patterns Galore - Boston, MA dev group meeting 062719
 
DevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts DescriptionDevOps Introduction - Main Concepts Description
DevOps Introduction - Main Concepts Description
 
Ramesh_CV_4_Years_Experience
Ramesh_CV_4_Years_ExperienceRamesh_CV_4_Years_Experience
Ramesh_CV_4_Years_Experience
 
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
Domain Driven Design Ruby Ways -  JURNAL 05/10/2017Domain Driven Design Ruby Ways -  JURNAL 05/10/2017
Domain Driven Design Ruby Ways - JURNAL 05/10/2017
 
Success with SharePoint
Success with SharePointSuccess with SharePoint
Success with SharePoint
 
Why advanced monitoring is key for healthy
Why advanced monitoring is key for healthyWhy advanced monitoring is key for healthy
Why advanced monitoring is key for healthy
 
Towards an Agile approach to building application profiles
Towards an Agile approach to building application profilesTowards an Agile approach to building application profiles
Towards an Agile approach to building application profiles
 
Patching is Your Friend in the New World Order of EPM and ERP Cloud
Patching is Your Friend in the New World Order of EPM and ERP CloudPatching is Your Friend in the New World Order of EPM and ERP Cloud
Patching is Your Friend in the New World Order of EPM and ERP Cloud
 
Inventory managment system
Inventory managment systemInventory managment system
Inventory managment system
 
Database part1-
Database part1-Database part1-
Database part1-
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
Introduction to GoLang
Introduction to GoLangIntroduction to GoLang
Introduction to GoLang
 
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
 
The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)The technology of the Human Protein Reference Database (draft, 2003)
The technology of the Human Protein Reference Database (draft, 2003)
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

Drools Introduction

  • 1. - L A K S H M I P R A T Y U S H A K U P P A DROOLS 1
  • 2. CONTEXT • Java enterprise level application can be split into three parts − • User Interface • Service layer • Business layer • Drool is a standard way to handle the business layer. • It is a collection of tools that separates logic and data within business processes. 2
  • 3. WHAT IS DROOLS ? • Drools is a Business Logic integration Platform (BLiP). • It is written in Java. • It is an open source project that is backed by JBoss and Red Hat, Inc. 3
  • 4. ADVANTAGES • Declarative Programming • Rules are written in less complex language. • Speed and Scalability • One can add new rules without having to modify the existing rules and these are very quickly processed. • Centralization of Knowledge • By using Rules, you create a repository of knowledge (a knowledge base) which is executable. • Tool Integration • Tools such as Eclipse provide ways to edit and manage rules and get immediate feedback, validation, and content assistance. 4
  • 5. KNOWLEDGE BASE • Interface that manages a collection of rules, processes, and internal type. • The main purpose of Knowledge Base is to store and reuse them because their creation is expensive. • Knowledge Base provides methods for creating knowledge sessions. 5
  • 6. KNOWLEDGE SESSIONS • It is the main interface for interacting with the Drools Engine. • The knowledge session can be of two types: • Stateless Knowledge Session • Stateful Knowledge Session. 6
  • 7. STATELESS KNOWLEDGE SESSION • It is a stateless session that forms the simplest use case, not utilizing inference. • It can be called like a function, passing it some data and then receiving some results back. • Examples: • Validation • Is this person eligible for a mortgage? • Calculation • Compute a mortgage premium. • Routing and Filtering • Filter incoming messages, such as emails, into folders. • Send incoming messages to a destination 7
  • 8. STATEFUL KNOWLEDGE SESSION • Stateful sessions are longer lived and allow iterative changes over time. • Some common use cases for Stateful sessions include: • Monitoring • Stock market monitoring and analysis for semi-automatic buying. • Diagnostics • Fault finding, medical diagnostics • Logistics • Parcel tracking and delivery provisioning 8
  • 9. KNOWLEDGE BUILDER • The interface is responsible for building a KnowledgePackage from knowledge definitions (rules, processes, types). 9
  • 10. EXAMPLE The objects that the rule file accesses should be added to the session. A kmodule.xml file defining in a declaratively way the KieBases and KieSessions that can be created from it. 10