This tutorial should help you to get to know the main concepts of Zeebe without the need to write a single line of code.
- Download the Zeebe distribution
- Start the Zeebe broker
- Deploy a workflow
- Create a workflow instance
- Complete a workflow instance
- Next steps
Note: Some command examples might not work on Windows if you use cmd or Powershell. For Windows users we recommend to use a bash-like shell, i.e. Git Bash, Cygwin or MinGW for this guide.
You can download the latest distribution from the Zeebe release page.
Extract the archive and enter the Zeebe directory.
Inside the Zeebe directory you will find multiple directories.
To start a Zeebe broker use the
broker.bat file located in the
You will see some output which contains the version of the broker and configuration parameters like directory locations and API socket addresses.
To continue this guide open another terminal to execute commands using the
We can now check the status of the Zeebe broker.
Note: By default, the embedded gateway listens to a plaintext connection but the clients are configured to use TLS. Therefore, all
zbctlcommands in the quickstart will specify the
A workflow is used to orchestrate loosely coupled job workers and the flow of data between them.
In this guide we will use an example process
order-process.bpmn. You can
download it with the following link:
The process describes a sequential flow of three tasks Collect Money, Fetch
Items and Ship Parcel. If you open the
order-process.bpmn file in a text
editor you will see that every task has an attribute
type defined in the XML
which is later used as job type.
To complete an instance of this workflow we would need to activate and complete one job for each of
But first let's deploy the workflow to the Zeebe broker.
After the workflow is deployed we can create new instances of it. Every
instance of a workflow is a single execution of the workflow. To create a new
instance we have to specify the process ID from the BPMN file, in
our case the ID is
order-process as defined in the
Every instance of a workflow normally processes some kind of data. We can specify the initial data of the instance as variables when we start the instance.
Note: Windows users who want to execute this command using cmd or Powershell have to escape the variables differently.
To complete the instance all three tasks have to be executed. In Zeebe a job is
created for every task which is reached during workflow instance execution. In
order to finish a job and thereby the corresponding task it has to be activated
and completed by a job worker. A job worker is a
long living process which repeatedly tries to activate jobs for a given job
type and completes them after executing its business logic. The
provides a command to spawn simple job workers using an external command or
script. The job worker will receive for every job the workflow instance variables as JSON object on
stdin and has to return its result also as JSON object on
stdout if it
handled the job successfully.
In this example we use the unix command
cat which just outputs what it receives
stdin. To complete a workflow instance we now have to create a job worker for
each of the three task types from the workflow definition:
Note: For Windows users this command does not work with cmd as the
catcommand does not exist. We recommend to use Powershell or a bash-like shell to execute this command.
After the job workers are running in the background we can create more instances of our workflow to observe how the workers will complete them.
To close all job workers use the
kill command to stop the background processes.
If you want to visualize the state of the workflow instances you can start the Zeebe simple monitor.
To continue working with Zeebe we recommend to get more familiar with the basic concepts of Zeebe, see the Basics chapter of the documentation.
In the BPMN Workflows chapter you can find an introduction to creating Workflows with BPMN.