Master Drools
Tags: Software Architecture
How to use Drools Rule Engine to decouple complex business decision trees into individual simple to read rules
Last updated 2022-01-10 | 4.3
- program rules in Drools domain specific language- detect problems and patterns in software development that are good to be solved with a rule engine like Drools
- decouple complex decision trees into individual simple to understand rules
What you'll learn
* Requirements
* You should have basic understanding of Java programmingDescription
We learn Drools DSL (Drools programming language) and see what kind of problems Drools works best with.
This course comes with a Java project that has all the code we look throughout this course. You are encouraged to run the code yourself to get better understanding.
We also cover some of the best practises when building rule engine like Drools.
After completing this course you are confident when to youse Drools in a project and how to write business rules in Drools DSL.
Who this course is for:
- Developers and system architects who need to understand what a rule engine is and which type of problems can be solved with it
- Anyone who needs to write rules in Drools DSL programming language
- Developers and system architects needing more info about adding Drools rule engine to their project
Course content
8 sections • 48 lectures
Introduction to course Preview 01:02
What is a Rule Engine? Preview 11:10
How to Design Rules and When (not) to Use Drools. Preview 03:39
Introduction to Drools Language Syntax Preview 07:04
Structure of Example Code Preview 05:18
We look at the example code I have created in Github: https://github.com/aasaru/drools-training
Get example code running with IntelliJ IDEA Community Edition Preview 04:46
Get example code running with Eclipse Preview 05:23
NB! After filming this part newer Drools version has been released and I have updated the source code. Please open pom.xml and find out the correct version.
Introduction to Stateless Sessions Preview 03:20
Step1: First two rules to validate passports Preview 07:02
Step2: Split a rule Preview 02:30
Step3: Bind a variable Preview 04:44
Step4: Using the bound variable Preview 02:32
Steps 5 and 6: Avoid repetitions Preview 06:04
Stateless Sessions Summary Preview 00:53
Introduction to Stateful Sessions Preview 01:48
Step1: Modify Object in the Middle of Session Preview 05:35
Step2: Inference Preview 04:27
Stateful Sessions Summary Preview 00:44
Introduction to Cross Products Preview 04:18
Step1: Join Visa Application to a Passport Preview 07:04
Fixed a bug in upcoming lecture Preview 00:18
Step2: Is Passport Valid 6 Months After Trip? Preview 06:57
Step3: When setting a value check that property is not already with this value Preview 03:24
Pattern Matching and Cross Products Summary Preview 03:12
Intro to Adding New Facts & Setting Execution Order Preview 01:07
Rule Dialect Change Preview 00:37
You can write Drools rules in either "java" or in "mvel" dialect.
Here I explain the difference of them and why I changed section06 code to use "java" dialect.
Note about upcoming Step Preview 00:20
Step1: Create a New Fact and Insert it into the Session Preview 05:35
Step2: Control Execution Order with Salience Preview 04:50
Step3: Control Execution Order with Agenda-Groups Preview 13:48
Step4: Use Agenda Groups with Salience Preview 04:47
Step5: Run a Singe Rule from a Activation Group Preview 08:06
Bonus Step! Step 6. Set Focus to Agenda Group In Drools Rule. Preview 00:44
In this self-assignment you learn how to set focus to agenda group in the rules.
I have added this assignment after publishing the course. You may need to run "git pull" to get the latest code. It comes without a video and you must examine the rules and Java code yourself.