Calling the Zeebe Script Worker

I’m trying to have a process call the [ZeeBe Script Worker(GitHub - camunda-community-hub/zeebe-script-worker: Zeebe worker for script evaluation) and I’m having some trouble with how to set it up.

The Documentation says:

<bpmn:scriptTask id="calculate-sum" name="Calculate sum">
  <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:scriptTask>

Which is great information, but I’m unsure how that maps to the Web Modeler form to call a Script Task:

I gather that I should fill in the key/value pairs as in the XML example, but how do I tell the script worker the host that the script worker is running on (I fired up the Docker image from the ZeeBe Script Worker GitHub page).

The Script Worker needs to connect to the broker. This is done like this:

  • configure the connection to the Zeebe broker by setting zeebe.client.broker.contactPoint (default: localhost:26500)

(source)

If you are running against Camunda Cloud (the SaaS hosted C8 instance), you need to configure the Script Worker like this.

Does this help?

  • Josh

Am I correct in assuming (after reading the documentation you linked to) that there is no way to connect to Camunda Platform 8 SaaS via the docker image? It appears from the docs you linked that in order to connect to the C8 SaaS broker one must build a SpringBoot application? I am assuming that since there is no information on configuring the Docker Image to connect to C8 SaaS.

Thanks!
dg

The application in the docker image is a Springboot application, so you configure it using the Springboot properties.

From this line in the docker-compose: zeebe-script-worker/docker-compose.yml at master · camunda-community-hub/zeebe-script-worker · GitHub

    environment:
      - zeebe.client.broker.contactPoint=zeebe:26500

I’d try putting the Springboot properties for Camunda SaaS connection in there and configuring it that way. The one that is in there now matches exactly the Springboot property for self-hosted, so it looks like the way.

hth,
Josh