What you'll learn:
- program rules in Drools 7 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
- Drools language constructs like insert, modify, exists, forall, insertLogical, salience, agenda-group etc
We learn Drools DSL(Drools programming language) and go over the most common DSL constructs. We move in small steps and gradually introduce new consepts so it is easier to follow even for a beginner.
This way we cover the most common Drools topics like:
what is a rule engine
what is a difference between a method and a rule
why one would use a rule engine instead of writing regular Java code
understanding of the when/then clauses
understanding in which order the rules fire and when the order is not known
how to control the execution using activation-groups, agenda-groups and salience
declaring variables in DRL
difference between stateless and stateful sessions
inserting facts and modifying existing objects in the session
cross products (similar to SQLjoin)
exists, forall and collect
This course comes with a Java project that has all the code we look throughout this course. You are encouraged to check out and run the code yourself to get better understanding and experiment yourself with making changes to it. There are instructions how to get the code running in IntelliJ,Eclipse and VS Code.
After completing this course you have a better understanding of which kind of problems could be solved with Drools and how to write most common business rules in Drools DSL.