test/spring-zeebe-test

This pom defines the required plugins and profiles to allow a camunda release build. Inherit this pom when you want to release your project into the camunda nexus and/or maven central.

Лицензия

Лицензия

Apache License
Группа

Группа

io.zeebe.spring
Идентификатор

Идентификатор

spring-zeebe-test
Последняя версия

Последняя версия

1.0.0-rc1
Дата

Дата

Тип

Тип

jar
Описание

Описание

test/spring-zeebe-test
This pom defines the required plugins and profiles to allow a camunda release build. Inherit this pom when you want to release your project into the camunda nexus and/or maven central.
Организация-разработчик

Организация-разработчик

Camunda Services GmbH

Скачать spring-zeebe-test

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.zeebe.spring/spring-zeebe-test/ -->
<dependency>
    <groupId>io.zeebe.spring</groupId>
    <artifactId>spring-zeebe-test</artifactId>
    <version>1.0.0-rc1</version>
</dependency>
// https://jarcasting.com/artifacts/io.zeebe.spring/spring-zeebe-test/
implementation 'io.zeebe.spring:spring-zeebe-test:1.0.0-rc1'
// https://jarcasting.com/artifacts/io.zeebe.spring/spring-zeebe-test/
implementation ("io.zeebe.spring:spring-zeebe-test:1.0.0-rc1")
'io.zeebe.spring:spring-zeebe-test:jar:1.0.0-rc1'
<dependency org="io.zeebe.spring" name="spring-zeebe-test" rev="1.0.0-rc1">
  <artifact name="spring-zeebe-test" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.zeebe.spring', module='spring-zeebe-test', version='1.0.0-rc1')
)
libraryDependencies += "io.zeebe.spring" % "spring-zeebe-test" % "1.0.0-rc1"
[io.zeebe.spring/spring-zeebe-test "1.0.0-rc1"]

Зависимости

compile (10)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar
io.camunda : zeebe-test jar
io.camunda : zeebe-broker jar
com.tngtech.archunit : archunit-junit jar 0.8.2
org.assertj : assertj-core jar
org.mockito : mockito-core jar
junit : junit jar
com.tngtech.jgiven : jgiven-junit jar 0.17.1
com.tngtech.jgiven : jgiven-spring jar 0.17.1
com.tngtech.jgiven : jgiven-html5-report jar 0.17.1

Модули Проекта

Данный проект не имеет модулей.

Spring Zeebe

Maven Central

Build Status codecov Project Stats

This project allows to leverage Zeebe within your Spring or Spring Boot environment easily. It is basically a wrapper around the Zeebe Java Client.

How to use

Connect to Zeebe Broker

Just add the @EnableZeebeClient annotation to your Spring Boot Application:

@SpringBootApplication
@EnableZeebeClient
public class MySpringBootApplication {

Now you can inject the ZeebeClient and work with it, e.g. to create new workflow instances:

@Autowired
private ZeebeClient client;

Deploy Workflow Models

Use the @ZeebeDeployment annotation:

@SpringBootApplication
@EnableZeebeClient
@ZeebeDeployment(classPathResources = "demoProcess.bpmn")
public class MySpringBootApplication {

You can also deploy multiple files at once:

@ZeebeDeployment(classPathResources ={"demoProcess.bpmn", "demoProcess2.bpmn"})

Implement Job Worker

@ZeebeWorker(type = "foo")
public void handleJobFoo(final JobClient client, final ActivatedJob job) {
  // do whatever you need to do
  client.newCompleteCommand(job.getKey()) 
     .variables("{\"fooResult\": 1}")
     .send()
     .exceptionally( throwable -> { throw new RuntimeException("Could not complete job " + job, throwable); });
}

Configuring Camunda Cloud Connection

Connections to the Camunda Cloud can be easily configured:

zeebe.client.cloud.clusterId=xxx
zeebe.client.cloud.clientId=xxx
zeebe.client.cloud.clientSecret=xxx

If you don't connect to the Camunda Cloud production environment you might have to also adjust these two properties:

zeebe.client.cloud.baseUrl=zeebe.camunda.io
zeebe.client.cloud.port=443
zeebe.client.cloud.authUrl=https://login.cloud.camunda.io/oauth/token

As an alternative you can use the Zeebe Client environment variables.

Configuring Self-managed Zeebe Connection

zeebe.client.broker.gatewayAddress=127.0.0.1:26500
zeebe.client.security.plaintext=true

Additional Configuration Options

If you build a worker that only serves one thing, it might also be handy to define the worker job type globally - and not in the annotation:

zeebe.client.worker.defaultType=foo

For a full set of configuration options please see ZeebeClientConfigurationProperties.java

ObjectMapper customization

If you need to customize the ObjectMapper that the Zeebe client uses to work with variables, you can declare a bean with type io.camunda.zeebe.client.api.JsonMapper like this:

@Configuration
class MyConfiguration {
  @Bean
  public JsonMapper jsonMapper() {
    new ZeebeObjectMapper().enable(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT);
  }
}

Add Spring Boot Starter to Your Project

Just add the following Maven dependency to your Spring Boot Starter project:

<dependency>
	<groupId>io.camunda</groupId>
	<artifactId>spring-zeebe-starter</artifactId>
	<version>${CURRENT_VERSION}</version>
</dependency>

Examples

Have a look into the examples/ folder for working Maven projects that might serve as inspiration.

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to code-of-conduct@zeebe.io.

io.zeebe.spring
This organization contains the internal repositories of the Zeebe development team. Please visit https://github.com/camunda-cloud/zeebe for the Zeebe repository

Версии библиотеки

Версия
1.0.0-rc1
1.0.0-alpha5
0.26.2
0.25.0
0.24.0
0.23.0
0.22.0
0.7.1
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0