This is a code-sample which shows how the Taxi Ride Blueprint SPI simplifies building business processing applications.
Additionally, it highlights the differences to the former approach since it implements the same reduced taxi process. This former approach has been used in past projects and has been presented at the talk "How to Say Goodbye to Process Variables" which was part of the Camunda-Summit 2022. Checkout the improvements-section underneath to get a brief summary of differences.
Using an aspect oriented programming (AOP) design of the SPI...
- ...prevents domination of business code by the SPI.
- ...hides the workflow system API (e.g. for easy upgrades from Camunda 7 to Camunda 8).
- ...keeps the business-code readable and maintainable.
- ...enables validation of correct BPMN wiring at startup of the application.
The components of the sample:
- BPMN: src/main/resources/processes/TaxiRide.bpmn
- Workflow-aggregate: src/main/java/at/phactum/blueprint/taxiride/domain
- BPMN tasks implementation: src/main/java/at/phactum/blueprint/taxiride/TaxiRide.java
Hint: This Maven project does not produce a runnable Spring Boot application but it runs a Spring Boot integration test to prove the functionality of the TaxiRide
business bean. Use mvn verify
to run the test.
Hint: This sample uses Camunda 7. If you run a local installation of Camunda 8 then change Maven dependency blueprint-camunda7-adapter
to blueprint-camunda8-adapter
in pom.xml
and adopt @ActiveProfiles
in class TaxiRideIT
from "camunda7"
to "camunda8"
.