Guide / Test and run
Check Workers
Check Workers asks your engine whether anything picks up the tasks your diagrams hand out, before your users find out.
What is a worker
A service task does not do the work itself. A worker, a program of yours, does. On Camunda 8 the task names a job type. On Camunda 7 it names a topic. If no worker is running for that name, the task waits forever. Check Workers finds that out.
Steps
Run Check Workers on the workers of your project. Penstock asks each diagram's engine, using the profile in force for that diagram's folder. A project with a Camunda 7 folder and a Camunda 8 folder asks both. Each worker then says what the engine said, and the workers node shows when the check ran, for example checked at 14:02.
Run Check Workers in your tool
JetBrains
- Open the Penstock tool window and find Workers.
- Right-click Workers, or select it and use its action: Check Workers on <engine>. If your project uses several engines it says Check Workers on the Engines.
VS Code
- Open the Penstock view in the Activity Bar and find Workers.
- Right-click Workers, or select it and use its action: Check Workers. It queries the engine of the profile in force.
Command line
Not available on the command line. There is no command for it yet. penstock code compares diagrams with code, without asking an engine.
What it says
| Engine | Answer | Meaning |
|---|---|---|
| Camunda 8.9 and later | 3 workers took its jobs in the last 24 hours | All is well. |
| Camunda 8.9 and later | 5 jobs in the last 24 hours and no worker took one | Nobody picks up this job type. The worker is marked with a warning. |
| Camunda 8.9 and later | no jobs in the last 24 hours | Nothing to judge. |
| Camunda 7, Operaton, CIB seven | a worker is working on its tasks | All is well. |
| Camunda 7, Operaton, CIB seven | tasks wait and no worker has locked one | Nobody subscribes to this topic. The worker is marked with a warning. |
| Camunda 7, Operaton, CIB seven | no open tasks | Nothing to judge. |
Exactly what it asks
The check only reads. It sends these requests to the engine address of the profile, and changes nothing there:
| Engine | Request | What it is used for |
|---|---|---|
| Camunda 8 | POST /jobs/statistics/by-types, one request for all job types of the project, for the last 24 hours | Per job type, the number of jobs created and the number of workers that took them |
| Camunda 7, Operaton, CIB seven | GET /external-task/topic-names?withUnlockedTasks=true and GET /external-task/topic-names?withLockedTasks=true | The topics that have open tasks, and the topics that have a task a worker has locked |
The names it looks up are the job types and topics of the service tasks and similar steps in your diagrams. A step with a delegate class, an expression or a bean has no worker to ask for, and is not part of it.
The result is shown on the worker, in the workers node of your tool's project view. It is not written to a file. A request the engine answers with an error stops the check and says why: for Camunda 8 a 404 means the engine has no job statistics, and a 401 or 403 means the profile's user may not read them.
When the engine is asked
Only when you run it, with the profile's credentials. See Security and privacy.
Free and paid parts
Check Workers is part of Pro's code links. The code check, which compares diagrams with your code and does not ask an engine, is described on its own page.
Common problems
- "The engine does not report job statistics, which it does from Camunda 8.9".
- Your Camunda 8 is older than 8.9. Use the code check instead. It compares diagrams with your code.
- "The engine refused the question (403)".
- The profile's user may not read jobs. Use a user that may.
- There is no Check Workers action.
- The project has no worker tasks yet, or Pro is not active. Without Pro a Code line offers to buy or sign in.
- It says "no jobs" for a worker that runs.
- Only the last 24 hours count on Camunda 8, and only open tasks on Camunda 7. A quiet worker looks quiet.