KIE provides a knowledge-centric API, where rules and processes are first class citizens. The majority of KIE API is considered stable and should not change, experimental classes and APIs will be marked as such.
The most common interfaces you will use are:
Factory classes, with static methods, provide instances of the above interfaces. A pluggable provider approach is used to allow provider implementations to be wired up to the factories at runtime. The Factories you will most commonly use are:
Typical example of loading and using knowledge resources (rules, processes, etc) found on classpath. By convention the
KIE API expects file
META-INF/kmodule.xml which is a marker file and also enables additional configuration.
For very basic usage the file can just contain
KieServices kieServices = KieServices.Factory.get(); KieContainer kieContainer = kieServices.getKieClasspathContainer(); KieSession kieSession = kieContainer.newKieSession(); kieSession.insert(new Fibonacci(10)); kieSession.fireAllRules(); kieSession.dispose();