In almost all examples in this book the Drools artifacts were packaged together with the application. However, rules, processes, and other Drools artifacts often have different life cycles than applications that use them. These artifacts tend to change more often than the rest of the application. It would be more beneficial if we could build, release, and deploy them separately. In order to achieve this we need to build the KnowledgeBase
instance independently from the application. The application should be able to dynamically reload this KnowledgeBase
instance at runtime.
Guvnor (Business Rules Management Server) meets our first requirement. It can build, release KnowledgePackages
, and make them available through a URL. Later on in this chapter we'll also show how we can use a general build tool such as Ant for this task.
For the second requirement we'll now look at KnowledgeAgent
.