This example uses Quarkus, the Supersonic Subatomic Java Framework,
in combination with the extension camunda-bpm-quarkus-engine
.
It demonstrates how you can use the Camunda Platform Runtime Engine in combination with Quarkus to spawn a node that:
- Connects to an H2 on-disk database.
- Configures and bootstraps a process engine.
- Exposes two REST endpoints which:
- Deploy the process.bpmn.
- Start a process instance that calls the MyServiceDelegate bean.
You can:
- Go to http://localhost:8080/deploy-process to deploy the provided BPMN process.
- Go to http://localhost:8080/start-process to start a process instance of the deployed BPMN process.
- Observe the console and watch out for the following log output:
2021-08-05 16:58:39,286 INFO [org.cam.bpm.qua.exa.MyServiceDelegate] (executor-thread-0) Hurray! MyService has been called!
If you want to learn more about Quarkus, please visit: https://quarkus.io/.
- Java 11+
- Maven 3.8.1+
You can run your application in dev mode that enables live coding using:
mvn clean compile quarkus:dev
NOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
The application can be packaged using:
mvn clean package
It produces the quarkus-run.jar
file in the target/quarkus-app/
directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/
directory.
If you want to build an über-jar, execute the following command:
mvn clean package -Dquarkus.package.type=uber-jar
The application is now runnable using java -jar target/camunda-bpm-quarkus-example-simple-rest-1.0.0-SNAPSHOT-runner.jar
.