A blueprint of a standalone Spring Boot application demonstrating how to use VanillaBP SPI for BPMN-based workflows. This example covers a very minimal set of scenarios for developing business process applications and serves as a starting point for more complex use cases.
In order to develop a better understanding of the use of vanillabp, a concrete technical process “loan approval” is used instead of an abstract demo process:
- Create an empty project directory and run:
Hint: If you want a specific archetype version add
mvn archetype:generate \ -DarchetypeGroupId=io.vanillabp.blueprint \ -DarchetypeArtifactId=workflowmodule-springboot-standalone-archetype \ -DgroupId={your.groupId} \ -DartifactId={your.artifactId} \ -Dversion={your.version}
-DarchetypeVersion={e.g 0.0.1}
- Build the application:
mvn clean package -Pcamunda7
- Start the application:
java -jar target/loan-approval.jar --spring.profiles.active=camunda7
This demo is very simple and does not include a user interface. To go through the entire loan approval follow these steps:
- Start processing of loan approval using this URL:
http://localhost:8080/api/loan-approval/request-loan-approval?loanAmount=1000
As a result you will get the loan approval's request ID needed in subsequent URLs. - Checkout logs for retrieving the ID of the user task "Assess risk".
- Complete the user task by either accepting or denying the risk by this URL:
http://localhost:8080/api/loan-approval/{loanRequestId}/assess-risk/{taskId}?riskIsAcceptable=true
(replace placeholders by the values collected in previous steps) - The service task "Transfer money" is executed depending on the value chosen for "riskIsAcceptable".
Hints:
- To see currently running processes use your local Camunda 7 Cockpit.
- For running this demo using Camunda 8 checkout Camunda 8 README.
- For understanding the given Spring Boot configuration files read VanillaBP docs for VanillaBP Spring Boot support and VanillaBP Camunda 7 adapter.
If you want to use the project generated based on the archetype as a base for your use case, then
- choose a proper identifier for your business use case.
- rename the Java package
blueprint.workflowmodule.standalone.loanapproval
according to your projects package and use case identifier (e.g.com.mycompany.myusecase
). - search case-insensitive in all files for all occurrences of
loanapproval
orloan-approval
and replace it by the identifier of your use case. - place your BPMN file in the directory
src/main/resources/processes/camunda7
and change the annotation@BpmnProcess
found in Java classservice
pointing to your BPMN file's name.
The default Maven profile is camunda7
, which includes the Camunda 7 adapter dependency.
Additionally, a Spring profile camunda7
needs to be used at runtime providing proper configuration.
For Camunda 8 the respective profile camunda8
has to be used.
Refer to the specific README since additional setup is required.
The components included in this blueprint are structured based on content-related criteria.
This is intentional to promote modularity and maintainability.
As an example, a fictional process based loan-approval
is implemented. On developing your own
use-cases each independent use case needs it's own aggregate,
repository, API controller and service placed in its own Java package.
By keeping use cases separate, it becomes easier to extend the application, manage dependencies, and keep clear boundaries between different features.
This blueprint is about a single workflow module. If you are interested in implementing multiple workflow modules, you should take a look at other blueprints that cover these scenarios.
Other concepts VanillaBP is based on can be found in VanillaBP SPI documentation.
VanillaBP was developed by Phactum with the intention of giving back to the community as it has benefited the community in the past.
Copyright 2025 Phactum Softwareentwicklung GmbH
Licensed under the Apache License, Version 2.0