Skip to content

Commit

Permalink
chore(deps): Update Zeebe deps to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aivinog1 committed May 28, 2021
1 parent 57f0524 commit 0438e76
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ networks:
services:
zeebe:
container_name: zeebe_broker
image: camunda/zeebe:0.23.0
image: camunda/zeebe:1.0.0
environment:
- ZEEBE_LOG_LEVEL=debug
ports:
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</parent>

<properties>
<version.zeebe>0.26.4</version.zeebe>
<version.zeebe.spring>0.26.2</version.zeebe.spring>
<version.zeebe>1.0.0</version.zeebe>
<version.zeebe.spring>1.0.0</version.zeebe.spring>

<version.groovy>2.4.21</version.groovy>
<version.feel>1.13.2</version.feel>
Expand Down Expand Up @@ -45,7 +45,7 @@
<dependencies>

<dependency>
<groupId>io.zeebe</groupId>
<groupId>io.camunda</groupId>
<artifactId>zeebe-bom</artifactId>
<version>${version.zeebe}</version>
<scope>import</scope>
Expand Down Expand Up @@ -75,7 +75,7 @@

<!-- spring deps-->
<dependency>
<groupId>io.zeebe.spring</groupId>
<groupId>io.camunda</groupId>
<artifactId>spring-zeebe-starter</artifactId>
<version>${version.zeebe.spring}</version>
</dependency>
Expand Down Expand Up @@ -142,7 +142,7 @@
</dependency>

<dependency>
<groupId>io.zeebe</groupId>
<groupId>io.camunda</groupId>
<artifactId>zeebe-test</artifactId>
<scope>test</scope>
</dependency>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/io/zeebe/script/ScriptJobHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package io.zeebe.script;

import io.zeebe.client.ZeebeClient;
import io.zeebe.client.api.response.ActivatedJob;
import io.zeebe.client.api.worker.JobClient;
import io.zeebe.client.api.worker.JobHandler;
import io.zeebe.spring.client.annotation.ZeebeWorker;
import io.camunda.zeebe.client.ZeebeClient;
import io.camunda.zeebe.client.api.response.ActivatedJob;
import io.camunda.zeebe.client.api.worker.JobClient;
import io.camunda.zeebe.client.api.worker.JobHandler;
import io.camunda.zeebe.spring.client.annotation.ZeebeWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package io.zeebe.script;

import io.zeebe.spring.client.EnableZeebeClient;
import io.camunda.zeebe.spring.client.EnableZeebeClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

Expand Down
41 changes: 20 additions & 21 deletions src/test/java/io/zeebe/script/WorkflowTest.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
package io.zeebe.script;

import io.zeebe.client.api.response.WorkflowInstanceEvent;
import io.zeebe.model.bpmn.Bpmn;
import io.zeebe.model.bpmn.BpmnModelInstance;
import io.zeebe.protocol.record.intent.MessageIntent;
import io.zeebe.protocol.record.value.MessageRecordValue;
import io.zeebe.test.ZeebeTestRule;
import io.zeebe.test.util.record.RecordingExporter;
import static org.assertj.core.api.Assertions.assertThat;

import io.camunda.zeebe.client.api.response.ProcessInstanceEvent;
import io.camunda.zeebe.model.bpmn.Bpmn;
import io.camunda.zeebe.model.bpmn.BpmnModelInstance;
import io.camunda.zeebe.protocol.record.intent.MessageIntent;
import io.camunda.zeebe.protocol.record.value.MessageRecordValue;
import io.camunda.zeebe.test.ZeebeTestRule;
import io.camunda.zeebe.test.util.record.RecordingExporter;
import java.util.Collections;
import java.util.Map;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Collections;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;

@RunWith(SpringRunner.class)
@SpringBootTest
public class WorkflowTest {
Expand All @@ -29,7 +28,7 @@ public class WorkflowTest {
public static void init() {
System.setProperty(
"zeebe.client.broker.contactPoint",
TEST_RULE.getClient().getConfiguration().getBrokerContactPoint());
TEST_RULE.getClient().getConfiguration().getGatewayAddress());
}

@Test
Expand All @@ -46,7 +45,7 @@ public void shouldReturnResult() {
.zeebeTaskHeader("script", "x + 1"))
.done();

final WorkflowInstanceEvent workflowInstance =
final ProcessInstanceEvent workflowInstance =
deployAndCreateInstance(workflow, Collections.singletonMap("x", 2));

ZeebeTestRule.assertThat(workflowInstance).isEnded().hasVariable("result", 3);
Expand All @@ -63,15 +62,15 @@ public void shouldGetCurrentJob() {
t ->
t.zeebeJobType("script")
.zeebeTaskHeader("language", "groovy")
.zeebeTaskHeader("script", "job.workflowInstanceKey"))
.zeebeTaskHeader("script", "job.processInstanceKey"))
.done();

final WorkflowInstanceEvent workflowInstance =
final ProcessInstanceEvent workflowInstance =
deployAndCreateInstance(workflow, Collections.emptyMap());

ZeebeTestRule.assertThat(workflowInstance)
.isEnded()
.hasVariable("result", workflowInstance.getWorkflowInstanceKey());
.hasVariable("result", workflowInstance.getProcessInstanceKey());
}

@Test
Expand All @@ -90,7 +89,7 @@ public void shouldUseZeebeClient() {
"zeebeClient.newPublishMessageCommand().messageName('foo').correlationKey('bar').send().join()"))
.done();

final WorkflowInstanceEvent workflowInstance =
final ProcessInstanceEvent workflowInstance =
deployAndCreateInstance(workflow, Collections.emptyMap());

ZeebeTestRule.assertThat(workflowInstance).isEnded();
Expand All @@ -101,16 +100,16 @@ public void shouldUseZeebeClient() {
assertThat(publishedMessage.getCorrelationKey()).isEqualTo("bar");
}

private WorkflowInstanceEvent deployAndCreateInstance(
private ProcessInstanceEvent deployAndCreateInstance(
final BpmnModelInstance workflow, Map<String, Object> variables) {
TEST_RULE
.getClient()
.newDeployCommand()
.addWorkflowModel(workflow, "process.bpmn")
.addProcessModel(workflow, "process.bpmn")
.send()
.join();

final WorkflowInstanceEvent workflowInstance =
final ProcessInstanceEvent workflowInstance =
TEST_RULE
.getClient()
.newCreateInstanceCommand()
Expand Down

0 comments on commit 0438e76

Please # to comment.