Valtimo-backend-implementation-template
Requirements
- Ensure docker desktop is installed and running.
Configure steps to take after templating
Adjust Gradle properties file
Adjust the projectName to a global name for the project. Don't focus on the first bpmn process name for example but rather take your time and find an overarching name. Here you can also control the main libraries for Spring/Kotlin/Valtimo.
Environment variables
Create a local ".env.properties" from a example env file
Valtimo modules
Most modules are open source some are not these are from Valtimo-backend-plus-libraries project.
maven { url = uri("https://repo.ritense.com/repository/maven-public/") }
maven { url = uri("https://repo.ritense.com/repository/maven-snapshot/") }
Resource - Choose your module (only 1)
-
Local resource
implementation("com.ritense.valtimo:local-resource:X.X.X.RELEASE")
-
S3 resource
implementation("com.ritense.valtimo:s3-resource:X.X.X.RELEASE")
Note: Valtimo-backend-plus-libraries: -
Openzaak resource
implementation("com.ritense.valtimo:openzaak-resource:X.X.X.RELEASE")
Mail - Choose your module (only 1)
-
Local mail
implementation("com.ritense.valtimo:local-mail:X.X.X.RELEASE")
Note: this module has no properties -
Flowmailer
implementation("com.ritense.valtimo:flowmailer:X.X.X.RELEASE")
-
Mandrill
implementation("com.ritense.valtimo:mandrill:X.X.X.RELEASE")
All have different configs just be added to .env.properties file.
docker-compose.yaml
Choose DB provider in
In the docker-compose.yml there are 2 main dbs to choose from Mysql or Postgres.
Keycloak defaults
Keycloak also is part of the default setup but can be left as is. Note that 3 users are default added to a valtimo realm. admin:admin, user:user and developer:developer.
docker-compose-integration-test.yaml
This file contains the test db which is used when running integrationTest task in gradle.
Auto-configuration (no annotations approach)
Ritense recommends to use autoconfigures over annotation based classes (Service/RestController etc.). This allows spring to be snappier when starting up because scanning the whole project is slower. Also creating a overview of what your project needs is better approach when testing the implementation for instance. Create autoconfigures for your implementation in com.ritense.valtimo.autoconfigure, once created add them to the meta-inf/spring.factories to be picked up
Setup integration testing
Open BaseIntegrationTest and add the autoconfigures from previous step. If you want to control Valtimo startup flow comment/uncomment/add autoconfigure in TestConfiguration