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
You will need:
- Java 1.8.0+ installed
- Environment variable JAVA_HOME set accordingly
- Maven 3.5.4+ installed
mvn clean package spring-boot:run
mvn clean package
To run the generated native executable, generated in target/
, execute
java -jar target/kogito-business-rules-sprintboot-{version}.jar
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