In this scenario, you will learn how to implement (business) decisions in Kogito using DMN.
Decision Model & Notation
Decision Model & Notation (DMN) is a standard by the Object Management Group (OMG) for decision modeling. DMN is to decisions what BPMN is for processes and workflows. DMN is targeted at both business users and developers and can be used to implement complex decision logic in a graphical notation.
Learn more at kogito.kie.org, or just drive on and get hands-on!
In this scenario, you learned how to implement create a Kogito decion service using the Decision Model & Notation standard (DMN). A foundational aspect of Kogito is that is uses open standards in the business automation space, like DMN and BPMN, to implement decision, ruless, process and workflow logic. Kogito brings these technologies into the cloud-native world, allowing developers and businesses to implement and deploy business logic in a hybrid-cloud environment.
If you’re interested in helping continue to improve Kogito, using Kogito to develop applications, or if you’re just curious about it, please check out these links:
Kogito Decisions with DMN
In this step, you will create the Kogito application skeleton.
You start with a basic Maven-based Kogito application which has been generated from the Kogito Maven Archetype.
The Application You Will Build
The application is a decision microservice which determines the airmiles a person will get based on his/her frequent flyer status and the price of the flight.
You will implement these rules in a DMN (Decision Model & Notation) model, using DMN DRDs (Decision Requirement Diagram), decision tables and DMN FEEL (Friendly Enough Expression Language) expressions.
Let's get started.
Create a basic project
The easiest way to create a new Kogito project is to execute the Maven command below by clicking on it:
mvn archetype:generate \
This will use the Kogito Maven Archetype and generate a basic Maven project for you in the
The default Kogito application created from the archetype contains a sample process called
test-process.bpmn2. We will remove this process definition, as it is not required for our application.
rm -f /root/projects/kogito/airmiles-service/src/main/resources/test-process.bpmn2
Running the Application
We will now run the Kogito application in development mode. This allows us to keep the application running while implementing our application logic. Kogito and Quarkus will hot reload the application when it is accessed and changes have been detected.
mvn clean compile quarkus:dev
When the application has started, you can access the Swagger UI.
You should see the following page:
You've seen how to create the skeleton of basic Kogito app, and start the application in Quarkus dev-mode.
In the next step we'll add the DMN model to our application.