In this chapter we've learned about writing more user friendly rules using DSLs, decision tables, and processes. You can mix and match these various approaches. It makes sense to write some rules using DSL, some using decision tables, and more complex rules using the pure
.drl file format. A
KnowledgeBase object can be created from multiple sources.
DSLs are very useful if there is a need for the business analyst to read and understand existing rules and even write new rules. The resulting language uses business terminology, making it more natural for the business analyst. The DSL provides an abstraction layer that hides complicated rule implementations. The Eclipse editor brings autocompletion so that the rules are easier to write.