This project contains a simple quarkus application that implements the external Query Service described in serverless-workflow-qas-service-showcase/README.md and where the queries are resolved. Please read it before to continue.
The same infrastructure requirements as described in Query Answer Service apply for this service.
The same prerequisites as described in Query Answer Service apply for this service.
mvn clean package quarkus:dev
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
To enable persistence, please append -Ppersistence
to your Maven command. That will ensure the correct dependencies are in place and automatically set the required properties to connect with the PostgreSQL instance from the provided docker compose.
mvn clean package -Ppersistence
Note that this requires GRAALVM_HOME to point to a valid GraalVM installation
mvn clean package -Pnative
To run the generated native executable, generated in target/
, execute
./target/query-service-{version}-runner
Use the following curl command to list all the pending queries in the query service:
curl -X 'GET' 'http://localhost:8283/query-service' -H 'accept: application/json'
Use the following curl command if you want to manually resolve a pending query:
curl -X 'POST' \ 'http://localhost:8283/query-service/resolveQuery' \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d '{ "processInstanceId": "A valid SW process instance id -> 355eebfb-2c88-4f4a-969d-290197ddfc80", "queryResponse": "The response to send" }'
The swagger is also available in the following url: http://localhost:8283/q/swagger-ui