Skip to content

Commit

Permalink
1.8.2 Improve connection configuration with zeebeGrpcAddress if the v…
Browse files Browse the repository at this point in the history
…alue is not provided
  • Loading branch information
pierre-yves-monnet committed Jan 22, 2025
1 parent cf2486f commit b07983a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<groupId>org.camunda.community.automator</groupId>
<artifactId>process-execution-automator</artifactId>

<version>1.8.1</version>
<version>1.8.2</version>
<!-- Change the banner.txt version -->
<!-- 1.5 Change OperateClient / TaskList Library -->
<!-- 1.6 Increase option multithreading-->
<!-- 1.7 add logs -->
<!-- 1.7.1 Add logs on authentication to describe it -->
<!-- 1.8.0 Unit Test / Rest API -->
<!-- 1.8.1 Add the reconnect mechanism on TaskList -->
<!-- 1.8.2 Improve parametrisation of connection -->
<properties>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,10 @@ else if (BpmnEngineList.CamundaEngine.CAMUNDA_8.equals(serverDefinition.serverTy
// connect to local deployment; assumes that authentication is disabled
clientBuilder = ZeebeClient.newClientBuilder()
.gatewayAddress(serverDefinition.zeebeGatewayAddress);
if (serverDefinition.zeebeGrpcAddress != null) {
if (serverDefinition.zeebeGrpcAddress != null && ! serverDefinition.zeebeGrpcAddress.trim().isEmpty()) {
clientBuilder = clientBuilder.grpcAddress(new URI(serverDefinition.zeebeGrpcAddress));
}
if (serverDefinition.zeebeRestAddress != null) {
if (serverDefinition.zeebeRestAddress != null && ! serverDefinition.zeebeRestAddress.trim().isEmpty()) {
clientBuilder = clientBuilder.restAddress(new URI(serverDefinition.zeebeRestAddress));
}
clientBuilder = clientBuilder.usePlaintext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public class ConfigurationServersEngine {

@Value("${automator.servers.camunda8.name:''}")
public String zeebeName;
@Value("${automator.servers.camunda8.zeebeGatewayAddress:''}")
@Value("${automator.servers.camunda8.zeebeGatewayAddress:#{null}}")
public String zeebeGatewayAddress;
@Value("${automator.servers.camunda8.zeebeGrpcAddress:''}")
@Value("${automator.servers.camunda8.zeebeGrpcAddress:#{null}}")
public String zeebeGrpcAddress;
@Value("${automator.servers.camunda8.zeebeRestAddress:''}")
@Value("${automator.servers.camunda8.zeebeRestAddress:#{null}}")
public String zeebeRestAddress;
@Value("${automator.servers.camunda8.operateUrl:''}")
public String zeebeOperateUrl;
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ automator:
type: "camunda8"
description: "Simple authentication"
zeebeGatewayAddress: "127.0.0.1:26500"
zeebeGrpcAddress: "http://127.0.0.1:26500"
zeebeRestAddress: "http://localhost:9600"
operateUserName: "demo"
operateUserPassword: "demo"
Expand All @@ -78,6 +79,7 @@ automator:
type: "camunda8"
description: "Kubernetes, Simple authentication"
zeebeGatewayAddress: "camunda-zeebe-gateway:26500"
zeebeGrpcAddress: "http://camunda-zeebe-gateway:26500"
zeebeRestAddress: "http://camunda-zeebe-gateway:9600"
operateUserName: "demo"
operateUserPassword: "demo"
Expand All @@ -93,6 +95,7 @@ automator:
type: "camunda8"
description: "A Zeebe+Identity server"
zeebeGatewayAddress: "127.0.0.1:26500"
zeebeGrpcAddress: "http://127.0.0.1:26500"
zeebeRestAddress: "http://localhost:9600"
zeebeClientId: "zeebe"
zeebeClientSecret: "LHwdAq56bZ"
Expand Down Expand Up @@ -120,6 +123,7 @@ automator:
- name: "Camunda8ZeebeOnly"
type: "camunda8"
zeebeGatewayAddress: "127.0.0.1:26500"
zeebeGrpcAddress: "http://127.0.0.1:26500"
zeebeRestAddress: "http://localhost:9600"
zeebePlainText: true
workerExecutionThreads: 200
Expand Down Expand Up @@ -159,6 +163,7 @@ automator:
camunda8:
name: "Camunda8Calcair"
zeebeGatewayAddress: "127.0.0.1:26500"
zeebeGrpcAddress2: "http://127.0.0.1:26500"
operateUserName: "demo"
operateUserPassword: "demo"
operateUrl: "http://localhost:8081"
Expand Down

0 comments on commit b07983a

Please sign in to comment.