Skip to content
Permalink
Browse files

updated to latest Camunda version, added spring boot jdbc dependency …

…to read jdbc url from config
  • Loading branch information...
berndruecker committed Mar 25, 2019
1 parent 63813d5 commit 0b4bf74713c0c8471058dc622755e03af5d70018
@@ -10,18 +10,17 @@
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<spring-cloud-stream.version>Elmhurst.RELEASE</spring-cloud-stream.version>

<camunda.version>7.9.0</camunda.version>
<camunda.version>7.10.0</camunda.version>
<!--
Adjust if you want to use Enterprise Edition of Camunda:
<camunda.version>7.9.0-ee</camunda.version>
<camunda.version>7.10.0-ee</camunda.version>
Make sure you also switch to the ee webapp dependency below
-->
<camunda.spring.boot.version>3.0.0</camunda.spring.boot.version>
<camunda.spring.boot.version>3.1.0</camunda.spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from camunda -->
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
@@ -68,6 +67,10 @@
-->
<version>${camunda.spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -10,18 +10,17 @@
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<spring-cloud-stream.version>Elmhurst.RELEASE</spring-cloud-stream.version>

<camunda.version>7.9.0</camunda.version>
<camunda.version>7.10.0</camunda.version>
<!--
Adjust if you want to use Enterprise Edition of Camunda:
<camunda.version>7.9.0-ee</camunda.version>
<camunda.version>7.10.0-ee</camunda.version>
Make sure you also switch to the ee webapp dependency below
-->
<camunda.spring.boot.version>3.0.0</camunda.spring.boot.version>
<camunda.spring.boot.version>3.1.0</camunda.spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from camunda -->
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
@@ -68,6 +67,10 @@
-->
<version>${camunda.spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
@@ -28,7 +28,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
<PackageReference Include="Polly" Version="6.1.0" />
<PackageReference Include="BerndRuecker.Sample.CamundaClient" Version="0.1.0" />
<PackageReference Include="BerndRuecker.Sample.CamundaClient" Version="0.1.1" />
</ItemGroup>

<ItemGroup>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3">
<bpmn:process id="paymentV3.cs" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_0k31xzk</bpmn:outgoing>
@@ -11,7 +11,7 @@
<bpmn:sequenceFlow id="SequenceFlow_148vl5g" sourceRef="Task_07m0tqj" targetRef="EndEvent_08rsway" />
<bpmn:serviceTask id="Task_07m0tqj" name="Charge credit card" camunda:asyncBefore="true" camunda:type="external" camunda:topic="chargeCreditCardV3">
<bpmn:extensionElements>
<camunda:failedJobRetryTimeCycle>R3/PT1M</camunda:failedJobRetryTimeCycle>
<camunda:failedJobRetryTimeCycle>R3/PT10S</camunda:failedJobRetryTimeCycle>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0k31xzk</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_148vl5g</bpmn:outgoing>
@@ -23,8 +23,8 @@
<dc:Bounds x="173" y="102" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0k31xzk_di" bpmnElement="SequenceFlow_0k31xzk">
<di:waypoint xsi:type="dc:Point" x="209" y="120" />
<di:waypoint xsi:type="dc:Point" x="283" y="120" />
<di:waypoint x="209" y="120" />
<di:waypoint x="283" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="246" y="99" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -36,8 +36,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_148vl5g_di" bpmnElement="SequenceFlow_148vl5g">
<di:waypoint xsi:type="dc:Point" x="383" y="120" />
<di:waypoint xsi:type="dc:Point" x="443" y="120" />
<di:waypoint x="383" y="120" />
<di:waypoint x="443" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="413" y="99" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3">
<bpmn:process id="paymentV6.cs" isExecutable="true">
<bpmn:serviceTask id="ServiceTask_10hm6pn" name="Charge credit card" camunda:type="external" camunda:topic="chargeCreditCardV6">
<bpmn:incoming>SequenceFlow_0gx4352</bpmn:incoming>
@@ -19,7 +19,7 @@
<bpmn:outgoing>SequenceFlow_1irsftt</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0gx4352" sourceRef="ExclusiveGateway_0esmlay" targetRef="ServiceTask_10hm6pn">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{remainingAmount > 0}]]></bpmn:conditionExpression>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{remainingAmount &gt; 0}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1irsftt" sourceRef="ExclusiveGateway_0esmlay" targetRef="EndEvent_PaymentReceived">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{remainingAmount == 0}</bpmn:conditionExpression>
@@ -60,30 +60,30 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0si7w2m_di" bpmnElement="SequenceFlow_0si7w2m">
<di:waypoint xsi:type="dc:Point" x="73" y="89" />
<di:waypoint xsi:type="dc:Point" x="150" y="89" />
<di:waypoint x="5" y="89" />
<di:waypoint x="150" y="89" />
<bpmndi:BPMNLabel>
<dc:Bounds x="66.5" y="74" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1me4ldb_di" bpmnElement="SequenceFlow_1me4ldb">
<di:waypoint xsi:type="dc:Point" x="465" y="147" />
<di:waypoint xsi:type="dc:Point" x="465" y="206" />
<di:waypoint xsi:type="dc:Point" x="522" y="206" />
<di:waypoint x="465" y="147" />
<di:waypoint x="465" y="206" />
<di:waypoint x="522" y="206" />
<bpmndi:BPMNLabel>
<dc:Bounds x="435" y="176.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_064rfmt_di" bpmnElement="SequenceFlow_064rfmt">
<di:waypoint xsi:type="dc:Point" x="500" y="89" />
<di:waypoint xsi:type="dc:Point" x="543" y="89" />
<di:waypoint x="500" y="89" />
<di:waypoint x="543" y="89" />
<bpmndi:BPMNLabel>
<dc:Bounds x="483" y="74" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_06n3v12_di" bpmnElement="SequenceFlow_06n3v12">
<di:waypoint xsi:type="dc:Point" x="250" y="89" />
<di:waypoint xsi:type="dc:Point" x="302" y="89" />
<di:waypoint x="250" y="89" />
<di:waypoint x="302" y="89" />
<bpmndi:BPMNLabel>
<dc:Bounds x="276" y="68" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -95,25 +95,25 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0gx4352_di" bpmnElement="SequenceFlow_0gx4352">
<di:waypoint xsi:type="dc:Point" x="352" y="89" />
<di:waypoint xsi:type="dc:Point" x="400" y="89" />
<di:waypoint x="352" y="89" />
<di:waypoint x="400" y="89" />
<bpmndi:BPMNLabel>
<dc:Bounds x="376" y="68" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1irsftt_di" bpmnElement="SequenceFlow_1irsftt">
<di:waypoint xsi:type="dc:Point" x="327" y="64" />
<di:waypoint xsi:type="dc:Point" x="327" y="15" />
<di:waypoint xsi:type="dc:Point" x="561" y="15" />
<di:waypoint xsi:type="dc:Point" x="561" y="71" />
<di:waypoint x="327" y="64" />
<di:waypoint x="327" y="15" />
<di:waypoint x="561" y="15" />
<di:waypoint x="561" y="71" />
<bpmndi:BPMNLabel>
<dc:Bounds x="450.5" y="-6" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="StartEvent_10ua66j_di" bpmnElement="StartEvent_1">
<dc:Bounds x="37" y="71" width="36" height="36" />
<dc:Bounds x="-31" y="71" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="12" y="107" width="88" height="24" />
<dc:Bounds x="-55" y="107" width="86" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1qpfh34_di" bpmnElement="EndEvent_PaymentReceived">
@@ -132,9 +132,9 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_01scjre_di" bpmnElement="Association_01scjre">
<di:waypoint xsi:type="dc:Point" x="210" y="147" />
<di:waypoint xsi:type="dc:Point" x="210" y="206" />
<di:waypoint xsi:type="dc:Point" x="228" y="206" />
<di:waypoint x="210" y="147" />
<di:waypoint x="210" y="206" />
<di:waypoint x="228" y="206" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0jsdp9g_di" bpmnElement="Task_1xuole4">
<dc:Bounds x="228" y="166" width="100" height="80" />
@@ -9,18 +9,17 @@
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>

<camunda.version>7.9.0</camunda.version>
<camunda.version>7.10.0</camunda.version>
<!--
Adjust if you want to use Enterprise Edition of Camunda:
<camunda.version>7.9.0-ee</camunda.version>
<camunda.version>7.10.0-ee</camunda.version>
Make sure you also switch to the ee webapp dependency below
-->
<camunda.spring.boot.version>3.0.0</camunda.spring.boot.version>
<camunda.spring.boot.version>3.1.0</camunda.spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from camunda -->
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda.version}</version>
@@ -52,19 +51,23 @@
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
<!--
Adjust if you want to use Enterprise Edition of Camunda:
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
Make sure you also use an EE version of Camunda - see above
-->
<version>${camunda.spring.boot.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-external-task-client</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -30,7 +30,19 @@
*/
@RestController
public class PaymentRestHacksControllerV3b {

@RequestMapping(path = "/api/payment/v3b", method = PUT)
public String retrievePayment(String retrievePaymentPayload, HttpServletResponse response) throws Exception {
String traceId = UUID.randomUUID().toString();
String customerId = "0815"; // get somehow from retrievePaymentPayload
long amount = 15; // get somehow from retrievePaymentPayload

chargeCreditCard(customerId, amount);

response.setStatus(HttpServletResponse.SC_ACCEPTED);
return "{\"status\":\"pending\", \"traceId\": \"" + traceId + "\"}";
}

@Autowired
private ProcessEngine camunda;

@@ -50,7 +62,7 @@ public void createFlowDefinition() {
camunda.getRepositoryService().createDeployment() //
.addModelInstance("payment.bpmn", flow) //
.deploy();
}
}

@Component("stripeAdapter3b")
public static class StripeAdapter implements JavaDelegate {
@@ -75,7 +87,7 @@ protected CreateChargeResponse run() throws Exception {

ctx.setVariable("paymentTransactionId", response.transactionId);
}
}
}

@Component("stripeCancelAdapter3b")
public static class StripeCancelAdapter implements JavaDelegate {
@@ -84,18 +96,6 @@ public void execute(DelegateExecution execution) throws Exception {
System.out.println("Making sure the payment is canceled!");
}
}

@RequestMapping(path = "/api/payment/v3b", method = PUT)
public String retrievePayment(String retrievePaymentPayload, HttpServletResponse response) throws Exception {
String traceId = UUID.randomUUID().toString();
String customerId = "0815"; // get somehow from retrievePaymentPayload
long amount = 15; // get somehow from retrievePaymentPayload

chargeCreditCard(customerId, amount);

response.setStatus(HttpServletResponse.SC_ACCEPTED);
return "{\"status\":\"pending\", \"traceId\": \"" + traceId + "\"}";
}

public void chargeCreditCard(String customerId, long remainingAmount) {
ProcessInstance pi = camunda.getRuntimeService() //
@@ -1,4 +1,4 @@
# Flowing Retail Kubernetes HElm Charts
# Flowing Retail Kubernetes Helm Charts

# UNDER DEVELOPMENT - DON#T USE THIS UNTIL YOU KNOW WHAT YOU ARE DOING

@@ -1,5 +1,5 @@
@echo off
TITLE Zeebe
TITLE Kafka
FOR /F "tokens=1,2 delims==" %%G IN (environment.properties) DO (set %%G=%%H)

set mypath=%cd%
@@ -2,5 +2,7 @@
FOR /F "tokens=1,2 delims==" %%G IN (environment.properties) DO (set %%G=%%H)
@RD /S /Q %zeebe%\data >nul 2>&1

DEL %HOMEPATH%\zeebe-monitor.trace.db >nul 2>&1
DEL %HOMEPATH%\zeebe-monitor.mv.db >nul 2>&1


0 comments on commit 0b4bf74

Please sign in to comment.
You can’t perform that action at this time.