Skip to content

vanillabp/blueprint-workflowmodule-springboot-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VanillaBP

Blueprint "Standalone"

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:

loan_approval.bpmn

Getting Started

  1. Create an empty project directory and run:
     mvn archetype:generate \
     -DarchetypeGroupId=io.vanillabp.blueprint \
     -DarchetypeArtifactId=workflowmodule-springboot-standalone-archetype \
     -DgroupId={your.groupId} \
     -DartifactId={your.artifactId} \
     -Dversion={your.version}
    Hint: If you want a specific archetype version add -DarchetypeVersion={e.g 0.0.1}
     
  2. Build the application:
    mvn clean package -Pcamunda7
  3. Start the application:
    java -jar target/loan-approval.jar --spring.profiles.active=camunda7

Using the demo

This demo is very simple and does not include a user interface. To go through the entire loan approval follow these steps:

  1. 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.
  2. Checkout logs for retrieving the ID of the user task "Assess risk".
  3. 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)
  4. The service task "Transfer money" is executed depending on the value chosen for "riskIsAcceptable".

Hints:

Building an application for your own use case

If you want to use the project generated based on the archetype as a base for your use case, then

  1. choose a proper identifier for your business use case.
  2. rename the Java package blueprint.workflowmodule.standalone.loanapproval according to your projects package and use case identifier (e.g. com.mycompany.myusecase).
  3. search case-insensitive in all files for all occurrences of loanapproval or loan-approval and replace it by the identifier of your use case.
  4. place your BPMN file in the directory src/main/resources/processes/camunda7 and change the annotation @BpmnProcess found in Java class service pointing to your BPMN file's name.

Interesting to know

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.

Noteworthy & Contributors

VanillaBP was developed by Phactum with the intention of giving back to the community as it has benefited the community in the past.
Phactum

License

Copyright 2025 Phactum Softwareentwicklung GmbH

Licensed under the Apache License, Version 2.0

About

Blueprint of a standalone Spring Boot VanillaBP workflow module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages