1. What is KIE Server and Why is It Important?
KIE Server, part of the Red Hat Process Automation Manager (formerly known as JBoss BPM Suite), is a lightweight, standalone execution server for the Drools and jBPM (Java Business Process Model) engines. It allows you to deploy and execute business rules and workflows externally, providing a flexible and powerful way to integrate business logic into your applications.
1.1 KIE Server Ecosystem
The KIE Server doesn’t function in isolation. It works within the KIE ecosystem, which consists of several key components:
- Drools : A business rules management system (BRMS) that allows the definition, execution, and monitoring of rules.
- jBPM : A business process management (BPM) system that allows the definition and execution of complex workflows.
- KIE Workbench : A web-based interface that allows users to create, modify, and deploy rules and processes to the KIE Server.
- KIE Controller : A management layer that controls the KIE Server for automated updates of rules and processes.
This ecosystem provides the tools necessary for developers, business analysts, and system administrators to collaborate in building and managing complex decision-making systems.
1.2 Why Use KIE Server?
KIE Server is critical because it decouples business rules and workflows from the core application, making it easier to modify and update without impacting the entire system. It offers:
- Scalability : Deploy rules and workflows to multiple servers in a cloud or on-premises environment.
- Flexibility : Modify business rules without redeploying your entire application.
- Integration : Seamless integration with Java, Spring, and other technologies via REST and JMS APIs.
1.3 Core Features of KIE Server
- Lightweight : KIE Server is designed to be lightweight, running as a standalone service that can execute rules and workflows deployed from KIE Workbench.
- Rule Execution : Provides endpoints for rule execution, process execution, and decision model execution.
- Monitoring : Integrates with Prometheus and Grafana for rule and process monitoring.
2. How to Set Up KIE Server: A Step-by-Step Guide
Now that we understand the importance and ecosystem of KIE Server, let’s walk through how to set it up.
2.1 Prerequisites
Before we dive into the setup, ensure you have the following in place:
- Java JDK 11 or later installed on your system.
- Maven for building and managing dependencies.
- Wildfly Application Server if you plan to deploy KIE Server on an app server.
- PostgreSQL (or any supported RDBMS) for storing process data.
2.2 Installation and Configuration
Follow these steps to install and configure KIE Server:
Step 1 : Download KIE Server
You can download KIE Server from the official Red Hat website or through the following Maven dependencies:
<dependency>
<groupId>org.kie.server</groupId>
<artifactId>kie-server</artifactId>
<version>7.x.x.Final</version>
</dependency>
Step 2 : Configure WildFly
If using WildFly, you’ll need to configure the application server by adding the necessary data sources and JDBC driver:
./standalone.sh -c standalone-full.xml
Then, configure a datasource in the standalone.xml:
<datasource jndi-name="java:/jboss/datasources/kieDS" ...>
<connection-url>jdbc:postgresql://localhost:5432/kiedb</connection-url>
...
</datasource>
Step 3 : Deploy KIE Server
Once you’ve configured WildFly, deploy the KIE Server WAR file:
cp kie-server.war $WILDFLY_HOME/standalone/deployments/
Start WildFly and access the KIE Server through its REST API at http://localhost:8080/kie-server/services/rest/server.
2.3 Example: Running a Simple Rule
Let’s test KIE Server by running a simple rule. First, define a DRL (Drools Rule Language) file:
package com.sample;
rule "Discount Rule"
when
$order : Order( amount > 100 )
then
$order.setDiscount(10);
end
Deploy this rule through KIE Workbench or directly via Maven. You can then use the following REST API call to trigger the rule on KIE Server:
curl -X POST
http://localhost:8080/kie-server/services/rest/server/containers/instances/sample-container
-d '{
"commands":[
{
"insert": {
"object": {
"com.sample.Order": {
"amount": 150
}
}
}
},
{ "fire-all-rules": {} }
]
}'
This will trigger the rule and return the modified order with the applied discount.
3. Managing and Modifying Rules on KIE Server
One of the most powerful features of KIE Server is the ability to manage and update rules without redeploying your application. Here’s how to modify rules on a live KIE Server instance.
3.1 Modifying Rules in KIE Workbench
KIE Workbench allows business analysts and developers to create and modify rules via a user-friendly UI. To update a rule:
- Navigate to the KIE Workbench and log in.
- Open the project containing the rule you wish to modify.
- Edit the rule in the Guided Decision Table or DRL format.
- Save the changes and deploy the updated rule to KIE Server.
3.2 Updating Rules via REST API
You can also modify rules directly via KIE Server’s REST API. This is useful for automated deployments in CI/CD pipelines.
curl -X POST
http://localhost:8080/kie-server/services/rest/server/containers/sample-container
-d '{
"commands":[
{
"update": {
"object": {
"com.sample.Order": {
"amount": 200
}
}
}
}
]
}'
Once a rule is updated, it’s crucial to test it to ensure correctness. KIE Server provides testing endpoints to verify rule execution in isolation, helping avoid unforeseen production issues.
4. Conclusion
KIE Server is a flexible, powerful tool for executing and managing business rules and workflows. By following the steps outlined in this guide, you can quickly set up KIE Server and manage rules effectively, ensuring that your applications remain agile and responsive to business changes.
Want to dive deeper into KIE Server or need help troubleshooting? Leave your questions in the comments below, and let's discuss!
Read posts more at : Secrets to Mastering KIE Server: Setup, Rules Management, and Ecosystem Explained

Top comments (0)