Debugging the right-hand side of a rule

As we already know, the right-hand side of a rule in Drools may contain a combination of the following elements:

  • Java sentences: Any regular Java sentence that is allowed in a Java method can also be used on the right-hand side of a rule in Drools.
  • MVEL expressions: If the dialect of the rule is set to mvel, MVEL expressions are enabled on the right-hand side of the rule in Drools.
  • Predefined variables and methods: Variables such as drools and kcontext and methods such as insert, update, and delete are also allowed. The special modify(){} structure could also be used on the right-hand side of the rule in Drools.

In the previous section, we introduced the notion of how, when compiled, the left-hand side of all ...

Get Mastering JBoss Drools 6 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.