This is a Java/Spring Boot application, which acts as a host/platform for the Camunda BPMN. Primarily adds BPMN functionality for DAR review processes. It negotiates with gateway-api to determine processes and provide metrics around DAR processes.
- IDE: Intellij IDEA (For editing configuration and source code only)
- Java 8
- Spring Boot
- Spring Web
- Spring Data and Hibernate
- Lombok
- Postgre SQL (to deploy database tables to Docker container for integration tests)
- Google Secret Manager
- Docker (to run the Application, Redis, Postgre and SonarQ)
- SonarQ (Quality code analysis)
Requirements
- IDE: Intellij IDEA (For editing configuration and source code only)
- Java 1.8+ SDK installed
- Maven
- Docker
- Pg Admin (PostgreSQL web client)
- Postman or any other http client (to test API's on JSON format)
Maven can be installed via brew or downloaded from the maven site directly
brew install mavenDownload https://maven.apache.org/download.cgi
Extract the contents of the downloaded archive to a folder on your computer. Once done add the path to the extracted version of maven to the 'PATH' environment variable.
export PATH=$PATH:<MAVEN HOME FOLDER HERE>/binTo check that maven has been installed from either of the two steps above you can run
mvn -vSDKMan https://sdkman.io/install
sdk install java 11.0.8.hs-adptClone the workflow repository
git clone https://github.com/HDRUK/hdruk-workflowCompiling source code
mvn clean packageBuild docker image for docker compose file
docker build -t hdruk-workflow:1.0 .Configure docker-compose.yml
version: '3.1'
services:
postgresDb:
image: postgres
ports:
- 5432:5432
expose:
- 5432
environment:
- POSTGRES_USER=YOUR_USER_HERE
- POSTGRES_PASSWORD=YOUR_PASSWORD_HERE
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
sonarqube:
image: sonarqube
depends_on:
- postgresDb
ports:
- "9000:9000"
environment:
- sonar.jdbc.username=YOUR_USER_HERE
- sonar.jdbc.password=YOUR_PASSWORD_HERE
- sonar.jdbc.url=jdbc:postgresql://postgresDb:5432/sonar
redis:
image: redis
ports:
- 6379:6379
gatewayworkflow:
image: gateway-workflow:1.0
depends_on:
- postgresDb
- redis
ports:
- 8081:8080
environment:
- ENV=default
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATA_SOURCE=postgresDb
- DATA_USER=test_user
- DATA_PASS=test_user_passwordUsing a terminal navigate to the dockerCompose folder in the project.
To start the containers run the following command in a terminal.
docker-compose upTo stop all containers and remove any stored data run
docker-compose downTo validate the containers are running execute. You should see 4 images listed; gateway-workflow:1.0, sonarqube, redis, postgres
docker ps- Camunda portal - http://localhost:8081/camunda/app/welcome/default/
- Sonarqube - http://localhost:9000/
- PGAdmin - This can be gotten from the PGAdmin application. Enter the host, port, username and password to access the instance.