Skip to content
Zeebe worker for script evaluation
Java Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.ci/scripts
src
.gitignore
CODE_OF_CONDUCT.md
Jenkinsfile chore(ci): use new agent nodepool names Mar 27, 2020
LICENSE
README.md Update README.md Jul 2, 2019
pom.xml

README.md

zeebe-script-worker

A Zeebe worker to evaluate scripts (i.e. script tasks). Scripts are useful for prototyping, to do (simple) calculations, or creating/modifying variables.

Usage

Example BPMN with service task:

<bpmn:serviceTask id="scripting" name="Evaluate the Script">
  <bpmn:extensionElements>
    <zeebe:taskDefinition type="script" />
    <zeebe:taskHeaders>
      <zeebe:header key="language" value="javascript" />
      <zeebe:header key="script" value="a + b" />
    </zeebe:taskHeaders>
  </bpmn:extensionElements>
</bpmn:serviceTask>
  • the worker is registered for the type script
  • required custom headers:
    • language - the name of the script language
    • script - the script to evaluate
  • available context/variables in script:
    • job (ActivatedJob) - the current job
    • zeebeClient (ZeebeClient) - the client of the worker
  • the result of the evaluation is passed as result variable

Available script languages:

Install

  1. Download the JAR file

  2. Execute the JAR via

    java -jar target/zeebe-script-worker-{VERSION}.jar

Configuration

The connection can be changed by setting the environment variables:

  • zeebe.client.broker.contactPoint (default: 127.0.0.1:26500).

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.

You can’t perform that action at this time.