Drools 6.0 onwards a new approach is designed to create a Knowledge Base and a Knowledge Session compared to previous versions.
The below example will explain on how to create a Default KieSession
The Drools 6.0 project consists of a single meta data file META-INF/kmodule.xml. The file is located under the source folder as shown in below snapshot.
If the file is not located at the location
By default, kc.newKieSession() returns the object of org.drools.core.impl.StatefulKnowledgeSessionImpl class.
Below are the files that are required to fire the rules using KieSession
kmodule.xml file - Since we are creating a default KieSession, no need to define any kbase