/zeebe-get-started-java-client

Sources of the Zeebe Get-Started guide for the Java client.

Primary LanguageJavaApache License 2.0Apache-2.0

⚠️ 📣 This repository is no longer maintained, please visit https://github.com/camunda-cloud/camunda-cloud-get-started

Zeebe - Get Started Java Client

This repository contains the source code of the Zeebe Get-Started Java client tutorial.

You can find the tutorial in the Zeebe documentation.

Camunda Cloud Deployment

Build the JAR file with Maven

mvn clean package

Export the connection settings as environment variables:

export ZEEBE_ADDRESS='[Zeebe API]'
export ZEEBE_CLIENT_ID='[Client ID]'
export ZEEBE_CLIENT_SECRET='[Client Secret]'
export ZEEBE_AUTHORIZATION_SERVER_URL='[OAuth API]'

Hint: When you create client credentials in Camunda Cloud you have the option to download a file with above lines filled out for you.

And execute it with Java

java -jar target/zeebe-get-started-java-client-0.1.0-jar-with-dependencies.jar

Docker Deployment

Run with Maven

Build the JAR file with Maven

mvn clean package

Then start the broker:

docker-compose up -d broker

And execute it with Java

java -jar target/zeebe-get-started-java-client-0.1.0-jar-with-dependencies.jar

After executing, please remember to shutdown the broker:

docker-compose down -v

docker-compose

Make sure to build the worker by running mvn clean package.

Then start the broker:

docker-compose up -d broker

and start the worker

docker-compose up --build --force-recreate worker

You should see output like this:

$ docker-compose up worker
Starting zeebe-get-started-java-client_worker_1 ... done
Attaching to zeebe-get-started-java-client_worker_1
worker_1  | Connecting to broker: zeebe-broker:26500
worker_1  | Connected to broker: zeebe-broker:26500
worker_1  | Workflow deployed. Version: 1
worker_1  | Workflow instance created. Key: 2251799813685261
worker_1  | Closed.
zeebe-get-started-java-client_worker_1 exited with code 0

After executing, please remember to shutdown the broker:

docker-compose down -v

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.

License

Most Zeebe source files are made available under the Apache License, Version 2.0 except for the broker-core component. The broker-core source files are made available under the terms of the GNU Affero General Public License (GNU AGPLv3). See individual source files for details.