SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
GETTING STARTED
WITH DROOLS
MAURICIO SALATINO - ESTEBAN ALIVERTI
JBUG DENMARK APRIL - 2016
GETTING STARTED WITH DROOLS
AGENDA
▸ First steps
▸ What is Drools?
▸ DRL language
▸ Execution Cycle
▸ Our First Drools Project
▸ Drools Common Usage
▸ Drools Common Pitfalls
▸ Integrating Drools
▸ Roadmap (7.x version)
GETTING STARTED WITH DROOLS
ABOUT US
▸ Mauricio Salatino (aka Salaboy)
▸ Senior Software Engineer @ Red Hat
▸ Drools & jBPM contributor since 2009
▸ http://salaboy.com
▸ Esteban Aliverti
▸ Senior Software Engineer @ Cognitive
▸ Drools contributor since 2010
▸ http://ilesteban.wordpress.com
GETTING STARTED WITH DROOLS
WHAT IS DROOLS?
▸ Lightweight Rule Engine (a library)
▸ Rule Engine -> Inference Engine
▸ Data Driven -> Forward Chaining Algorithms
▸ Goal Driven -> Backward Chaining Algorithms
▸ Change of paradigm from Imperative (Java) to Declarative
GETTING STARTED WITH DROOLS
RULE STRUCTURE
▸ rule “Large Orders require approval”

//<rule attributes>

When // Right Hand Side

Order(items.size >= 10 && total >= 100000)

Then // Left Hand Side

// Trigger approval process

end

GETTING STARTED WITH DROOLS
DROOLS ENGINE OVERVIEW (STATIC)
GETTING STARTED WITH DROOLS
DROOLS ENGINE OVERVIEW (RUNTIME)
GETTING STARTED WITH DROOLS
RULE EXECUTION CYCLE
GETTING STARTED WITH DROOLS
DROOLS HISTORY
▸ 2003: Created by Mark Proctor and Bob McWhirter
▸ 2005: Acquired by JBoss
▸ 2007: Drools 3.x introduced the first version of the Rete OO
Algorithm
▸ 2009: Drools 4.x focused on performance and production ready
▸ 2012: Drools 5.x focused on integration and unification of Drools,
jBPM and CEP (KIE was born)
▸ 2014: Drools 6.x focused on infrastructure, deployment and tooling
GETTING STARTED WITH DROOLS
KIE PLATFORM
▸ Drools
▸ Drools CEP (Fusion)
▸ jBPM
▸ OptaPlanner
▸ KIE Server (Drools, jBPM & CEP unified server)
▸ Uberfire (uberfireframework.com)
▸ KIE Workbench (Drools, jBPM, Optaplanner Authoring, Runtime &
monitoring)
▸ KIE Drools Workbench (Drools Authoring)
GETTING STARTED WITH DROOLS
KIE APIS
▸ KieContainer
▸ KieBase
▸ KieSession
▸ insert(Object)
▸ retract(FactHandle)
▸ update(FactHandle, Object)
▸ fireAllRules() / fireAllRules(int)
▸ KieScanner
▸ kmodule.xml
DROOLS SPECIFICS
GETTING STARTED WITH DROOLS
OUR FIRST DROOLS PROJECT
▸ Simple JAR Java Maven Project
▸ Add Maven Dependencies
▸ drools-compiler
▸ drools-core (transitive)
▸ kie-api (transitive)
▸ CDI Enabled
▸ cdi-api
▸ weld-se-core
▸ beans.xml
▸ KIE specific
▸ kmodule.xml
▸ conventions over configurations
GETTING STARTED WITH DROOLS
RULES POWER
▸ Any Java Model (non-intrusive)
▸ Filter Data (Simple Filters)
▸ Correlate Data (Multiple filters between patterns)
▸ Accumulations / Aggregations (accumulate functions)
▸ Inference Chain
▸ Justification Log
▸ Query Data
▸ Truth Maintenance System(TMS)
GETTING STARTED WITH DROOLS
COMMON PITFALLS
▸ Start simple, don’t over complicate things
▸ Compare with if/else statements
▸ Too much logic on the RHS
▸ Infinite Loop
▸ Complex (Nested) Models - Facts VS Non-Facts
▸ Cross Product - DB/SQL analogy
▸ From/Eval executed multiple time in RHS
▸ External Service Calls (Sync calls)
▸ Persistence
GETTING STARTED WITH DROOLS
INTEGRATE DROOLS
▸ Inside your app (Embedded)
▸ Knowledge as a Service
▸ Custom
▸ Kie Server
▸ Others
▸ CDI
▸ Spring
▸ Camel
GETTING STARTED WITH DROOLS
ROADMAP (7.X)
▸ Cloud Deployments
▸ Tooling for the Cloud
▸ Self-service applications (Future)
▸ Different Vertical’s Packages
▸ API refactoring towards
▸ Flexibility
▸ Services
▸ Composition
▸ Drools language improvements
▸ Phreak tuning and fragmentation for distribution
GETTING STARTED WITH DROOLS
COMMUNITY
▸ www.drools.org / www.jbpm.org
▸ Drools & jBPM Mailing lists
▸ Report Bugs & Suggest Features: jira.jboss.org
▸ irc.freenode.net
▸ #drools
▸ #jbpm
▸ Blogs:
▸ blog.athico.com
▸ salaboy.com
▸ ilesteban.wordpress.com
QUESTIONS?
GETTING STARTED WITH DROOLS
GETTING STARTED WITH DROOLS
RETE
GETTING STARTED WITH DROOLS
PHREAK

Weitere ähnliche Inhalte

Was ist angesagt?

Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
Mark Proctor
 
Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)
Geoffrey De Smet
 
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
DB エンジニアのマイクロサービス入門〜Oracle Database と  Docker ではじめる API サービス〜DB エンジニアのマイクロサービス入門〜Oracle Database と  Docker ではじめる API サービス〜
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
Michitoshi Yoshida
 
Adventures in Multithreaded Core Data
Adventures in Multithreaded Core DataAdventures in Multithreaded Core Data
Adventures in Multithreaded Core Data
Inferis
 
Hybrid rule engines (rulesfest 2010)
Hybrid rule engines (rulesfest 2010)Hybrid rule engines (rulesfest 2010)
Hybrid rule engines (rulesfest 2010)
Geoffrey De Smet
 

Was ist angesagt? (20)

Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
 
Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)Developing applications with rules, workflow and event processing (it@cork 2010)
Developing applications with rules, workflow and event processing (it@cork 2010)
 
JBoss World 2011 - Drools
JBoss World 2011 - DroolsJBoss World 2011 - Drools
JBoss World 2011 - Drools
 
Intro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUGIntro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUG
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
Sbt職人のススメ
Sbt職人のススメSbt職人のススメ
Sbt職人のススメ
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Hazelcast
HazelcastHazelcast
Hazelcast
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
Google App Engine Developer - Day4
Google App Engine Developer - Day4Google App Engine Developer - Day4
Google App Engine Developer - Day4
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
DB エンジニアのマイクロサービス入門〜Oracle Database と  Docker ではじめる API サービス〜DB エンジニアのマイクロサービス入門〜Oracle Database と  Docker ではじめる API サービス〜
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
 
아파트 정보를 이용한 ELK stack 활용 - 오근문
아파트 정보를 이용한 ELK stack 활용 - 오근문아파트 정보를 이용한 ELK stack 활용 - 오근문
아파트 정보를 이용한 ELK stack 활용 - 오근문
 
Adventures in Multithreaded Core Data
Adventures in Multithreaded Core DataAdventures in Multithreaded Core Data
Adventures in Multithreaded Core Data
 
Hybrid rule engines (rulesfest 2010)
Hybrid rule engines (rulesfest 2010)Hybrid rule engines (rulesfest 2010)
Hybrid rule engines (rulesfest 2010)
 
Cassandra 3.0 Awesomeness
Cassandra 3.0 AwesomenessCassandra 3.0 Awesomeness
Cassandra 3.0 Awesomeness
 
Distributed Caching in Kubernetes with Hazelcast
Distributed Caching in Kubernetes with HazelcastDistributed Caching in Kubernetes with Hazelcast
Distributed Caching in Kubernetes with Hazelcast
 

Andere mochten auch

Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
Mario Fusco
 

Andere mochten auch (10)

Drools Workshop @JBCNCONF 2016
Drools Workshop @JBCNCONF 2016Drools Workshop @JBCNCONF 2016
Drools Workshop @JBCNCONF 2016
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
 
Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools Developing Configurable and High Performance Apps in Drools
Developing Configurable and High Performance Apps in Drools
 
Rule Engine Evaluation for Complex Event Processing
Rule Engine Evaluation for Complex Event ProcessingRule Engine Evaluation for Complex Event Processing
Rule Engine Evaluation for Complex Event Processing
 
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
Rule Engine & Drools
Rule Engine & DroolsRule Engine & Drools
Rule Engine & Drools
 
Introduction to Apache Apex
Introduction to Apache ApexIntroduction to Apache Apex
Introduction to Apache Apex
 
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
 

Ähnlich wie Getting Started With #Drools 6 Slides - JBUG Denmark

Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
Eric Bottard
 

Ähnlich wie Getting Started With #Drools 6 Slides - JBUG Denmark (20)

Scala, Functional Programming and Team Productivity
Scala, Functional Programming and Team ProductivityScala, Functional Programming and Team Productivity
Scala, Functional Programming and Team Productivity
 
Intro to DevOps
Intro to DevOpsIntro to DevOps
Intro to DevOps
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
 
Terraform 101
Terraform 101Terraform 101
Terraform 101
 
Corwin on Containers
Corwin on ContainersCorwin on Containers
Corwin on Containers
 
A Java Developers first Clojure project
A Java Developers first Clojure projectA Java Developers first Clojure project
A Java Developers first Clojure project
 
October 2013 HUG: Oozie 4.x
October 2013 HUG: Oozie 4.xOctober 2013 HUG: Oozie 4.x
October 2013 HUG: Oozie 4.x
 
To AWS with Ansible
To AWS with AnsibleTo AWS with Ansible
To AWS with Ansible
 
AI&BigData Lab. Александр Конопко "Celos: оркестрирование и тестирование зада...
AI&BigData Lab. Александр Конопко "Celos: оркестрирование и тестирование зада...AI&BigData Lab. Александр Конопко "Celos: оркестрирование и тестирование зада...
AI&BigData Lab. Александр Конопко "Celos: оркестрирование и тестирование зада...
 
Hadoop Pig
Hadoop PigHadoop Pig
Hadoop Pig
 
CIlib 2.0: Rethinking Implementation
CIlib 2.0: Rethinking ImplementationCIlib 2.0: Rethinking Implementation
CIlib 2.0: Rethinking Implementation
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)A Groovy Kind of Java (San Francisco Java User Group)
A Groovy Kind of Java (San Francisco Java User Group)
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Two scoops of Django - Deployment
Two scoops of Django - DeploymentTwo scoops of Django - Deployment
Two scoops of Django - Deployment
 
Why gradle
Why gradle Why gradle
Why gradle
 
Micro-datacenter chaos monkeys!
Micro-datacenter chaos monkeys! Micro-datacenter chaos monkeys!
Micro-datacenter chaos monkeys!
 
Whats all the FaaS About
Whats all the FaaS AboutWhats all the FaaS About
Whats all the FaaS About
 

Mehr von Mauricio (Salaboy) Salatino

Mehr von Mauricio (Salaboy) Salatino (20)

Devoxx UK - Platforms on top of K8s
Devoxx UK - Platforms on top of K8sDevoxx UK - Platforms on top of K8s
Devoxx UK - Platforms on top of K8s
 
WTF_is_SRE_DeveloperEnabledPlatforms.pdf
WTF_is_SRE_DeveloperEnabledPlatforms.pdfWTF_is_SRE_DeveloperEnabledPlatforms.pdf
WTF_is_SRE_DeveloperEnabledPlatforms.pdf
 
Lessons Learnt from creating platforms on Kubernetes @ Rejekts
Lessons Learnt from creating platforms on Kubernetes @ RejektsLessons Learnt from creating platforms on Kubernetes @ Rejekts
Lessons Learnt from creating platforms on Kubernetes @ Rejekts
 
Building Developer Experiences for the Cloud .pdf
Building Developer Experiences for the Cloud .pdfBuilding Developer Experiences for the Cloud .pdf
Building Developer Experiences for the Cloud .pdf
 
KUBEDAY - JAPAN 2022 - Building FaaS Platforms.pdf
KUBEDAY - JAPAN  2022 - Building FaaS Platforms.pdfKUBEDAY - JAPAN  2022 - Building FaaS Platforms.pdf
KUBEDAY - JAPAN 2022 - Building FaaS Platforms.pdf
 
The Challenges of building Cloud Native Platforms
The Challenges of building Cloud Native PlatformsThe Challenges of building Cloud Native Platforms
The Challenges of building Cloud Native Platforms
 
Functions Working Group Update - August 2022.pdf
Functions Working Group Update - August 2022.pdfFunctions Working Group Update - August 2022.pdf
Functions Working Group Update - August 2022.pdf
 
JBCNConf 2022: Go vs Java (Kubernetes)
JBCNConf 2022: Go vs Java (Kubernetes)JBCNConf 2022: Go vs Java (Kubernetes)
JBCNConf 2022: Go vs Java (Kubernetes)
 
Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX - 2022
Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX -  2022 Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX -  2022
Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX - 2022
 
Spring I/O 2022: Knative and Spring - Bringing back the `func`
Spring I/O 2022: Knative and Spring - Bringing back the `func`Spring I/O 2022: Knative and Spring - Bringing back the `func`
Spring I/O 2022: Knative and Spring - Bringing back the `func`
 
KnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative FunctionsKnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative Functions
 
Knative Maintainers KubeConEU 22 Knative Overview and Update
Knative Maintainers KubeConEU 22 Knative Overview and UpdateKnative Maintainers KubeConEU 22 Knative Overview and Update
Knative Maintainers KubeConEU 22 Knative Overview and Update
 
CDEventsCon Expanding Interoperability in the CD ecosystem
CDEventsCon Expanding Interoperability in the CD ecosystemCDEventsCon Expanding Interoperability in the CD ecosystem
CDEventsCon Expanding Interoperability in the CD ecosystem
 
A Polyglot Developer Experience on Kubernetes - KubeCon EU Valencia
A Polyglot Developer Experience on Kubernetes - KubeCon EU ValenciaA Polyglot Developer Experience on Kubernetes - KubeCon EU Valencia
A Polyglot Developer Experience on Kubernetes - KubeCon EU Valencia
 
Pave the Golden Path On Your Internal Platform
Pave the Golden Path On Your Internal PlatformPave the Golden Path On Your Internal Platform
Pave the Golden Path On Your Internal Platform
 
Knative and Spring - Bringing back the func.pdf
Knative and Spring - Bringing back the func.pdfKnative and Spring - Bringing back the func.pdf
Knative and Spring - Bringing back the func.pdf
 
KCD Guatemala - Abstracciones sobre Abstracciones
KCD Guatemala - Abstracciones sobre AbstraccionesKCD Guatemala - Abstracciones sobre Abstracciones
KCD Guatemala - Abstracciones sobre Abstracciones
 
KubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS Offering
KubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS OfferingKubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS Offering
KubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS Offering
 
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with KnativeCloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
 
Intro to the Cloud with Knative (Spanish)
Intro to the Cloud with Knative (Spanish) Intro to the Cloud with Knative (Spanish)
Intro to the Cloud with Knative (Spanish)
 

Kürzlich hochgeladen

%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Kürzlich hochgeladen (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 

Getting Started With #Drools 6 Slides - JBUG Denmark

  • 1. GETTING STARTED WITH DROOLS MAURICIO SALATINO - ESTEBAN ALIVERTI JBUG DENMARK APRIL - 2016
  • 2. GETTING STARTED WITH DROOLS AGENDA ▸ First steps ▸ What is Drools? ▸ DRL language ▸ Execution Cycle ▸ Our First Drools Project ▸ Drools Common Usage ▸ Drools Common Pitfalls ▸ Integrating Drools ▸ Roadmap (7.x version)
  • 3. GETTING STARTED WITH DROOLS ABOUT US ▸ Mauricio Salatino (aka Salaboy) ▸ Senior Software Engineer @ Red Hat ▸ Drools & jBPM contributor since 2009 ▸ http://salaboy.com ▸ Esteban Aliverti ▸ Senior Software Engineer @ Cognitive ▸ Drools contributor since 2010 ▸ http://ilesteban.wordpress.com
  • 4. GETTING STARTED WITH DROOLS WHAT IS DROOLS? ▸ Lightweight Rule Engine (a library) ▸ Rule Engine -> Inference Engine ▸ Data Driven -> Forward Chaining Algorithms ▸ Goal Driven -> Backward Chaining Algorithms ▸ Change of paradigm from Imperative (Java) to Declarative
  • 5. GETTING STARTED WITH DROOLS RULE STRUCTURE ▸ rule “Large Orders require approval”
 //<rule attributes>
 When // Right Hand Side
 Order(items.size >= 10 && total >= 100000)
 Then // Left Hand Side
 // Trigger approval process
 end

  • 6. GETTING STARTED WITH DROOLS DROOLS ENGINE OVERVIEW (STATIC)
  • 7. GETTING STARTED WITH DROOLS DROOLS ENGINE OVERVIEW (RUNTIME)
  • 8. GETTING STARTED WITH DROOLS RULE EXECUTION CYCLE
  • 9. GETTING STARTED WITH DROOLS DROOLS HISTORY ▸ 2003: Created by Mark Proctor and Bob McWhirter ▸ 2005: Acquired by JBoss ▸ 2007: Drools 3.x introduced the first version of the Rete OO Algorithm ▸ 2009: Drools 4.x focused on performance and production ready ▸ 2012: Drools 5.x focused on integration and unification of Drools, jBPM and CEP (KIE was born) ▸ 2014: Drools 6.x focused on infrastructure, deployment and tooling
  • 10. GETTING STARTED WITH DROOLS KIE PLATFORM ▸ Drools ▸ Drools CEP (Fusion) ▸ jBPM ▸ OptaPlanner ▸ KIE Server (Drools, jBPM & CEP unified server) ▸ Uberfire (uberfireframework.com) ▸ KIE Workbench (Drools, jBPM, Optaplanner Authoring, Runtime & monitoring) ▸ KIE Drools Workbench (Drools Authoring)
  • 11. GETTING STARTED WITH DROOLS KIE APIS ▸ KieContainer ▸ KieBase ▸ KieSession ▸ insert(Object) ▸ retract(FactHandle) ▸ update(FactHandle, Object) ▸ fireAllRules() / fireAllRules(int) ▸ KieScanner ▸ kmodule.xml DROOLS SPECIFICS
  • 12. GETTING STARTED WITH DROOLS OUR FIRST DROOLS PROJECT ▸ Simple JAR Java Maven Project ▸ Add Maven Dependencies ▸ drools-compiler ▸ drools-core (transitive) ▸ kie-api (transitive) ▸ CDI Enabled ▸ cdi-api ▸ weld-se-core ▸ beans.xml ▸ KIE specific ▸ kmodule.xml ▸ conventions over configurations
  • 13. GETTING STARTED WITH DROOLS RULES POWER ▸ Any Java Model (non-intrusive) ▸ Filter Data (Simple Filters) ▸ Correlate Data (Multiple filters between patterns) ▸ Accumulations / Aggregations (accumulate functions) ▸ Inference Chain ▸ Justification Log ▸ Query Data ▸ Truth Maintenance System(TMS)
  • 14. GETTING STARTED WITH DROOLS COMMON PITFALLS ▸ Start simple, don’t over complicate things ▸ Compare with if/else statements ▸ Too much logic on the RHS ▸ Infinite Loop ▸ Complex (Nested) Models - Facts VS Non-Facts ▸ Cross Product - DB/SQL analogy ▸ From/Eval executed multiple time in RHS ▸ External Service Calls (Sync calls) ▸ Persistence
  • 15. GETTING STARTED WITH DROOLS INTEGRATE DROOLS ▸ Inside your app (Embedded) ▸ Knowledge as a Service ▸ Custom ▸ Kie Server ▸ Others ▸ CDI ▸ Spring ▸ Camel
  • 16. GETTING STARTED WITH DROOLS ROADMAP (7.X) ▸ Cloud Deployments ▸ Tooling for the Cloud ▸ Self-service applications (Future) ▸ Different Vertical’s Packages ▸ API refactoring towards ▸ Flexibility ▸ Services ▸ Composition ▸ Drools language improvements ▸ Phreak tuning and fragmentation for distribution
  • 17. GETTING STARTED WITH DROOLS COMMUNITY ▸ www.drools.org / www.jbpm.org ▸ Drools & jBPM Mailing lists ▸ Report Bugs & Suggest Features: jira.jboss.org ▸ irc.freenode.net ▸ #drools ▸ #jbpm ▸ Blogs: ▸ blog.athico.com ▸ salaboy.com ▸ ilesteban.wordpress.com
  • 19. GETTING STARTED WITH DROOLS RETE
  • 20. GETTING STARTED WITH DROOLS PHREAK