BPA - Exercise 2
- Eray Dertsiz
- Henrik Heinen
- Manuel Pfeiffer
- Julius Seiferth
Videos
- Environment Setup: https://drive.google.com/file/d/1fvR0s7527aWiOUqmK_ViRL9cLvxtZ-CA/view?usp=sharing
- Deploy and Run an Instance: https://drive.google.com/file/d/1z2m2qs6Vo0PNFaAIffIoZT_pMFK1KpM4/view?usp=sharing
Prerequisites
- Pre-installed OpenJDK 21 (Check your java version by typing
java -version
into a terminal. If your Java version is not 21, you can download it with the following link https://www.oracle.com/de/java/technologies/downloads/#java21 . After installation ensure that your Java version is 21 withjava -version
command.) - Latest Docker Engine installation. (Tested with latest Docker Desktop installation: (https://www.docker.com/products/docker-desktop/)
Before You Run
There are 2 constants in file ExercisetwoApplication.java in src folder. These constants should be configured before run. If you want to receive email notifications of tasks while working on the instance, change USER_EMAIL to your email address.
private static final int DISTANCE_IN_KM = 20
private static final String USER_EMAIL = "edertsiz1@gmail.com"
How to Run?
- Download and unzip the repo into a folder.
- Open a terminal in the root folder "exercisetwo". Type
docker compose -f docker-compose-core.yaml up -d
in the terminal. This will pull and launch the necessary docker containers to deploy and run our process. This will take few minutes. After the command finished execution, it takes 1-2 minutes for containers to be functionable and reachable. (After waiting 1-2 minutes, test connection to the containers by visiting http://localhost:8081 from browser. Username: demo pass: demo). - Open another terminal in the root folder exercisetwo. Type and run
apache-maven-3.9.9/bin/mvn spring-boot:run
. This command will deploy our process into zeebe container. Connect to http://localhost:8081 again to verify that our process has been deployed. (If you get permission denied error, type and runchmod +x apache-maven-3.9.9/bin/mvn
command to grant maven required permissions.) - The process should has been deployed and an instance should has been started. Navigate to http://localhost:8082 to complete user tasks with forms. (Username: demo pass: demo)
Possible Errors and Solutions
Docker container name collision:
When executing docker compose -f docker-compose-core.yaml up -d
, if there are some containers with the same name, the command can throw name collision error. In that case, you can stop and delete all containers related to Camunda and try to run the command again.
mvn permission denied:
Open a terminal, type and run chmod +x apache-maven-3.9.9/bin/mvn
command to grant maven required permissions.