Summary
After reading this chapter, you should have a better understanding of why debugging and testing our rules in Drools is, most of the time, not trivial. The declarative nature of Drools might be a double-edged sword—very powerful for knowledge declaration but not so easy to test. Errors in the rules were categorized according to their source and cause and a detailed explanation on how they can be prevented or mitigated was also included. The chapter also provided a list of good practices and techniques to make the whole process easier. The techniques that were covered involved the use of global variables, event listeners, loggers, and some other good practices to both simplify and enhance the overall testing experience in Drools.
This chapter also introduced some concepts such as the PHREAK network and its nodes that serve as a kick off for the next chapter. Let's move to the next chapter and start talking about Drools' internals.