Drools support in Spring Boot 2

Introduction We will see an example on drools support in Spring Boot 2. We have seen in past example on how to integrate drools in Spring application. We had used Spring Boot version 1.5.9 but here we will support Spring Boot 2.1.5 version. I will not explain about drools in this post and if you want to know on drools then you can check my previous example how to integrate drools in Spring application. Prerequisites Eclipse Neon, Java 1.8, Gradle 5.4.1, Drools 7.22.0 Example with Source Code Creating Project Create…

Continue

Mock Drools ObjectFactory, KieSession and StatelessKieSession using Junit

This tutorial example will show you how to mock ObjectFactory<KieSession>, KieSession and KieStatelessSession using Junit. KieSession is the most common way to interact with the engine in Drools. A KieSession allows the application to establish an iterative conversation with the engine, where the state of the session is kept across invocations. The reasoning process may be triggered multiple times for the same set of data. After the application finishes using the session, though, it must call the dispose method in order to free the resources and used memory. StatelessKieSession implements…

Continue

Spring Drools Integration Example

Introduction This tutorial is about Spring drools integration example and will show you how to define business rules in drools (.drl) file that could be understood by non-technical people as well. What is Drools? Drools is a business rule management system with a forward-chaining and backward-chaining inference based rules engine, allowing fast and reliable evaluation of business rules and complex event processing. A rule engine is also a fundamental building block to create an expert system which, in artificial intelligence, is a computer system that emulates the decision-making ability of…

Continue