/Kogito

My Learning on Redhat Kogito

Primary LanguageJava

Kogito

Table of Content

Overview

  • Kogito is a cloud-native business automation technology for building cloud-ready business applications by Redhat.
  • Kogito derives from the Latin "Cogito", as in "Cogito, ergo sum" ("I think, therefore I am").
  • The letter K has reference to Kubernetes, the base for OpenShift as the target cloud platform for Kogito, and to the Knowledge Is Everything (KIE) open source business automation project from which Kogito originates.
  • Kogito adapts to your business domain instead of forcing you to modify your domain to work with Kogito.
  • The core objective of Kogito is to help you mold a set of Business Process Model and Notation (BPMN), decisions(DMN), Drools Rule Language (DRL) or XLS spreadsheet decision tables into your own domain-specific cloud-native set of services.
  • Kogito includes components that are based on well-known business automation KIE projects, specifically Drools, jBPM, and OptaPlanner, to offer dependable, open source solutions for business rules, business processes, and constraint solving.

Architecture

  • Kogito is designed to run and scale on a cloud infrastructure.
  • We can use Kogito with the latest cloud-based technologies, such as Quarkus, Knative, and Apache Kafka.
  • The primary Java frameworks that Kogito supports are Quarkus (recommended) and Spring Boot.

Installation

  • Dev Environment
    • Prerequisites:
    • For Persistence and Messaging:
      • Infinispan
      • Strimzi
      • Keycloak
      • Prometheus
      • Grafana
      • All Kiegroup Service
      • Kogito Management Console: It is a user interface for viewing the state of all available Kogito services and managing process instances.
      • Kogito Data Index:
        • It consumes the Kafka cloud events and index this information into the storage service.
        • It is a Quarkus application based on VertX and reactive messaging that exposes a GraphQL endpoint.
      • Kogito Jobs Service
        • It is responsible for scheduling jobs that aim to be fired at a given time.
        • The service does not execute the job itself, it triggers a callback that could be an HTTP request on a given endpoint specified on the job request, or any other callback that could be supported by the service.
        • It is a Quarkus application based on VertX.
      • Kogito Trusty Service
        • It stores all Kogito tracing events related to decisions made in Kogito services.
        • It uses the Kafka cloud events from Kogito services, and then processes the tracing events and stores the data in the storage service.
      • Kogito Trusty UI
      • Kogito Explainability Service
        • It is a complementary service for the Trusty Service to identify why the decision were made.
      • Kogito Task Console
    • Create Quarkus project using vscode plugin with below dependencies
      • quarkus-smallrye-openapi
      • kogito-quarkus
      • kogito-scenario-simulation [scope = test]
    • Delete below files from the template - Optional Step
      • Rest Resource file
      • Test Files
      • index.html from resources.
    • Create Person & KogitoScenarioJunitActivatorTest Java file, DMN, BPMN, and Scesim.
    • Commands
      mvn clean test
      mvn clean compile quarkus:dev
      mvn clean package
      mvn clean package -Dnative
      mvn clean package -Pnative
      mvn compile kogito:scaffold
      java -jar target/sample-kogito-1.0-SNAPSHOT-runner.jar
      ./target/sample-kogito-1.0-SNAPSHOT-runner
  • Production
    • To deploy services we can use Kogito Operator. This is based on the Operator SDK and automates many of the deployment steps.
    • Kogito also offers a command-line interface (CLI) to simplify some of these deployment tasks.

Modules

Below are details of building blocks of Kogito


Appendix