Apache Incubator Kogito Runtimes

repository·main·Indexed 20 days ago

https://github.com/apache/incubator-kie-kogito-runtimes

A cloud-native business automation platform providing runtimes for Quarkus and Spring Boot. It includes add-ons for event-driven architectures (MongoDB, Kafka, Knative Eventing), explainability and trusty services, jobs management for scheduled tasks, and the KIE Flyway Add-On for component-based database bootstrapping in development and test environments.

Tokens
29.7K
Snippets
79
Records
134
Agent score
68%

What's inside Kogito Runtimes

  1. Overview of the Kogito Maven Plugin

    main

    The Kogito Maven Plugin manages code generation assets during the compilation phase of a Kogito application. It automatically discovers Apache KIE assets and triggers the Kogito Codegen layer to generate and compile the mandatory Java classes required for the application to operate correctly.

    Supported Frameworks:

    • Apache KIE plain Java projects
    • Apache KIE Spring Boot based projects

    Discovered Assets:

    • Decisions (DMN)
    • Predictions (PMML)
    • Processes (BPMN)
    • Rules (DRL)
  2. Overview of Kogito Messaging Add-ons

    main

    The Kogito Messaging Add-ons provide default implementations for the EventEmitter and EventReceiver interfaces on supported target platforms. These interfaces enable messaging capabilities for Kogito processes and event-driven decision handling.

    Key integration paths include:

    • Knative Eventing: For services running in Knative environments.
    • Kafka Messaging: For enabling Kafka-based messaging in Kogito services.
  3. Overview of the Kogito Events Add-on

    main

    The Kogito Events add-on extends Kogito projects by providing the capability to handle event-driven use cases. It allows Kogito runtimes to react to incoming events and integrate with event-driven architectures.

    Key capabilities and related services include:

    • Kogito runtime events: Configuration and handling of events within the Kogito runtime.
    • Kogito Data Index Service: For indexing and searching data related to Kogito execution.
    • Kogito Trusty Service and Explainability Service: For providing insights and explanations regarding decision/process execution.
    • Deployment patterns: Supports various deployment scenarios, such as services on OpenShift.
  4. What is the Kogito Codegen Manager

    main

    The Kogito Codegen Manager is a specialized module designed to be consumed by build automation and project management tools like Maven or Gradle.

    Its primary purpose is to orchestrate the execution of KIE asset Generators (from other kogito-codegen-* modules) and provide the glue code necessary to transform Apache KIE assets into executable code. The manager handles the full lifecycle of code generation, including:

    1. Generation: Creating CodeGen classes based on Apache KIE assets such as BPMN, DMN, DRL, and PMML using specific Generators.
    2. Writing: Writing the generated CodeGen source classes to the file system.
    3. Compilation: Compiling the generated classes, respecting the specific Java version used in the consumer's Apache KIE project.
    4. Output: Writing the final compiled CodeGen classes to the appropriate locations.
  5. Understand the Sample Generator implementation

    main

    The kogito-codegen-sample repository serves as a reference implementation for a Kogito generator. It demonstrates how to implement the full Generator interface and how to provide automatic wiring via the Service Provider Interface (SPI).

    Key Features:

    • Functionality: Consumes .txt files from a project and exposes their content via a /sample REST endpoint.
    • Configuration: Allows users to configure the number of times the content should be replicated.
    • SPI Integration: Implements GeneratorFactory and provides META-INF/services/org.kie.kogito.codegen.api.GeneratorFactory to enable automatic discovery and wiring.

    Module Structure:

    • kogito-codegen-sample-generator: Contains the actual implementation of the generator.
    • kogito-codegen-sample-runtime: Provides the runtime support for the engine (separated from the codegen module as per best practices).
  6. Use the Kogito Tracing Add-on for DMN services

    main

    The Kogito Tracing Add-on provides tracing capabilities for Kogito projects. Currently, this capability is specifically supported for DMN (Decision Model and Notation) services. This allows you to observe and trace the execution of decision logic within your Kogito applications.

    For detailed configuration instructions and deep dives into the tracing implementation, refer to the official Kogito documentation.