Create your first application with Kogito

Create your first application with Kogito

Kogito is cloud-native development, deployment, and execution platform for building intelligent applications, backed by battle-tested capabilities. It originates from well-known open source projects, such as Drools and jBPM. Key characteristics of Kogito include:

  • Cloud-first — Cloud deployment is the first and foremost target runtime environment.
  • Domain-specific — No more leaking abstraction of the technology behind the service to your client applications.
  • Empowering developers  Kogito offers a powerful developer experience based on battle-tested components.

Create your first application

This article covers:

  • Configuring your IDE with modeler plugin.
  • Generating a new project.
  • Building and running the project.

Everything you need to grow your career.

With your free Red Hat Developer program membership, unlock our library of cheat sheets and ebooks on next-generation application development.

SIGN UP

Install Eclipse with modeling plugins

To be able to make use of visual modeling of your processes download Eclipse IDE and install from Marketplace

  • Eclipse BPMN2 Modeler plugin (with jBPM Runtime Extension)

Note: Currently, the Eclipse IDE is the only IDE that has complete support for both process and rule modeling but the team is working on bringing in web-based embeddable BPMN2, DMN and Scenario editors to VSCode and Eclipse Che.

To build your own service that is powered by Kogito, the best way is to start by generating a project using the Maven Archetype.

SpringBoot

Generate project

mvn archetype:generate -DarchetypeGroupId=org.kie.kogito -DarchetypeArtifactId=kogito-springboot-archetype -DarchetypeVersion=0.1.3 -DgroupId=com.company -DartifactId=sample-kogito

Tools are included in the project out-of-the-box that allow testing the generated application. Simply build the project with Maven and start the application.

As before, you have the option to start it using SpringBoot Maven plugin or as a normal Java service. We will use the SpringBoot Maven plugin in this example.

Start your application

Open your command line and go into the newly created sample-kogito folder.

mvn clean package spring-boot:run

Implement your application logic

You’re now ready to implement your business logic that can be composed of business processes, rules, decision tables, Java services, and more.

Build and run in JVM mode

mvn clean package
java -jar target/jbpm-springboot-example-{version}.jaror on Windows
java -jar target\jbpm-springboot-example-{version}.jar

Learn more

DevNation Live: Introducing Kogito

Share