tree: 0ad91a1895b89258d2191853735f152830096067 [path history] [tgz]
  1. data/
  2. model/
  3. src/
  4. utils/
  5. pom.xml
  6. README.md
  7. requirements.txt
serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md

Kogito Serverless Workflow - Openvino Hello World Example

Description

This example contains a workflow definition that emulates functionality exposed by openvino hello world example

The flow, given an image file name containing a dog image, returns that dog's race.

Installing and Running

Prerequisites

You will need:

  • Java 11+ installed
  • Environment variable JAVA_HOME set accordingly
  • Maven 3.8.6+ installed
  • Python3 installed
  • Jep installed. Instructions here
  • Python required libraries. Run pip install -r requirements.txt. Requirements.txt is on example root path.

Compile and Run in Local Dev Mode

mvn clean package quarkus:dev

Compile and Run in JVM mode

mvn clean package 
java -jar target/quarkus-app/quarkus-run.jar

or on Windows

mvn clean package
java -jar target\quarkus-app\quarkus-run.jar

Submit a request

The service based on the JSON workflow definition can be access by sending a request to http://localhost:8080/openvino_helloworld with following content

{
  "fileName": "path to a file containing a picture of a dog"
}

Complete curl command can be found below:

curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"fileName": <path>}' http://localhost:8080/openvino_helloworld

The flow should return a message with the dog race as property group.