Since the announcement of the deprecation of zbctl, is anyone aware of a community project developing a generic job worker with advanced features, such as Node.js scripting or enhanced support for testing?
zbctl --insecure create worker <JOB_TYPE> --handler "./bash.txt" & with all due respect, it felt quite awkward writing the logic in a Bash script.
Hi Jonas,
I am not sure what your exact expectations of “generic” are, but the generally best way to implement job workers is to use the official language clients or SDKs.
For example, the Java client offers extensive possibilities for implementing job workers, including advanced functionality such as streaming: Job worker | Camunda 8 Docs
The SDKs offer additional functionality. Since you asked for Node.js, I assume the Node SDK would be your primary choice: Node.js | Camunda 8 Docs
Thank you, Janek, for your suggestion. I understand that the official SDKs offer extensive functionality, and they are indeed powerful tools for production-level implementations. However, my intent is to avoid using the SDKs for this particular use case. I’m specifically looking for a more generalized, lightweight job worker setup that allows for quick testing of process flows without the overhead of a full SDK.
As I mentioned, my question stems from the upcoming deprecation of zbctl in a few months. In certain contexts, I found it extremely helpful to quickly set up simple job workers via the CLI.
If there are any community projects or tools that focus on providing this type of generalized job worker setup for quick process flow testing, I’d greatly appreciate the insight!
Okay, now I understand what you are looking for. I am not aware of any sophisticated solution for what you are looking for
Still, Id like to highlight some alternatives:
If you really want to avoid using the SDKs, you could use the new REST API that is available starting with Camunda 8.6 and does not require a client: Activate jobs | Camunda 8 Docs (it should release in a few days). With this API, you could easily do some HTTP calls from within a Node script to active jobs and complete them, for example in a loop that activates jobs at a certain interval, calls a function where your handling logic is contained and then completes the jobs.
However, I would argue that using the Node SDK is not more work at this point. Set up a simple NPM project with the SDK as a dependency, write the initialisation of the client and a worker once and then simply edit the job type and the function the worker calls whenever you want to quickly test something.
I’m still keen on something a bit more streamlined for quickly spinning up job workers without setting up full projects, clients, or SDKs. I get that the Node SDK isn’t a huge lift, but if I wanted to use it, I’d have done that by now. I’m really hoping for something more generic, like the simplicity zbctl had—just without the feeling of cobbling things together in Bash scripts.
So, if there’s any community tool out there that fits this need, I’d still love to hear about it!
Hey @jonas.ekstrom, zbctl is actually not being deprecated but moving into community-maintained status. That means it is still available for you to use
The project is now located here:
We haven’t had anyone step up to be a maintainer yet, so it may eventually fall behind current versions of Camunda, but I wanted to make sure you knew it was still out there and in fact a community tool now!
Hi @jonas.ekstrom, Camunda provides a Postman collection for Camunda 8 REST API, that you can use to activate and complete jobs simply.
I believe this is an even more streamlined way of testing your process without spinning up SDK.
Thank you. This point was clarified earlier in the thread, but since you’re raising it again, I’d like to ask you directly: How exactly would you achieve the following in Postman?
Where the bash.txt conditionally returns simple string value:
#!/bin/bash
risk=$(jq '.risk');
if [[ $risk == \""High\"" ]]; then
echo {\"customerNotification\":\"Your account was denied due to high risk!\"};
else
echo {\"customerNotification\":\"Your account was successfully created!\"};
fi
I understand that it is entirely possible, but I’m interested in knowing the level of effort required, as I’m comparing it to the simplicity that a CLI offer.
A bit of context about zbctl: it was created primarily to address challenges working with gRPC API, as it’s difficult to to call gRPC directly.
Now, with the introduction of Camunda 8 REST API, covering endpoints that were previously available in Zeebe API, it’s much easier to test and work with process management endpoints as you can use standard tooling for REST protocol.
As @miamoorementioned before, zbctl is not deprecated, but moving into community-maintained status and can be still used for gRPC endpoints.
How exactly would you achieve the following in Postman?
Personally, I would use the official Java Client (Java is my language of choice) to write a simple job worker to execute this logic. If I wouldn’t be keen to use Java Client, I would probably test it with Postman script.
The other question is: why do you want to use a job worker in the first place? Do you want to test the connection, process definition, or variables? I’m asking as I assume in the further implementation, you would use Camunda SDK to build job workers.
Would script tasks or connectors be suitable for some of your use cases?
The other question is: why do you want to use a job worker in the first place? Do you want to test the connection, process definition, or variables? I’m asking as I assume in the further implementation, you would use Camunda SDK to build job workers.
In addition to my responsibilities for delivering process applications, I’m also involved in events, sales, and promoting process automation solutions. Setting up demos for various audiences is a key part of my role. While building something quickly using the Camunda Web Modeler isn’t an issue, to bring the process to life in runtime, the tasks need to interact with a job worker in conjunction with the process flow. Using zbctl as a worker was very convenient and aligned with the level of effort I’m willing to invest in a demo.
Please understand that my question is specific to demo environments and doesn’t reflect how we approach things for production.
Would script tasks or connectors be suitable for some of your use cases?
To my understanding, script tasks are not intended as a replacement for job workers. Connectors will be used when they are available and meet the specific needs of the use case.