# KIE :: Public API 7.36.0.Final API

KIE provides a knowledge-centric API, where rules and processes are first class citizens.

See: Description

KIE Base API
Package | Description
--- | ---
org.kie.api | Base KIE API classes.

Builder API
Package | Description
--- | ---
org.kie.api.builder |
org.kie.api.builder.model |

Definition API
Package | Description
--- | ---
org.kie.api.definition | All classes to create definitions, as built by the KieBuilder from artifact resources, can be found here.
org.kie.api.definition.process | The classes that make up a Process definition.
org.kie.api.definition.rule | The classes that make up a Rule definition.
org.kie.api.definition.type |

Configuration API
Package | Description
--- | ---
org.kie.api.conf |

Runtime API
Package | Description
--- | ---
org.kie.api.runtime | The runtime engine classes, including KieSession and StatelessKieSession.
org.kie.api.runtime.conf |
org.kie.api.runtime.manager |
org.kie.api.runtime.manager.audit |
org.kie.api.runtime.process | The process runtime classes.
org.kie.api.runtime.query |
org.kie.api.runtime.rule | The rule runtime classes.

Commands API
Package | Description
--- | ---
org.kie.api.command |

Event API
Package | Description
--- | ---
org.kie.api.event | Comprehensive event API for all parts of the platform.
org.kie.api.event.kiebase | Events emitted while updating the definitions in the KieBase.
org.kie.api.event.kiescanner | Events emitted by the KieScanner.
org.kie.api.event.process | Events emitted while process instances are executing.
org.kie.api.event.rule | Events emitted while rules are executing.

Time API
Package | Description
--- | ---
org.kie.api.time | Classes related to calendars and time.

Task API
Package | Description
--- | ---
org.kie.api.task |
org.kie.api.task.model |

CDI Support API
Package | Description
--- | ---
org.kie.api.cdi |

Other Packages
Package | Description
--- | ---
org.kie.api.concurrent |
org.kie.api.executor |
org.kie.api.internal.assembler |
org.kie.api.internal.io |
org.kie.api.internal.runtime |
org.kie.api.internal.runtime.beliefs |
org.kie.api.internal.utils |
org.kie.api.internal.weaver |
org.kie.api.io | io library for working with Resources See ResourceFactory for more details
org.kie.api.logger | Logger classes used to log the KieRuntime's execution.
org.kie.api.management |
org.kie.api.marshalling | Marshalling classes are used to marshall and unmarshal StatefulKieSessions See KieMarshallers for more detailed information.
org.kie.api.persistence |
org.kie.api.persistence.jpa |
org.kie.api.pmml |
org.kie.api.remote |

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:

- `org.kie.api.KieBase`
- `org.kie.api.runtime.KieSession`
- `org.kie.api.runtime.StatelessKieSession`
- `org.kie.api.runtime.KieContainer`
- `org.kie.api.builder.ReleaseId`
- `org.kie.api.builder.KieScanner`

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:

- `org.kie.api.KieServices`
- `org.kie.api.command.KieCommands`
- `org.kie.api.io.KieResources`

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 `<kmodule xmlns="http://www.drools.org/xsd/kmodule"/>`:

      KieServices kieServices = KieServices.Factory.get();
      KieContainer kieContainer = kieServices.getKieClasspathContainer();
      KieSession kieSession = kieContainer.newKieSession();
      kieSession.insert(new Fibonacci(10));
      kieSession.fireAllRules();
      kieSession.dispose();

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.