Skip to content

Instantly share code, notes, and snippets.

@rafaeltuelho
Last active March 4, 2020 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaeltuelho/86845aec41b09a329a8af3671f278eb7 to your computer and use it in GitHub Desktop.
Save rafaeltuelho/86845aec41b09a329a8af3671f278eb7 to your computer and use it in GitHub Desktop.
Drools notes and tricks

Implicity services available to be used in RHS (then) clause

More details in: https://docs.jboss.org/drools/release/7.30.0.Final/drools-docs/html_single/#drl-rules-THEN-methods-variables-ref_drl-rules

some differences between ReetOO and PHREAK

In Drools 5, one fact insertion would cause a match (called "activation" in Drools 5). Drools 6 uses Phreak wich is a "lazy" modification of Rete. One of the implicances of this is that matches don't happen until fireAllRules is invoked.

new Test Scenario

It's possible to use Java/MVEL expression in the GIVEN contraints, like:

# new com.redhat.pocs.PriorApplication(1L, "x", java.time.LocalDate.now(), null, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment