Apache Drools Documentation

repository·main·Indexed 27 days ago

https://github.com/apache/incubator-kie-drools

An open source rule engine, DMN engine, and complex event processing (CEP) engine for Java and the JVM platform. Drools provides forward-chaining and backward-chaining inference for evaluating business rules and building expert systems. Key features include impact analysis and graph visualization, MVEL compilation, metric logging for performance analysis, session reliability for stateful KieSessions, and integration with Quarkus and Kafka.

Tokens
79.2K
Snippets
119
Records
513
Agent score
91%

What's inside Drools

  1. Overview of Efesto core

    main

    Efesto core is the module containing the primary business functionalities of Efesto. It is responsible for two main stages of the Efesto lifecycle:

    1. Compilation: The process of transforming business logic or rules into executable formats.
    2. Runtime: The execution environment where the compiled business logic operates.
  2. Overview of Kogito Quarkus Extension SPI

    main

    The kogito-quarkus-extension-spi is a Service Provider Interface (SPI) module designed to act as a bridge between BuildItem producers and consumers within the Kogito Quarkus ecosystem.

    In this architecture:

    • Producers are typically Quarkus extensions like jbpm-quarkus.
    • Consumers are add-ons, such as kogito-quarkus-addon-knative-eventing.

    Note: This module is intended for internal use by extension developers to facilitate communication between different Kogito components during the Quarkus build process.

  3. Overview of the MVEL Compiler

    main

    The MVEL Compiler translates MVEL source code into Java. It is primarily used when Drools consequences specify dialect "MVEL". It also serves to preprocess Java consequences that utilize modify and with blocks by transforming them into Java-compatible structures.

    Important Requirement: The compiler uses a type inference algorithm based on reflection. Therefore, the .class files for the objects being manipulated must be present in the classloader before running the compiler, otherwise the type inference will fail.

  4. Overview of the Efesto Runtime Manager

    main

    The Efesto Runtime Manager is responsible for the actual execution of models. Its primary functions include class-loading and method invocation, as well as handling execution exceptions.

    When integrating with this system, note the following architectural boundaries:

    • runtime-manager-api: This is the only module intended to be visible outside the system's core. Use this for external interactions.
    • runtime-manager-common: This module is considered private and should be hidden from external consumers.
  5. Overview of Kogito Gradle Plugin capabilities

    main

    The Kogito Gradle Plugin manages code generation assets during the compile time of a Kogito application. It supports Apache KIE plain Java projects and Apache KIE Spring Boot based projects.

    The plugin automatically discovers and processes the following Apache KIE assets:

    • Decisions (DMN)
    • Predictions (PMML)
    • Processes (BPMN)
    • Rules (DRL)

    It generates and compiles the mandatory Java classes produced by the Kogito Codegen layer.