Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/camunda-community-hub/zeebe-simple-tasklist

Zeebe worker to manage manual/user tasks
https://github.com/camunda-community-hub/zeebe-simple-tasklist

tasklist user-task zeebe zeebe-worker

Last synced: about 1 month ago
JSON representation

Zeebe worker to manage manual/user tasks

Awesome Lists containing this project

README

        

Zeebe Simple Tasklist
=========================

[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)
[![](https://img.shields.io/badge/Lifecycle-Deprecated-yellowgreen)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#deprecated-)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

[![Compatible with: Camunda Platform 8](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%208-0072Ce)](https://github.com/camunda-community-hub/community/blob/main/extension-lifecycle.md#compatiblilty)

> **Warning**
> This community extension is deprecated. It doesn't support all the features of newer Camunda versions. You should prefer the official [Camunda Tasklist](https://docs.camunda.io/docs/components/tasklist/introduction-to-tasklist/) that is available in Camunda SaaS and for self-managed. Further resources:
> - [Documentation](https://docs.camunda.io/docs/components/tasklist/introduction-to-tasklist/)
> - [How to build a custom task application](https://docs.camunda.io/docs/next/apis-tools/frontend-development/task-applications/introduction-to-task-applications/)
>
> Thank you to all [contributors](https://github.com/camunda-community-hub/zeebe-simple-tasklist/graphs/contributors) for making it a great extension. :tada:

A [Zeebe](https://zeebe.io) worker to manage user tasks in a workflow. It shows all jobs of
the user task's type as a task/todo-list. A user can complete the tasks with requested data.

> **Note**
> This community project is not related to the **official** [Camunda Tasklist](https://docs.camunda.io/docs/components/tasklist/introduction-to-tasklist/) component in Camunda 8, nor the APIs. If you're looking for the Camunda Tasklist, check out the [Camunda documentation](https://docs.camunda.io/docs/components/tasklist/introduction-to-tasklist/).

## Usage

Example BPMN with a user task:

```xml








```

* the worker is registered for jobs of type `io.camunda.zeebe:userTask` (the reserved job type of user tasks)
* optional custom headers:
* `name` - the name of the task _(default: the element id)_
* `description` - a description what is the task about
* `taskForm` (HTML) - the form to show and provide the task
data ([example task form](https://github.com/zeebe-io/zeebe-simple-tasklist/blob/master/src/test/resources/custom-task-form.html))
* `formFields` (JSON) - the form fields for the default task form, if no task form is set

### Default Task Form

If no `taskForm` is defined then the default task form is used. It takes the `formFields` and
renders a form with all defined fields. The fields are defined as JSON list, for example:

```
[{
\"key\":\"orderId\",
\"label\":\"Order Id\",
\"type\":\"string\"
}, {
\"key\":\"price\",
\"label\":\"Price\",
\"type\":\"number\"
}
]`)
```

The `type` must be one of: string, number, boolean.

## Install

### Docker

The docker image for the worker is published
to [GitHub Packages](https://github.com/orgs/camunda-community-hub/packages/container/package/zeebe-simple-tasklist)
.

```
docker pull ghcr.io/camunda-community-hub/zeebe-simple-tasklist:latest
```

* ensure that a Zeebe broker is running with
a [Hazelcast exporter](https://github.com/camunda-community-hub/zeebe-hazelcast-exporter#install) (>
= `1.0.0`)
* forward the Hazelcast port to the docker container (default: `5701`)
* configure the connection to the Zeebe broker by setting `zeebe.client.broker.gateway-address` (
default: `localhost:26500`)
* configure the connection to Hazelcast by setting `zeebe.client.worker.hazelcast.connection` (
default: `localhost:5701`)

If the Zeebe broker runs on your local machine with the default configs then start the container
with the following command:

```
docker run --network="host" ghcr.io/camunda-community-hub/zeebe-simple-tasklist:latest
```

For a local setup, the repository contains a [docker-compose file](docker/docker-compose.yml). It
starts a Zeebe broker with the Hazelcast exporter and the application.

```
cd docker
docker-compose --profile in-memory up
```

Go to http://localhost:8081

To use PostgreSQL instead of the in-memory database, use the profile `postgres`.

```
docker-compose --profile postgres up
```

### Manual

1. Download the
latest [application JAR](https://github.com/zeebe-io/zeebe-simple-tasklist/releases) _(
zeebe-simple-tasklist-%{VERSION}.jar
)_

1. Start the application
`java -jar zeebe-simple-tasklist-{VERSION}.jar`

1. Go to http://localhost:8081

1. Login with `demo/demo`

### Configuration

The worker is a Spring Boot application that uses
the [Spring Zeebe Starter](https://github.com/zeebe-io/spring-zeebe). The configuration can be
changed via environment variables or an `application.yaml` file. See also the following resources:

* [Spring Zeebe Configuration](https://github.com/zeebe-io/spring-zeebe#configuring-zeebe-connection)
* [Spring Boot Configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config)

By default, the port is set to `8081`, the admin user is created with `demo/demo`, and the database
is only in-memory (i.e. not persistent).

```
zeebe:
client:
worker:
defaultName: zeebe-simple-tasklist
defaultType: user
threads: 2

hazelcast:
connection: localhost:5701
connectionTimeout: PT30S

tasklist:
defaultTaskForm: /templates/default-task-form.html
adminUsername: demo
adminPassword: demo

job.timeout: 2592000000 # 30 days
broker.contactPoint: 127.0.0.1:26500
security.plaintext: true

spring:

datasource:
url: jdbc:h2:~/zeebe-tasklist
user: sa
password:
driverClassName: org.h2.Driver

jpa:
database-platform: org.hibernate.dialect.H2Dialect
hibernate:
ddl-auto: update

server:
port: 8081
servlet:
context-path: /
allowedOriginsUrls: ""
```

#### Change the Context-Path

The context-path or base-path of the application can be changed using the following property:

```
server:
servlet:
context-path: /tasklist/
```

It is then available under http://localhost:8081/tasklist.

#### Customize the Look & Feel

You can customize the look & feel of the Zeebe Simple Tasklist (aka. white-labeling). For example, to change the logo or
alter the background color. The following configurations are available:

```
- white-label.logo.path=img/logo.png
- white-label.custom.title=Zeebe Simple Tasklist
- white-label.custom.css.path=css/custom.css
- white-label.custom.js.path=js/custom.js
```

#### Change the Database

For example, using PostgreSQL:

* change the following database configuration settings

```
- spring.datasource.url=jdbc:postgresql://db:5432/postgres
- spring.datasource.username=postgres
- spring.datasource.password=zeebe
- spring.datasource.driverClassName=org.postgresql.Driver
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
```

* the PostgreSQL database driver is already bundled

See the [docker-compose file](docker/docker-compose.yml) (profile: `postgres`) for a sample
configuration with PostgreSQL.

#### Cross Origin Requests

To enable Simple Tasklist to send CORS header with every HTTP response,
add the allowed origins (`;` separated) in the following property:

```
server:
allowedOriginsUrls: http://localhost:8081;https://tasklist.cloud-provider.io:8081
```

This will then set ```Access-Control-Allow-Origin``` headers in every HTTP response.

## Build from Source

Build with Maven

`mvn clean install`

## Code of Conduct

This project adheres to the Contributor Covenant [Code of
Conduct](/CODE_OF_CONDUCT.md). By participating, you are expected to uphold
this code. Please report unacceptable behavior to [email protected].

## License

[Apache License, Version 2.0](/LICENSE)

## About

![screencast](docs/zeebe-simple-tasklist.gif)