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.
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
The docker image for the worker is published to DockerHub.
docker pull camunda/zeebe-dmn-worker:latest
- configure the connection to the Zeebe broker by setting
zeebe.client.broker.contactPoint
(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 and the worker.
cd docker
docker-compose up
-
Download the latest worker JAR (zeebe-dmn-worker-%{VERSION}.jar )
-
Start the worker
java -jar zeebe-dmn-worker-{VERSION}.jar
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:
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.contactPoint: 127.0.0.1:26500
security.plaintext: true
Build with Maven
mvn clean install
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].