Skip to content

camunda-community-hub/zeebe-dmn-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zeebe-dmn-worker

License

Compatible with: Camunda Platform 8

Important

This community extension is deprecated. You should evaluate DMN decisions directly in Camunda 8 using a business rule task.

Thank you to all contributors for making it a great extension. 🎉

A Zeebe worker to evaluate DMN decisions (i.e. business rule tasks). It uses the Camunda DMN engine including the FEEL-Scala engine to evaluate DMN decisions. The DMN files are read from a local directory.

Usage

Example BPMN with service task:

<bpmn:serviceTask id="decisionTask" name="Eval DMN decision">
  <bpmn:extensionElements>
    <zeebe:taskDefinition type="DMN" />
    <zeebe:taskHeaders>
      <zeebe:header key="decisionRef" value="dish-decision" />
    </zeebe:taskHeaders>
    <zeebe:ioMapping>
      <zeebe:output source="result" target="decisionResult" />
    </zeebe:ioMapping>
  </bpmn:extensionElements>
</bpmn:serviceTask>
  • the worker is registered for the type DMN
  • required custom headers:
    • decisionRef - the id of the decision to evaluate
  • the result of the evaluation is passed as result variable

Install

Docker

The docker image for the worker is published to GitHub Packages.

docker pull ghcr.io/camunda-community-hub/zeebe-dmn-worker:1.1.0
  • configure the connection to the Zeebe gateway by setting zeebe.client.broker.gatewayAddress (default: localhost:26500)
  • configure the folder where the DMN files are located by setting zeebe.client.worker.dmn.repository (default: dmn-repo)

For a local setup, the repository contains a docker-compose file. It starts a Zeebe broker with an embedded gateway and the worker.

cd docker
docker-compose up

Manual

  1. Download the latest worker JAR (zeebe-dmn-worker-%{VERSION}.jar )

  2. Start the worker java -jar zeebe-dmn-worker-{VERSION}.jar

Configuration

The worker is a Spring Boot application that uses the Spring Zeebe Starter. The configuration can be changed via environment variables or an application.yaml file. See also the following resources:

For configuration with Camunda Cloud SaaS, open the 'application.yaml' file located in src/main/resources and remove the '#' sign from lines 3-6. Replace the placeholder values for clusterId, clientId, and clientSecret with your cloud credentials. Follow the instructions provided on all other lines of code starting with as '#' as well.

By default, the DMN files are read from the folder dmn-repo next to the application (i.e. the working directory).

zeebe:
  client:
    worker:
      defaultName: camunda-dmn-worker
      defaultType: DMN
      threads: 3
    
      dmn.repository: dmn-repo

    job.timeout: 10000
    broker.gatewayAddress: 127.0.0.1:26500
    security.plaintext: true

Build from Source

Build with Maven

mvn clean install

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.