This demo was developed as support of the talk "Gain more freedom when migrating from Camunda Platform 7 to 8". This talk is about introducing VanillaBP which is an independent API for business processing engines. Additionally, it shows how migrations from Camunda Platform 7 to Camunda Platform 8 work without changing the code.
The process is quite simple and covers only a couple but representative situations one will face developing business processing applications:
If you are interested in a more elaborated example then checkout the Taxi Ride Blueprint.
To run the demo using Camunda Platform 7 use these commands:
mvn clean package -Pcamunda7
java -DworkerId=test -Dspring.profiles.active=camunda7 -jar target/demo-0.0.1-SNAPSHOT.jar
workerId
system-property: For details see https://github.com/vanillabp/spring-boot-support#worker-id.
To run the demo using Camunda Platform 8 you have to start Zeebe first e.g. by using docker-compose.
Afterward use these commands:
mvn clean package -Pcamunda8
java -DworkerId=test -Dspring.profiles.active=camunda8 -jar target/demo-0.0.1-SNAPSHOT.jar
workerId
system-property: For details see https://github.com/vanillabp/spring-boot-support#worker-id.
To test migration scenarios you have to start Zeebe first e.g. by using docker-compose.
Afterward use these commands:
mvn clean package -Pcamunda8,camunda7
java -DworkerId=test -Dvanillabp.default-adapter=XXXX -Dspring.profiles.active=camunda8,camunda7 -jar target/demo-0.0.1-SNAPSHOT.jar
The placeholder XXXX
for the default-adapter has to be set according to the phase of migration:
camunda7,camunda8
: Prepare migrationcamunda8,camunda7
: In migration
To test migration scenarios follow the instructions in section Usage.
For more details see documentation about migration.
The demo exposes a REST-API:
- Start the workflow: e.g. http://localhost:8080/api/demo/4
- Start a workflow by event: e.g. http://localhost:8080/api/request-demo/2
- Complete the user-task: e.g. http://localhost:8080/api/demo/4/process-task-completed/f140066a-b7fc-11ed-8a10-9664cca3abf1 (**)
- Trigger event 'Continue': e.g. http://localhost:8080/api/continue-demo/4
The given ID (in these samples 4
or 2
) is used to determine the success
attribute used by the process: Even numbers are treated as successful
and odd number as not successful
.
**) The task ID can be found in Camunda Cockpit webapp for Camunda Platform 7 or Camunda Tasklist
webapp for Camunda Platform 8. The task id is also printed in the demo's log, but in case of Camunda 8
one has to add the prefix 0x
since the logged task id is a hex-number in contrast to the task id found in Camunda 8 Tasklist.
Precondition: The demo application is built as shown in Scenarios section.
- Phase of preparation:
- Start the demo application using Spring Boot property
-Dvanillabp.default-adapter=camunda7,camunda8
which makes VanillaBP aware of both targets, but workflows are still started using Camunda Platform 7. - Start a workflow.
- Start a second workflow by triggering an event.
- Check cockpit for current status (use credentials
admin/admin
). - Complete the user-task of one workflow to run into the receive-task. Trigger the event to proof workflow completes as expected.
- Start the demo application using Spring Boot property
- Phase of migration:
- Restart the demo application using Spring Boot property
-Dvanillabp.default-adapter=camunda8,camunda7
forcing new workflows to be started using Camunda Platform 8 but still support those started using Camunda Platform 7. - Start a workflow.
- Start a second workflow by triggering an event.
- Check operate for current status (use credentials
demo/demo
). - Complete user task of old C7 workflow, makes it run into the receive-task.
- Trigger the event to complete the receive-task.
- Complete user task of new C8 workflow, makes it run into the receive-task.
- Trigger the event to complete the receive-task.
- Restart the demo application using Spring Boot property
As you can see VanillaBP chooses the right adapter for each workflow. For more details see documentation about migration.
VanillaBP was developed by Phactum with the intention of giving back to the community as it has benefited the community in the past.
Copyright 2022 Phactum Softwareentwicklung GmbH
Licensed under the Apache License, Version 2.0