diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index b11c2c9afb..7fb14ed633 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -50,6 +50,7 @@ spring-boot-keycloak-2 spring-boot-libraries spring-boot-libraries-2 + spring-boot-process-automation spring-boot-logging-log4j2 spring-boot-mvc spring-boot-mvc-2 diff --git a/spring-boot-modules/spring-boot-process-automation/.gitignore b/spring-boot-modules/spring-boot-process-automation/.gitignore new file mode 100644 index 0000000000..da7c2c5c0a --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/.gitignore @@ -0,0 +1,5 @@ +/target/ +.settings/ +.classpath +.project + diff --git a/spring-boot-modules/spring-boot-process-automation/pom.xml b/spring-boot-modules/spring-boot-process-automation/pom.xml new file mode 100644 index 0000000000..8ceb6c9a5c --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + spring-boot-process-automation + + + spring-boot-modules + com.baeldung.spring-boot-modules + 1.0.0-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter-web + + + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter-webapp + ${camunda.version} + + + com.h2database + h2 + + + org.springframework.boot + spring-boot-starter-jdbc + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + 7.18.0 + + + \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/CamundaApplication.java b/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/CamundaApplication.java new file mode 100644 index 0000000000..2862bc9ebc --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/CamundaApplication.java @@ -0,0 +1,13 @@ +package com.baeldung.camunda; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CamundaApplication { + + public static void main(String[] args) { + SpringApplication.run(CamundaApplication.class, args); + } + +} diff --git a/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java b/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java new file mode 100644 index 0000000000..ceef72ef79 --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java @@ -0,0 +1,19 @@ +package com.baeldung.camunda.task; + +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.delegate.JavaDelegate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +@Component +public class CalculateInterestService implements JavaDelegate { + + private static final Logger LOGGER = LoggerFactory.getLogger(CalculateInterestService.class); + + @Override + public void execute(DelegateExecution execution) { + LOGGER.info("calculating interest of the loan"); + } + +} diff --git a/spring-boot-modules/spring-boot-process-automation/src/main/resources/application.yaml b/spring-boot-modules/spring-boot-process-automation/src/main/resources/application.yaml new file mode 100644 index 0000000000..102790e1ed --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/src/main/resources/application.yaml @@ -0,0 +1,5 @@ +spring.datasource.url: jdbc:h2:file:./camunda-h2-database + +camunda.bpm.admin-user: + id: demo + password: demo \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-process-automation/src/main/resources/loanProcess.bpmn b/spring-boot-modules/spring-boot-process-automation/src/main/resources/loanProcess.bpmn new file mode 100644 index 0000000000..c3245e5bfd --- /dev/null +++ b/spring-boot-modules/spring-boot-process-automation/src/main/resources/loanProcess.bpmn @@ -0,0 +1,67 @@ + + + + + SequenceFlow_14bdz4q + + + + SequenceFlow_1s49wir + + + + + SequenceFlow_0d726xt + SequenceFlow_1s49wir + + + SequenceFlow_14bdz4q + SequenceFlow_0d726xt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +