3.3. Defining KIE Bases and Sessions
A KIE base is a repository of the application’s knowledge definitions. It contains rules, processes, functions, and type models. A KIE base does not contain runtime data, instead sessions are created from the KIE base into which data can be inserted and process instances started.
A KIE session stores runtime data created from a KIE base. See the KIE Sessions chapter of the Red Hat JBoss BPM Suite Development Guide for more information.
You can create KIE bases and sessions by editing the kmodule.xml project descriptor file of your project. You can do so through Business Central or by editing kmodule.xml in the src/main/resources/META-INF/ folder by navigating through the Repository view.
Defining KIE Bases and Sessions in the Project Editor
To define a KIE base or session in Business Central, do the following:
- Click Authoring → Project Authoring and navigate to your project.
- In the Project Explorer window, click Open Project Editor.
-
Click Project Settings: Project General Settings → Knowledge bases and sessions. This view provides a user interface for changing
kmodule.xml. Click Add to define and add your bases.
-
After you enter a name for your Knowledge Base, add Packages. For including all packages, click Add below Packages and enter asterisk
*.
-
After you enter a name for your Knowledge Base, add Packages. For including all packages, click Add below Packages and enter asterisk
- Below Knowledge Sessions, click Add and enter the name of your session.
-
Mark it
Defaultand select appropriate state. For Red Hat JBoss BPM Suite, usestatefulsessions. - Click Save in the top right corner once you are done.
Defining KIE Bases and Sessions in kmodule.xml
To define a KIE base or session by editing kmodule.xml, do the following:
Open the repository view for your project.
Figure 3.1. Changing to Repository View

-
Navigate to
/src/main/resources/META-INF. Click onkmodule.xmlto edit the file directly. Define your
kbasesandksessions. For example:<kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <kbase name="myBase" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="*"> <ksession name="mySession" type="stateless" default="true" clockType="realtime"/> </kbase> </kmodule>- Click Save in the top right corner.
You can switch between the Project Editor view and the Repository view to look at the changes you make in each view. To do so, close and reopen the view each time a change is made.
If you have more than one knowledge base, one of them must be marked default. You also must define one default stateful knowledge session amongst all the bases and sessions. Alternatively, you can define no knowledge bases.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.