Udemy

Master Drools Programming - Learn How to Write Drools Rules

Enroll Now
  • 10,505 Students
  • Updated 3/2025
  • Certificate Available
4.4
(2,003 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
7 Hour(s) 51 Minute(s)
Language
English
Taught by
Juhan Aasaru
Certificate
  • Available
  • *The delivery and distribution of the certificate are subject to the policies and arrangements of the course provider.
Rating
4.4
(2,003 Ratings)
1 views

Course Overview

Master Drools Programming - Learn How to Write Drools Rules

Learn how to run and write rules for Apache Drools Rule Engine and how to work with spredsheet decision tables

We learn Apache Drools DSL (Drools programming language) and go over the most common DSL constructs. We move in small steps and gradually introduce new concepts, 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 the 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 SQL join)

  • exists, forall and collect

  • using spreadsheet decision tables to create Drools rules

  • using templates for creating rules and feeding data into them from spreadsheets and other tabular data sources

  • complex event processing (CEP) in Drools

    • difference between fact and event

    • declaring facts and events in Java and inside DRL code

    • different rule execution modes (active/passive, cloud/stream, sequential)

    • time and length-based sliding windows

    • entry-points

    • global variables

    • timers

  • how Apache Drools' internal algorithm Phreak works

This course comes with two Java projects containing all the code we worked with during the course. The first project includes all the code examples in traditional Drools syntax and a second copy of all the rules in the new Drools OOPath syntax (introduced by Drools 8). The first project has been upgraded to run using Drools 10.

You are encouraged to check out and run the code yourself to better understand and experiment with changes.

There are instructions on running the code in IntelliJ, Eclipse, and VS Code.

After completing this course, you will better understand which kinds of problems could be solved with Drools and how to write the most common business rules in Drools DSL.


Course Content

  • 13 section(s)
  • 99 lecture(s)
  • Section 1 1. Introduction
  • Section 2 2. Example Code and Running it Locally
  • Section 3 3. Stateless Sessions
  • Section 4 4. Stateful Sessions
  • Section 5 5. Cross Products - Drools Version of SQL JOIN
  • Section 6 Insert new facts and determine the execution order
  • Section 7 Insert a fact logically and check that the fact does not exist
  • Section 8 8. Exists and Forall Conditional Elements
  • Section 9 9. Spreadsheet Decision Tables
  • Section 10 Rule templates and creating rules dynamically
  • Section 11 11. Introduction to Complex Event Processing (CEP) with Drools
  • Section 12 12. What you need to know to write better Drools rules
  • Section 13 13. Conclusion

What You’ll Learn

  • Program rules in Drools 7 domain specific language
  • Learn Drools language constructs like insert, modify, exists, forall, insertLogical, salience, agenda-group etc
  • Create spreadsheet decision tables and spreadsheet templates
  • What is Complex Event Processing and how Drools handles it
  • How to use rule templates (DRT or Freemarker) and run dynamically defined DRL
  • Understand different Drools running modes (active/passive, cloud/stream, sequential)
  • How Drools works internally and what to keep in mind for writing faster performing rules


Reviews

  • R
    Ruben Oropesa
    5.0

    Excellent!

  • P
    Purushotam Sinha
    5.0

    good

  • R
    Rajesh Kumar
    4.0

    good

  • F
    Fredy Flores Merodio
    4.0

    bien

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed