A quickstart project is the simplest hello world kind of example, it accepts input and replies with hello message.
This example shows
- invoking scripts from within process
- Diagram Properties (top)
- Diagram Properties (bottom)
- Hello Script Task
- Update Message Script Task
You will need:
- Java 11+ installed
- Environment variable JAVA_HOME set accordingly
- Maven 3.6.2+ installed
mvn clean package spring-boot:run
mvn clean package
To run the generated native executable, generated in target/
, execute
java -jar target/kogito-scripts-sprintboot-{version}.jar
To make use of this application it is as simple as putting a sending request to http://localhost:8080/scripts
with following content
{
"name" : "john"
}
Complete curl command can be found below:
curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"name" : "john"}' http://localhost:8080/scripts
Log after curl executed
{"id":"ab5239e2-f497-4684-b337-5a44440b38dd","name":"john","message":"Hello john"}
Likewise on Springboot you should see a similar log to
Hello john"