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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.