From 9ac3f4ffea3df5eaac16f35853e61b99bf70473a Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sun, 27 Nov 2022 10:49:48 +0330 Subject: [PATCH 1/6] #BAEL-5948:add new maven module --- spring-boot-modules/pom.xml | 1 + .../spring-boot-libraries-3/pom.xml | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 spring-boot-modules/spring-boot-libraries-3/pom.xml diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index b11c2c9afb..f17686752a 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-libraries-3 spring-boot-logging-log4j2 spring-boot-mvc spring-boot-mvc-2 diff --git a/spring-boot-modules/spring-boot-libraries-3/pom.xml b/spring-boot-modules/spring-boot-libraries-3/pom.xml new file mode 100644 index 0000000000..0a924a46c2 --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + spring-boot-libraries-3 + + + 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 From 68c5a730eb4b5406dcb77d6a08f526189791fa76 Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sun, 27 Nov 2022 10:50:05 +0330 Subject: [PATCH 2/6] #BAEL-5948:add gitignore file --- spring-boot-modules/spring-boot-libraries-3/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 spring-boot-modules/spring-boot-libraries-3/.gitignore diff --git a/spring-boot-modules/spring-boot-libraries-3/.gitignore b/spring-boot-modules/spring-boot-libraries-3/.gitignore new file mode 100644 index 0000000000..da7c2c5c0a --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/.gitignore @@ -0,0 +1,5 @@ +/target/ +.settings/ +.classpath +.project + From e3f229f61d79ed90cf765d16c52936d871dd97b2 Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sun, 27 Nov 2022 10:50:29 +0330 Subject: [PATCH 3/6] #BAEL-5948:add main source code --- .../baeldung/camunda/CamundaApplication.java | 13 +++++++++++++ .../task/CalculateInterestService.java | 19 +++++++++++++++++++ .../src/main/resources/application.yaml | 5 +++++ 3 files changed, 37 insertions(+) create mode 100644 spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/CamundaApplication.java create mode 100644 spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java create mode 100644 spring-boot-modules/spring-boot-libraries-3/src/main/resources/application.yaml diff --git a/spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/CamundaApplication.java b/spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/CamundaApplication.java new file mode 100644 index 0000000000..2862bc9ebc --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/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-libraries-3/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java b/spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java new file mode 100644 index 0000000000..ceef72ef79 --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/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-libraries-3/src/main/resources/application.yaml b/spring-boot-modules/spring-boot-libraries-3/src/main/resources/application.yaml new file mode 100644 index 0000000000..102790e1ed --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/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 From b46712fa14670bf52f7da7a849f6b49936143968 Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sun, 27 Nov 2022 10:50:56 +0330 Subject: [PATCH 4/6] #BAEL-5948:add sample loan process --- .../src/main/resources/loanProcess.bpmn | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn diff --git a/spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn b/spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn new file mode 100644 index 0000000000..c3245e5bfd --- /dev/null +++ b/spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn @@ -0,0 +1,67 @@ + + + + + SequenceFlow_14bdz4q + + + + SequenceFlow_1s49wir + + + + + SequenceFlow_0d726xt + SequenceFlow_1s49wir + + + SequenceFlow_14bdz4q + SequenceFlow_0d726xt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 16a81bf9f9474556a73db1846933f57d27475070 Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sat, 3 Dec 2022 10:27:08 +0330 Subject: [PATCH 5/6] #BAEL-5948:rename module name in parent pom --- spring-boot-modules/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index f17686752a..7fb14ed633 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -50,7 +50,7 @@ spring-boot-keycloak-2 spring-boot-libraries spring-boot-libraries-2 - spring-boot-libraries-3 + spring-boot-process-automation spring-boot-logging-log4j2 spring-boot-mvc spring-boot-mvc-2 From 010163e5411851eef185e5b599a481b65ce68b59 Mon Sep 17 00:00:00 2001 From: h_sharifi Date: Sat, 3 Dec 2022 10:28:19 +0330 Subject: [PATCH 6/6] #BAEL-5948:rename module name from spring-boot-libraries-3 to spring-boot-process-automation --- .../.gitignore | 0 .../pom.xml | 2 +- .../src/main/java/com/baeldung/camunda/CamundaApplication.java | 0 .../com/baeldung/camunda/task/CalculateInterestService.java | 0 .../src/main/resources/application.yaml | 0 .../src/main/resources/loanProcess.bpmn | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/.gitignore (100%) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/pom.xml (96%) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/src/main/java/com/baeldung/camunda/CamundaApplication.java (100%) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java (100%) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/src/main/resources/application.yaml (100%) rename spring-boot-modules/{spring-boot-libraries-3 => spring-boot-process-automation}/src/main/resources/loanProcess.bpmn (100%) diff --git a/spring-boot-modules/spring-boot-libraries-3/.gitignore b/spring-boot-modules/spring-boot-process-automation/.gitignore similarity index 100% rename from spring-boot-modules/spring-boot-libraries-3/.gitignore rename to spring-boot-modules/spring-boot-process-automation/.gitignore diff --git a/spring-boot-modules/spring-boot-libraries-3/pom.xml b/spring-boot-modules/spring-boot-process-automation/pom.xml similarity index 96% rename from spring-boot-modules/spring-boot-libraries-3/pom.xml rename to spring-boot-modules/spring-boot-process-automation/pom.xml index 0a924a46c2..8ceb6c9a5c 100644 --- a/spring-boot-modules/spring-boot-libraries-3/pom.xml +++ b/spring-boot-modules/spring-boot-process-automation/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - spring-boot-libraries-3 + spring-boot-process-automation spring-boot-modules diff --git a/spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/CamundaApplication.java b/spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/CamundaApplication.java similarity index 100% rename from spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/CamundaApplication.java rename to spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/CamundaApplication.java diff --git a/spring-boot-modules/spring-boot-libraries-3/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 similarity index 100% rename from spring-boot-modules/spring-boot-libraries-3/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java rename to spring-boot-modules/spring-boot-process-automation/src/main/java/com/baeldung/camunda/task/CalculateInterestService.java diff --git a/spring-boot-modules/spring-boot-libraries-3/src/main/resources/application.yaml b/spring-boot-modules/spring-boot-process-automation/src/main/resources/application.yaml similarity index 100% rename from spring-boot-modules/spring-boot-libraries-3/src/main/resources/application.yaml rename to spring-boot-modules/spring-boot-process-automation/src/main/resources/application.yaml diff --git a/spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn b/spring-boot-modules/spring-boot-process-automation/src/main/resources/loanProcess.bpmn similarity index 100% rename from spring-boot-modules/spring-boot-libraries-3/src/main/resources/loanProcess.bpmn rename to spring-boot-modules/spring-boot-process-automation/src/main/resources/loanProcess.bpmn