Integration between Micronaut and Camunda BPM Process Engine
This project allows you to easily integrate the Camunda BPM Process Engine into existing Micronaut projects.
Advantages of Micronaut together with Camunda:
- Monumental leap in startup time
- Minimal memory footprint
- (...)
Advantages of Camunda BPM together with Micronaut:
- BPMN 2.0 Support
- Embedded process engine with low memory footprint
- (...)
Micronaut + Camunda = ❤️
NOTE: Currently, this project is a proof of concept. In future it will hopefully be as easy as adding a dependency to your Micronaut project and optionally overwriting some default configuration values to have an embedded Camunda BPM engine up and running.
- Camunda BPM can be integrated into a Micronaut project by simply adding a dependency in build.gradle (Gradle) or pom.xml (Maven). (not yet available on Maven Central)
- Camunda Process engine is started automatically with H2 in-memory database by adding H2 as a dependency.
- Models (*.bpmn, *.cmmn, and *.dmn) found in the classpath are automatically deployed. (currently only resources in root directory)
- Micronaut beans are resolved from the application context if they are referenced in expressions within the process models.
Please also read the FAQ.
In build.gradle add the dependency:
implementation "info.novatec.micronaut.camunda.feature:micronaut-camunda-feature:0.1-SNAPSHOT"
You may use the following properties (typically in in application.yml) to configure the Camunda BPM integration.
Prefix | Property | Default | Description |
---|---|---|---|
datasources.default | .url | jdbc:h2:mem:micronaut-db;DB_CLOSE_DELAY=1000 | Database URL |
.username | sa | User name for database | |
.password | Password for database | ||
.driverClassName | org.h2.Driver | Driver for database | |
camunda.bpm.database | .schema-update | true | If automatic schema update should be applied, use one of [true, false, create, create-drop, drop-create] |
Create a local Git clone:
git clone https://github.com/NovatecConsulting/micronaut-camunda-bpm.git
To import the project into IntelliJ IDEA simply open the build.gradle file and follow the instructions to import the project.
For IntelliJ IDEA if you plan to use the IntelliJ compiler then you should enable annotation processing under the "Build, Execution, Deployment → Compiler → Annotation Processors" by ticking the "Enable annotation processing" checkbox.
Once you have enabled annotation processing in IntelliJ you can run the application and tests directly within the IDE without the need of an external build tool such as Gradle.
Unix:
./gradlew clean run
Windows:
gradlew.bat clean run
Open http://localhost:8080/greet/YourName in your browser