> ## Documentation Index
> Fetch the complete documentation index at: https://aletyx.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Drools

> Overview of the Aletyx Enterprise Build of Drools - the DRL rule engine, DMN decision modeling, decision tables, and Java, REST, and event-driven integration.

## What is Drools?

Drools is the most used open source rules engine project in the world, providing a powerful decision engine with management capabilities. It is one of the main pillars of the Aletyx Enterprise Build of Kogito and Drools. As an enhanced build of the Apache KIE project, our version of Drools provides all the benefits of the open source foundation with additional enterprise features that might not be compatible with Apache® Foundation requirements. At Aletyx, we provide the enterprise support and features to get your decisions project from concept to production faster with added confidence that only Aletyx can provide!

<Note>
  Wondering how Drools relates to Kogito, jBPM, and KIE? See [Drools vs. Kogito vs. KIE](/docs/faq/concepts/drools-kogito-kie).
</Note>

## Key Capabilities

The Aletyx Enterprise Build of Drools includes:

### 1. Rule Engine (DRL)

The traditional Drools Rule Language (DRL) provides a flexible, expression-based approach to authoring business rules:

```java theme={null}
rule "High Value Customer"
when
    $customer: Customer(yearlySpend > 10000, status != "VIP") // (1)
then
    modify($customer) { // (2)
        setStatus("VIP"), // (3)
        setDiscountRate(0.15) // (4)
    }
    System.out.println("Customer " + $customer.getName() + " upgraded to VIP");
end
```

1. Create a variable customer that is based on a Customer object with yearly spend more than 10,000 and not currently a VIP customer
2. Modify is a key word in Drools. See [Modifying Facts](/docs/drools/drl/actions#modifying-facts) to learn more how this block works.
3. Set the status of the current customer to VIP
4. Set the Discount Rate of the current to 15%

Our enhanced DRL support includes:

* **Enhanced features** focused on orchestrating rules and supported environments
* **Performance optimizations** for high-throughput decision services
* **Extended built-in functions** for complex business logic

### Decision Model and Notation (DMN)

DMN provides a business-friendly approach to decision modeling with visual decision requirements diagrams and decision tables:

```python theme={null}
if applicant.age > 25 and applicant.income > 50000 then "Approved" else "Review" # (1)
```

1. FEEL Literal Expression looking at an Applicant's Age and Income

The Aletyx Enterprise Build of Drools DMN implementation includes:

* **DMN 1.5 standard compliance**
* **Decision service integration templates provided with Accelerators attached to Aletyx Playground**
* **DMN model validation and testing tools**

### Decision Tables in Drools Rules Language (DRL)

For business-friendly rule authoring without coding:

* **Spreadsheet-based decision tables**
* **Web-based decision table editors with Decision Modelling and Notation**
* **Automated validation and consistency checking**

To learn more about DMN Decisions, see [Decision Model and Notation Introduction](/docs/guides/tutorials/dmn/overview)
To learn more about DRL Spreadsheets, see [Creating Your First Decision Table with DRL](/docs/drools/tutorials/drl-example)

## Runtime Environments

The Aletyx Enterprise Build of Drools supports multiple deployment scenarios:

* **Embedded within Java applications**
* **Standalone decision services**
* **Container-based microservices**
* **Serverless function deployments**

## Integration Points

Aletyx Enterprise Build of Drools integrates seamlessly with:

* **[jBPM](/docs/components/jbpm) and [Kogito](/docs/components/kogito)** for decision-driven process automation
* **[Aletyx Playground](/docs/components/playground/overview)** for visual development
* **Spring Boot** with starter templates
* **Quarkus** for cloud-native applications
* **Event-driven architectures** via Kafka, RabbitMQ, and similar brokers
* **Monitoring tools** like Prometheus and Grafana

## API Overview

The Aletyx Enterprise Build of Drools provides several APIs for different use cases:

### Classic Java API

```java theme={null}
KieServices kieServices = KieServices.Factory.get();
KieContainer kContainer = kieServices.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rules");

// Insert facts
Customer customer = new Customer("John", 100000);
kSession.insert(customer);

// Fire rules
kSession.fireAllRules();
```

### REST API

For service-oriented architectures, the Aletyx Enterprise Build of Drools provides REST endpoints that can be autogenerated through the usage of queries within the Drools Rules Language (DRL), DMN and BPMN:

```bash theme={null}
curl -X POST "https://decisions.example.com/api/rules/customer-classification" \
     -H "Content-Type: application/json" \
     -d '{"customer": {"name": "John", "yearlySpend": 100000}}'
```

## Advanced Features

The Aletyx Enterprise Build of Kogito and Drools extends Drools with:

* **Rule unit testing framework** for TDD
* **Decision monitoring and analytics**
* **Business rule versioning and lifecycle management**
* **Enhanced performance for high-throughput scenarios**
* **Advanced explanation capabilities**

## Updating Drools

Drools 7 and its enterprise ecosystem (JBoss EAP 7, Business Central, KIE Server, and KieScanner) have reached end-of-life or extended support only, leaving production systems without security patches. Updating is not straightforward: community Drools 10 is not a drop-in replacement. It preserves DRL syntax but fundamentally changes the execution and deployment model — session-per-task isolation replaces shared working memory, `startProcess()` is gone, and KIE Server, Business Central, and runtime KJAR deployment no longer exist. Migration complexity ranges from low for rule-only services to high for orchestration-heavy systems, which may require architectural redesign.

Read the full analysis, component-by-component EOL status, and migration paths in [Drools 7 EOL — What you need to know](/docs/drools/drools-7-migration).

## Next Steps

* [Get started with your first rule](/docs/drools/getting-started)
* [Explore DMN modeling](/docs/architecture/decisions/dmn/overview)
* [Learn about decision tables](/docs/drools/decision-tables/overview)
* [Understand the decision engine architecture](/docs/architecture/decisions/overview)
