-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/pizza-e-vino
- Loading branch information
Showing
61 changed files
with
1,889 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
customer-onboarding-showcase/customer-onboarding-frontend/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<parent> | ||
<groupId>io.miragon.miranum.consulting</groupId> | ||
<artifactId>customer-onboarding-showcase</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.miragon.miranum.consulting</groupId> | ||
<artifactId>customer-onboarding-frontend</artifactId> | ||
<name>customer-onboarding-frontend</name> | ||
<description>customer-onboarding-frontend</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-thymeleaf</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
...o/miragon/miranum/examples/customer/onboarding/CustomerOnboardingFrontendApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.miragon.miranum.examples.customer.onboarding; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class CustomerOnboardingFrontendApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(CustomerOnboardingFrontendApplication.class, args); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...omer-onboarding-showcase/customer-onboarding-frontend/src/main/resources/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
server: | ||
port: 5050 | ||
|
||
miranum: | ||
customer-onboarding-starter: | ||
port: 5151 | ||
url: http://localhost:${miranum.customer-onboarding-starter.port}/api/place-application |
28 changes: 28 additions & 0 deletions
28
...-onboarding-showcase/customer-onboarding-frontend/src/main/resources/static/css/style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
width: 500px; | ||
} | ||
|
||
.interaction-container { | ||
margin: auto; | ||
} | ||
|
||
.jumbotron { | ||
padding: 4rem 2rem 2rem 2rem; | ||
margin-bottom: 0; | ||
} | ||
|
||
.input-group { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-end; | ||
gap: 10px; | ||
} | ||
|
||
.submit-button { | ||
display: flex; | ||
justify-content: right; | ||
margin-top: 40px; | ||
} |
39 changes: 39 additions & 0 deletions
39
...er-onboarding-showcase/customer-onboarding-frontend/src/main/resources/static/js/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
$("#form").submit(async function (event) { | ||
event.preventDefault(); | ||
|
||
const data = { | ||
"name": $("#name").val(), | ||
"email": $("#email").val(), | ||
"address": $("#address").val(), | ||
"income": $("#income").val(), | ||
"employment": $("#employment").val() | ||
}; | ||
|
||
fetch(processStarterURL, | ||
{ | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify(data) | ||
} | ||
).then(resp => { | ||
console.log(resp.status); | ||
if (resp.status === 201) { | ||
return resp.json(); | ||
} | ||
throw new Error("Application not successful"); | ||
}).then(resp => { | ||
const text = `Your application was successful, you will be notified soon!`; | ||
$('.response').append('<br><p style="border:2px solid green; text-align: center">' + text + '</p>'); | ||
cleanInputs(); | ||
}).catch(err => { | ||
console.error(err); | ||
$('.response').append('<br><p style="border:2px solid red; text-align: center">' + err + '</p>'); | ||
}) | ||
}) | ||
; | ||
|
||
const cleanInputs = () => { | ||
$('#form')[0].reset(); | ||
} |
81 changes: 81 additions & 0 deletions
81
...-onboarding-showcase/customer-onboarding-frontend/src/main/resources/templates/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport"‚ | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" | ||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" | ||
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" | ||
crossorigin="anonymous"> | ||
|
||
<link rel="stylesheet" | ||
href="css/style.css" th:src="@{/css/style.css}"> | ||
<title>ACME Onboarding</title> | ||
|
||
<script th:inline="javascript"> | ||
/*<![CDATA[*/ | ||
|
||
const processStarterURL = /*[[${@environment.getProperty('miranum.customer-onboarding-starter.url')}]]*/ null; | ||
|
||
/*]]>*/ | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<div class="interaction-container"> | ||
<div class="jumbotron"> | ||
<h1 class="display-4">Welcome to ACME AG ⚡</h1> | ||
<p>On this website you can easily start a customer-onboarding-process!</p> | ||
<hr class="my-4"> | ||
<form id="form"> | ||
<div class="input-group mb-3"> | ||
<label>Your name:</label> | ||
<input required type="text" id="name" name="name" class="form-control" placeholder="John Doe" | ||
aria-label="Type something" aria-describedby="button-addon2"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<label>Email Address:</label> | ||
<input required type="email" id="email" name="email" class="form-control" placeholder="[email protected]" | ||
aria-label="Type something" aria-describedby="button-addon2"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<label>Address to be provisioned:</label> | ||
<input required type="text" id="address" name="address" class="form-control" placeholder="Street 1, 12345 City" | ||
aria-label="Your address" aria-describedby="button-addon2"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<label>Employment:</label> | ||
<input required type="text" id="employment" name="employment" class="form-control" placeholder="permanent" | ||
aria-label="Your name" aria-describedby="button-addon2"> | ||
</div> | ||
<div class="input-group mb-3"> | ||
<label>Net income per year:</label> | ||
<input required type="number" id="income" name="income" class="form-control" placeholder="10000" | ||
aria-label="Your name" aria-describedby="button-addon2"> | ||
</div> | ||
<div class="submit-button mb-3"> | ||
<input type="submit" value="Submit" class="btn btn-primary"/> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div> | ||
<div class="response"></div> | ||
</div> | ||
</div> | ||
<!-- Optional JavaScript --> | ||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" th:src="@{https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js}"></script> | ||
<script | ||
src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" | ||
th:src="@{https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js}" | ||
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" | ||
crossorigin="anonymous"></script> | ||
<script src="js/index.js" th:src="@{/js/index.js}"></script> | ||
</body> | ||
</html> |
58 changes: 58 additions & 0 deletions
58
customer-onboarding-showcase/customer-onboarding-mail/customer-onboarding-mail-c7/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<artifactId>customer-onboarding-mail-c7</artifactId> | ||
<name>customer-onboarding-mail-c7</name> | ||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>jar</packaging> | ||
|
||
<parent> | ||
<groupId>io.miragon.miranum.consulting</groupId> | ||
<artifactId>customer-onboarding-mail</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.miragon.miranum.consulting</groupId> | ||
<artifactId>customer-onboarding-mail-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<!--Miranum--> | ||
<dependency> | ||
<groupId>io.miragon.miranum</groupId> | ||
<artifactId>worker-adapter-c7</artifactId> | ||
<version>${miranum.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.miragon.miranum</groupId> | ||
<artifactId>element-templates-c7</artifactId> | ||
<version>${miranum.version}</version> | ||
</dependency> | ||
|
||
<!--Camunda--> | ||
<dependency> | ||
<groupId>org.camunda.community</groupId> | ||
<artifactId>camunda-engine-rest-client-complete-springboot-starter</artifactId> | ||
<version>${camunda7.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
12 changes: 12 additions & 0 deletions
12
.../io/miragon/miranum/examples/customer/onboarding/CustomerOnboardingMailC7Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.miragon.miranum.examples.customer.onboarding; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class CustomerOnboardingMailC7Application { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(CustomerOnboardingMailC7Application.class, args); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
.../customer-onboarding-mail/customer-onboarding-mail-c7/src/main/resources/application.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
camunda: | ||
bpm: | ||
client: | ||
base-url: http://localhost:8080/engine-rest | ||
autoDeploy: | ||
enabled: false | ||
disable-backoff-strategy: true |
42 changes: 42 additions & 0 deletions
42
customer-onboarding-showcase/customer-onboarding-mail/customer-onboarding-mail-core/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<artifactId>customer-onboarding-mail-core</artifactId> | ||
<name>customer-onboarding-mail-core</name> | ||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>jar</packaging> | ||
|
||
<parent> | ||
<groupId>io.miragon.miranum.consulting</groupId> | ||
<artifactId>customer-onboarding-mail</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.miragon.miranum</groupId> | ||
<artifactId>mail-core</artifactId> | ||
<version>${miranum.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.miragon.miranum</groupId> | ||
<artifactId>worker-api</artifactId> | ||
<version>${miranum.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.miragon.miranum</groupId> | ||
<artifactId>element-template-api</artifactId> | ||
<version>${miranum.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
19 changes: 19 additions & 0 deletions
19
...src/main/java/io/miragon/miranum/examples/customer/onboarding/adapter/in/MailCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.miragon.miranum.examples.customer.onboarding.adapter.in; | ||
|
||
import io.miragon.miranum.connect.elementtemplate.api.ElementTemplateProperty; | ||
import io.miragon.miranum.connect.elementtemplate.api.PropertyType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
public class MailCommand { | ||
@ElementTemplateProperty(type = PropertyType.STRING, notEmpty = true, label = "Name") | ||
private String name; | ||
@ElementTemplateProperty(type = PropertyType.STRING, notEmpty = true, label = "Email") | ||
private String email; | ||
@ElementTemplateProperty(type = PropertyType.STRING, notEmpty = true, label = "Subject") | ||
private String content; | ||
} |
25 changes: 25 additions & 0 deletions
25
...n/miranum/examples/customer/onboarding/adapter/in/MiranumCustomerNotificationAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.miragon.miranum.examples.customer.onboarding.adapter.in; | ||
|
||
import io.miragon.miranum.connect.elementtemplate.api.BPMNElementType; | ||
import io.miragon.miranum.connect.elementtemplate.api.GenerateElementTemplate; | ||
import io.miragon.miranum.connect.worker.api.Worker; | ||
import io.miragon.miranum.integrations.mail.application.port.in.SendMailCommand; | ||
import io.miragon.miranum.integrations.mail.application.port.in.SendMailUseCase; | ||
import lombok.AllArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
public class MiranumCustomerNotificationAdapter { | ||
|
||
private final SendMailUseCase sendMailUseCase; | ||
|
||
@Worker(type = "mailDelivery") | ||
@GenerateElementTemplate(name = "Mail Delivery", | ||
id = "mail-delivery", | ||
type = "mailDelivery", | ||
appliesTo = {BPMNElementType.BPMN_SERVICE_TASK}, | ||
version = 1) | ||
public void notifyCustomer(MailCommand sendMailCommand) { | ||
SendMailCommand mailCommand = SendMailCommandFactory.create(sendMailCommand); | ||
sendMailUseCase.sendMail(mailCommand); | ||
} | ||
} |
Oops, something went wrong.