Run script in Camunda 8


I am trying to get started with Camunda 8 for a Showcase/POC. In that showcase, we need to run several scripts in a row so I was thinking “hey, let’s use a script task for each step”.

I did something like this in Camunda 7 with inline scripts already, however, I am stuck with Camunda 8.

Currently, I am running in the SaaS Camunda 8 version.

I tried several combinations for the headers by settingthe key “language” to groovy or javascript and just trying simple things like

return 1+1

println “Hello world”
in the script header”

<zeebe:header key=“script” value=“a + b”/>
<zeebe:header key=“language” value=“”/>

However, the process always seems to get stuck in the script and no values are returned. I feel like I would need a simple example to get going. The one in the docu did not help me… Anyone?

Thanks, Fabian

Hi @FSohns. welcome to the forum :partying_face:.

Script tasks behave exactly like service tasks. Both task types are based on jobs and job workers.
Jobs for script tasks are not processed by Zeebe itself. To process them, provide a job worker.

For more details, see here: Script tasks | Camunda 8 Docs

Hope this helps,


thanks! And this is not automatically running in the SaaS approach? I am wondering, how to configure the worker to connect to the cloud in this case, but I guess it is only a configuration issue.

Hi @FSohns

You could use this and connect it to your cluster:

The connection configuration is described here: GitHub - camunda-community-hub/spring-zeebe: Easily use the Zeebe Java Client in your Spring or Spring Boot projects

You’ll want to create an API Client in the web console, with scope Zeebe, then use the credentials from that client for the connection details.

hope this helps,

1 Like