Show Table of Contents
3.3. Defining Kie Bases and Sessions
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 → and navigate to your project.
- In the Project Explorer window, click .
- Click → . 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 below Packages and enter asterisk
*.
- Below Knowledge Sessions, click 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://jboss.org/kie/6.0.0/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.
Note
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.