Skip to content
Permalink
Browse files

extracted Zeebe connection config into copy & pastable class, switche…

…d to Zeebe Client 0.21.0-alpha2 in order to have TLS/OAuth support (to be able to connect to the cloud)
  • Loading branch information...
berndruecker committed Sep 10, 2019
1 parent d3467b2 commit ff58eee00ddd9838633c3ded7eb86f357d915160
Showing with 111 additions and 64 deletions.
  1. +1 −1 zeebe/java/checkout/pom.xml
  2. +0 −9 zeebe/java/checkout/src/main/java/io/flowing/retail/checkout/CheckoutApplication.java
  3. +17 −0 zeebe/java/checkout/src/main/java/io/flowing/retail/checkout/ZeebeClientConfiguration.java
  4. +1 −1 zeebe/java/inventory/pom.xml
  5. +0 −10 zeebe/java/inventory/src/main/java/io/flowing/retail/zeebe/inventory/InventoryApplication.java
  6. +17 −0 zeebe/java/inventory/src/main/java/io/flowing/retail/zeebe/inventory/ZeebeClientConfiguration.java
  7. +4 −4 ...entory/src/main/java/io/flowing/retail/zeebe/inventory/{port/zeebe → flow}/FetchGoodsAdapter.java
  8. +1 −1 zeebe/java/order/pom.xml
  9. +8 −8 zeebe/java/order/src/main/java/io/flowing/retail/zeebe/order/OrderApplication.java
  10. +17 −0 zeebe/java/order/src/main/java/io/flowing/retail/zeebe/order/ZeebeClientConfiguration.java
  11. +3 −4 zeebe/java/order/src/main/java/io/flowing/retail/zeebe/order/flow/SaveOrderAdapter.java
  12. +1 −1 zeebe/java/payment/pom.xml
  13. +0 −9 zeebe/java/payment/src/main/java/io/flowing/retail/zeebe/payment/PaymentApplication.java
  14. +17 −0 zeebe/java/payment/src/main/java/io/flowing/retail/zeebe/payment/ZeebeClientConfiguration.java
  15. +3 −3 zeebe/java/payment/src/main/java/io/flowing/retail/zeebe/payment/flow/PaymentAdapter.java
  16. +1 −1 zeebe/java/shipping/pom.xml
  17. +0 −9 zeebe/java/shipping/src/main/java/io/flowing/retail/zeebe/shipping/ShippingApplication.java
  18. +17 −0 zeebe/java/shipping/src/main/java/io/flowing/retail/zeebe/shipping/ZeebeClientConfiguration.java
  19. +3 −3 zeebe/java/shipping/src/main/java/io/flowing/retail/zeebe/shipping/flow/ShipGoodsAdapter.java
@@ -8,7 +8,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<zeebe.version>0.17.0</zeebe.version>
<zeebe.version>0.21.0-alpha2</zeebe.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -2,9 +2,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import io.zeebe.client.ZeebeClient;

@SpringBootApplication
public class CheckoutApplication {
@@ -13,10 +10,4 @@ public static void main(String[] args) {
SpringApplication.run(CheckoutApplication.class, args);
}

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -0,0 +1,17 @@
package io.flowing.retail.checkout;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.zeebe.client.ZeebeClient;

@Configuration
public class ZeebeClientConfiguration {

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -8,7 +8,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<zeebe.version>0.17.0</zeebe.version>
<zeebe.version>0.21.0-alpha2</zeebe.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -2,9 +2,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import io.zeebe.client.ZeebeClient;

@SpringBootApplication
public class InventoryApplication {
@@ -13,11 +10,4 @@ public static void main(String[] args) throws Exception {
SpringApplication.run(InventoryApplication.class, args);
}

@Bean
public ZeebeClient zeebe() {
// Cannot yet use Spring Zeebe in current alpha
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -0,0 +1,17 @@
package io.flowing.retail.zeebe.inventory;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.zeebe.client.ZeebeClient;

@Configuration
public class ZeebeClientConfiguration {

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -1,4 +1,4 @@
package io.flowing.retail.zeebe.inventory.port.zeebe;
package io.flowing.retail.zeebe.inventory.flow;

import java.time.Duration;

@@ -9,10 +9,10 @@
import org.springframework.stereotype.Component;

import io.zeebe.client.ZeebeClient;
import io.zeebe.client.api.clients.JobClient;
import io.zeebe.client.api.response.ActivatedJob;
import io.zeebe.client.api.subscription.JobHandler;
import io.zeebe.client.api.subscription.JobWorker;
import io.zeebe.client.api.worker.JobClient;
import io.zeebe.client.api.worker.JobHandler;
import io.zeebe.client.api.worker.JobWorker;


@Component
@@ -8,7 +8,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<zeebe.version>0.17.0</zeebe.version>
<zeebe.version>0.21.0-alpha2</zeebe.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -1,25 +1,25 @@
package io.flowing.retail.zeebe.order;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import io.zeebe.client.ZeebeClient;

@SpringBootApplication
public class OrderApplication {

@Autowired
private ZeebeClient zeebeClient;

@Bean
public ZeebeClient zeebe() {
// Cannot yet use Spring Zeebe in current alpha
ZeebeClient zeebeClient = ZeebeClient.newClient();

@PostConstruct
public void deployWorkflowToZeebe() {
// Trigger deployment
zeebeClient.newDeployCommand() //
.addResourceFromClasspath("order-zeebe.bpmn") //
.send().join();

return zeebeClient;
}

public static void main(String[] args) throws Exception {
@@ -0,0 +1,17 @@
package io.flowing.retail.zeebe.order;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.zeebe.client.ZeebeClient;

@Configuration
public class ZeebeClientConfiguration {

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -11,11 +11,10 @@
import io.flowing.retail.zeebe.order.domain.Order;
import io.flowing.retail.zeebe.order.persistence.OrderRepository;
import io.zeebe.client.ZeebeClient;
import io.zeebe.client.api.clients.JobClient;
import io.zeebe.client.api.events.JobEvent;
import io.zeebe.client.api.response.ActivatedJob;
import io.zeebe.client.api.subscription.JobHandler;
import io.zeebe.client.api.subscription.JobWorker;
import io.zeebe.client.api.worker.JobClient;
import io.zeebe.client.api.worker.JobHandler;
import io.zeebe.client.api.worker.JobWorker;


@Component
@@ -8,7 +8,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<zeebe.version>0.17.0</zeebe.version>
<zeebe.version>0.21.0-alpha2</zeebe.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -2,9 +2,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import io.zeebe.client.ZeebeClient;

@SpringBootApplication
public class PaymentApplication {
@@ -13,10 +10,4 @@ public static void main(String[] args) throws Exception {
SpringApplication.run(PaymentApplication.class, args);
}

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -0,0 +1,17 @@
package io.flowing.retail.zeebe.payment;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.zeebe.client.ZeebeClient;

@Configuration
public class ZeebeClientConfiguration {

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -9,10 +9,10 @@
import org.springframework.stereotype.Component;

import io.zeebe.client.ZeebeClient;
import io.zeebe.client.api.clients.JobClient;
import io.zeebe.client.api.response.ActivatedJob;
import io.zeebe.client.api.subscription.JobHandler;
import io.zeebe.client.api.subscription.JobWorker;
import io.zeebe.client.api.worker.JobClient;
import io.zeebe.client.api.worker.JobHandler;
import io.zeebe.client.api.worker.JobWorker;


@Component
@@ -8,7 +8,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<zeebe.version>0.17.0</zeebe.version>
<zeebe.version>0.21.0-alpha2</zeebe.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -2,9 +2,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import io.zeebe.client.ZeebeClient;

@SpringBootApplication
public class ShippingApplication {
@@ -13,10 +10,4 @@ public static void main(String[] args) throws Exception {
SpringApplication.run(ShippingApplication.class, args);
}

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -0,0 +1,17 @@
package io.flowing.retail.zeebe.shipping;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.zeebe.client.ZeebeClient;

@Configuration
public class ZeebeClientConfiguration {

@Bean
public ZeebeClient zeebe() {
ZeebeClient zeebeClient = ZeebeClient.newClient();
return zeebeClient;
}

}
@@ -9,10 +9,10 @@
import org.springframework.stereotype.Component;

import io.zeebe.client.ZeebeClient;
import io.zeebe.client.api.clients.JobClient;
import io.zeebe.client.api.response.ActivatedJob;
import io.zeebe.client.api.subscription.JobHandler;
import io.zeebe.client.api.subscription.JobWorker;
import io.zeebe.client.api.worker.JobClient;
import io.zeebe.client.api.worker.JobHandler;
import io.zeebe.client.api.worker.JobWorker;


@Component

0 comments on commit ff58eee

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