Skip to content

Latest commit

 

History

History

kogito-business-rules-springboot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Kogito with business rules

Description

A quickstart project that shows the use of business rules and processes

This example shows

  • make use of DRL to define rules
  • make use of business rules task in the process to evaluate rules

Build and run

Prerequisites

You will need:

  • Java 1.8.0+ installed
  • Environment variable JAVA_HOME set accordingly
  • Maven 3.5.4+ installed

Compile and Run in Local Dev Mode

mvn clean package spring-boot:run    

Compile and Run using uberjar

mvn clean package 

To run the generated native executable, generated in target/, execute

java -jar target/kogito-business-rules-sprintboot-{version}.jar

Use the application

Submit a request

To make use of this application it is as simple as putting a sending request to http://localhost:8080/persons with following content

{
  "person" : {
    "name" "john",
    "age" : 20
  }
}

Complete curl command can be found below:

curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"person" : {"name" : "john", "age" : 20}}' http://localhost:8080/persons