Intelligent cloud-native applications are helping enterprises spearhead innovation through automation and legacy modernization. Every application needs to deliver a specific business logic. But, workflows and rule engines make it difficult for developers. Developers need to increase their productivity and business logic efficiency in cloud environments. Therefore, the use of precise language for business workflow implementation and business rules is the need of the hour.

Quarkus projects already demonstrate the power and efficiency of working in a fast-paced development environment through native execution. However, today, business automation projects similar to jBPM and Drools need support for cloud-nativity, speed, and low resource consumption. This is why developer communities provide a way to build next-gen business applications that support native compilation in the cloud. Meet Kogito, a cloud-native business automation technology to build cloud-ready business applications while enjoying the supersonic Quarkus experience.

In Kogito, “K” refers to Kubernetes, which is the base for OpenShift as the target cloud platform, and to the Knowledge Is Everything (KIE) open-source business automation project from which Kogito originates. Being a powerful engine, Kogito allows the implementation of the core business logic in a business-driven manner. It merges tried and tested runtime components like jBPM, Drools, and OptaPlanner.

Behind the scenes in Kogito, the development of cloud-native apps are backed by:

  • Code generation based on business assets.
  • An executable model for process/rules/constraints/decision definitions.
  • A type-safe model that encapsulates variables.
  • REST APIs for business processes/rules/decisions.

These help in orchestrating distributed Microservices and container-native applications influenced by Kubernetes and OpenShift.

Made for Hybrid Cloud Environments

Kogito adapts to your domain and tools since it is optimized for a hybrid cloud environment. The core objective of Kogito is to help converge a set of business processes and decisions into your own domain-specific cloud-native set of services.

What happens when you use Kogito?

When you use Kogito, you build a cloud-native application that equates to a set of independent domain-specific services to achieve specific business value. The processes and decisions you use to define the target behavior are executed as you create services. This results in highly distributed and scalable services with no centralized orchestration. Instead, the runtime that your service uses is optimized based on what your service needs.

Kogito Implementation on Knative’s Event-driven Architecture

Kogito ergo Cloud: Kogito is designed from the basics to run at scale on cloud infrastructure. Leveraging the latest technologies (Quarkus, knative, etc.), speedy boot times, startup times, low footprint, and instant scaling on orchestration platforms like Kubernetes is possible.

Kogito ergo Domain: Kogito strongly focuses on building domain-specific services using APIs and JSON data. This prevents any leaking of tool abstraction into your client applications. To achieve this, Kogito relies on code generation, which takes care of 80% of the work in a domain-specific service (or services) based on the defined processes and rule(s). Additionally, you can expose domain-specific data using events or a data index for other services to consume and query it easily.

Kogito ergo Developer: Kogito’s battle-tested components offer a power-packed developer experience to achieve instant efficiency by having:

  • Tooling to build processes and rules for cloud-native services is embedded wherever required. For example, the Kogito BundleVSCode extension enables you to edit your Business Process Model and Notation (BPMN) 2.0 business processes and Decision Model and Notation (DMN) decision models directly in your VSCode IDE, next to your other application code.

The Kogito Operator Framework lets you deploy services in the cloud. It is based on the Operator SDK and provides deployment steps automation. For example, a link to the Git repository containing your application helps automatically configure the components required to build your project from the source and deploy the resulting services.

Kogito’s command-line interface (CLI) simplifies these deployment tasks.

  • Code generation that automates 80% of the processes.
  • Customization flexibility.
  • Simple local development with live reload.
  • Instant productivity where a service can be developed, built, deployed, and tested to avoid delays. On Quarkus and Spring Boot, a dev mode helps achieve this. Quarkus even offers a live reload of your processes and rules in the running application, which offers advanced debug capabilities.
  • Components based on well-known business automation KIE projects, specifically jBPM, Drools, and OptaPlanner, offer reliable opensource solutions for business processes, rules, and constraint solving.

Why Kogito?

Cloud-first priority: By leveraging Quarkus and container orchestration platforms like Kubernetes/OpenShift, Kogito lets cloud-native apps run at scale along with superfast boot times.

Domain-specific flexibility: Kogito can be customized to specific business domains to avoid leaking workflow tool-specific application abstractions while interacting with the workflows.

Developer-centric Experience:

  • Kogito enhances the developer experience (based on VSCode) to achieve instant efficiency with embeddable tooling wherever required.
  • Kogito tooling (Codegen) automatically generates code for a minimum of 80% of workflows with the flexibility to customize and simplify application development.
  • Advanced Local test/debug, hot reload.
  • Integrated into existing developer workflow.
  • Reusable building blocks.
  • Rapid prototyping.

Optimized for Cloud and Containers

  • Small footprint
  • Fast startup
  • Dedicated Generated runtime + optional add-ons
  • Serverless architecture

Technology Enabler

  • Cloud events
  • Event-driven
  • Serverless with knative
  • Machine-learning support
  • Grafana/Prometheus

Other benefits include:

  • Runtime persistence for workflows for preserving the process state for instances across restarts.
  • Supports events and enables integration with third-party systems using external REST API calls.
  • Enables process instance progress tracking from the Kogito process management console.
  • Provides security to application endpoints by integrating with an OpenId Connect (OIDC) Server.

Latest Kogito Features

The Kogito 0.8.0 release has 25+ new feature requests, 35 enhancements, and more than 40 Kogito Runtime bug fixes. The VS Code editor has been updated with bug fixes and improvements to Chrome extensions for Business Process Model & Notation (BPMN) and Decision Model & Notation (DMN). In addition, new online editors make them more robust.

Here are the top features.

Online authoring Tools: Kogito offers authoring tools to increase the productivity of business automation experts who author executable business logic in the cloud. The latest release gives Kogito online editors for BPMN and DMN ready-to-use and does not require any local setup. You can use these editors to sketch BPMN-based business-process diagrams or business decisions based on DMN specifications.

Kogito Management Console: The new Kogito Management Console helps view and manage process instances. The Kogito Data Index in the new management console aids visualization and management for process-instances and domain-based views. Developers will get a detailed picture of running process instances, variables, sub-processes, and task execution workflows.

Kogito Domain Explorer: This feature helps navigate business data in a selected domain.

Multiple Run-time Modes: For Quarkus and Spring Boot, Kogito supports the following modes.

  • Development mode: For local testing. This mode offers live processes and decisions reload in your running applications for advanced debugging.
  • JVM mode: For Java virtual machine (JVM) compatibility.
  • Native mode: Quarkus requires GraalVM. This mode is used for direct binary execution as native code.

Meaningful process IDs

The meaningful process IDs simplify the correlation of new processes with the existing business information. In addition, these give the option to create a unique reference for a business key even if you use auto-generated process IDs.

You can create a unique reference by passing a query parameter named businessKey in the request to start a new process instance. For example, you can start an order process correlated to the business key by sending a request similar to the below example:

POST /orders?businessKey=ORDER-0001

You can then retrieve the new process instance with the new reference ID similar to the one given below.

GET /orders/ORD-0001

The following HTTP request deletes the process instance with the same reference ID:

DELETE /orders/ORD-0001

Process-variable tagging

The Kogito runtime supports process-variable tagging. Developers can provide the metadata about a process variable and perform model-based process grouping if required. For example, important business KPIs are grouped and classified this way using process inputs and outputs; and variable tags are internal or read-only.

Kogito Operator and Kogito CLI

Kogito Operator and Kogito CLI are based on the popular Red Hat OpenShift Container Platform where the Kogito Operator helps deploy Kogito Runtimes from the project’s source with facility for developer interaction with Kogito Operator from the Kogito CLI.

You can set the -enable-istio parameter in Kogito CLI after creating a new Kogito application to enable Istio service mesh sidecars. The sidecars can then automatically combine tracing, observability, security, and monitoring in your Kogito pods.

Kogito Jobs Service

The Kogito Jobs Service offers a lightweight and dedicated solution for scheduling two types of jobs. A time-scheduled job executes only once at a given time, and a periodically scheduled job executes at the given interval and executes a predetermined number of times.

Decision and process integration

Kogito supports the modeling of a decision-driven service as either a self-contained service or based on intelligent workflows and decision tasks. For example, you can implement business decisions using Drools rules, decision tables in a spreadsheet, or DMN models where Kogito automatically generates REST endpoints for you.

In Kogito 0.8.0, this feature allows the integration of DMN models with BPMN processes to drive business processes by intelligent decision nodes.

Technologies used with Kogito

Kogito is compatible with the latest cloud-based technologies like Quarkus, Knative, and Apache Kafka, to increase start times and instant scaling on container application platforms, such as OpenShift.

  • OpenShift is based on Kubernetes and the target platform for building and managing containerized applications.
  • Quarkus is a native Kubernetes-based Java stack used to build applications with Kogito services.
  • Spring Boot support is available for Kogito, where you can use the Spring Framework.
  • GraalVMwith Quarkus provides native compilation with Kogito, resulting in fast startup times and a minimal footprint. As a result, a fast startup is available, especially for small serverless applications.
  • Knative allows building serverless applications with Kogito that can be scaled up or down (to zero) as needed.
  • Prometheus and Grafana can be used for monitoring and analytics with optional extensions.
  • Infinispan and MongoDB are middleware technologies that offer persistence support.
  • Kafka and Keycloak are middleware technologies that support messaging and security.

   Kogito on Quarkus and Spring Boot

  • Kogito supports primary Java Frameworks like Quarkus (recommended) and Spring Boot.
  • Quarkus is Kubernetes-native with a container-first approach to build Java applications, especially for Java virtual machines (JVMs) such as GraalVM and HotSpot. As a result, Quarkus reduces the size of both the Java application and container image footprint to optimize for Kubernetes while eliminating some Java programming workloads from older versions and reducing the memory requirement to run those images.
  • For Kogito services, Quarkus is highly preferred to optimize Kubernetes compatibility and enhanced developer features like live reload in the dev mode for advanced debugging.
  • Spring Boot helps build standalone production-ready Spring applications. Spring Boot-based applications require minimal configurations without an entire Spring configuration setup.
  • For Kogito services, Spring Boot is ideal for developers who need to use Kogito in existing Spring Framework environments.

Kogitos Architecture

When using Kogito, a cloud-native application is built by collaborating a set of independent domain-specific services to achieve some business value. The processes and rules describing the service behavior are executed as part of the services and are highly distributed and scalable without a centralized orchestration service. This way, the runtime of your service is fully optimized on a need basis. For long-lived processes, the runtime state must be persisted externally using a data grid, like Infinispan. Each service also produces events that can be aggregated, indexed in a data index service, and consumed to offer advanced query capabilities (using GraphQL).

Deploying a Custom Kogito Service on Kubernetes with Kogito Operator

Kogito Magic- Behind the Scenes

Kogito starts by reading business assets like a BPMN2 file, decision tables, or Drools rules and creates executable models using Java Fluent API. Here, developers can leverage Quarkus’ hot-reload feature to update a business process diagram, save it, and test the changes instantly without a server restart. Kogito automatically generates an executable business resource for every business asset and REST endpoint that allows client apps to interact with processes, tasks, and rules in a more domain-driven way. This business automation tool increased productivity and faster business logic validation using easy-to-maintain business assets, the hot-reload feature, and quick application bootstrap during the development phase. While executing the Kogito business application, if the user wants to compile it to run in the native mode with GraalVM, the business rule execution can be run 100 times faster with 10x lower resource consumption when compared to a JVM execution. Once started, you can access the application after boot with no additional processing. Finally, with the Kogito operator, the user can create a new Kogito application or deploy an existing one through the UI or CLI tool.

Wrapping up

Kogito’s Serverless Workflow specification can help define complex workflows, which can be helpful across multiple platforms and cloud providers. Developers can now rely on this platform fully compliant with standards and the specifications needed for cloud-native business application automation.

Connect with Radiant Digital’s experts to explore the advantages of Kogito for your cloud-native enterprise applications.