create-worker
/create-worker
Implements one BPMN service task as a job worker, JavaDelegate or external-task handler that calls one use case, with names from the generated Process API. Use when a service task or job type needs code that handles it.
- Author
- miragon ↗
- Repository
- bpmn-to-code ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 9
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Implements one BPMN service task as a job worker, JavaDelegate or external-task handler that calls one use case, with names from the generated Process API. Use when a service task or job type needs code that handles it.
Arguments
/create-worker <element id or job type>
Original author description
Implements one BPMN service task as a job worker, JavaDelegate or external-task handler that calls one use case, with names from the generated Process API. Use when a service task or job type needs code that handles it.
How it works
- IMPORTANT
- Step 1: Find the element
- Step 2: Detect the stack
- Step 3: Find the use case
- Step 4: Write the handler
- Step 5: Verify and hand over
SKILL.md preview
--- name: create-worker description: "Implements one BPMN service task as a job worker, JavaDelegate or external-task handler that calls one use case, with names from the generated Process API. Use when a service task or job type needs code that handles it." argument-hint: "<element id or job type>" allowed-tools: Read, Write, Edit, Glob, Grep, Bash(./gradlew *), Bash(mvn *), Bash(./mvnw *), Bash(bpmn --version), Bash(bpmn show *), Bash(bpmn find *), Bash(npx -y @miragon/bpmn-cli@0.7 *) --- # Skill: create-worker Write one inbound adapter: the class the engine calls for one BPMN element. It translates engine data into domain types, calls one use case, and translates the result back. The engine-specific code shape lives in `resources/`. ## IMPORTANT - **Names come from the generated API only:** - the job type or topic: `ServiceTasks.X` - variables: `FlowNodes.<Node>.Variables.X.value` in code, or `ProcessVariables.X` where an annotation needs a compile-time constant (`@Variable(name = …)`) - error codes: `Errors.X.code` No string literals. If a name is missing from the API, the model does not declare it. Tell the user what to declare in the model (Zeebe I/O mapping, Camunda 7 `additionalInputVariables` / `additionalOutputVariables`), regenerate, then continue. - **One handler per element, one use case per handler.** No business logic in the handler. - **Error mapping:** a business error that the model catches with an error boundary event becomes a BPMN error with `Errors.X.code`. Everything else is a technical failure and goes to retry or incident. - **Never edit generated files.** **bpmn-cli:** run `bpmn --version` once. If it fails, use `npx -y @miragon/bpmn-cli@0.7` wherever this skill says `bpmn`. Without Node, read the BPMN XML instead. ## Step 1: Find the element 1. Locate the generated API: `*ProcessApi.kt` / `*ProcessApi.java` next to `ServiceTasks`. If it is missing, run `/setup-bpmn-to-code` first. If it is older than the BPMN file, regenerate. 2. Resolve `$ARGUMENTS` (element id or job type) to its `FlowNodes.<Node>` and its `ServiceTasks` constant. 3. Collect what the handler needs: - **input and output variables** from `FlowNodes.<Node>.Variables` - **error boundary events** and their codes. Read them with `bpmn show <file> <element-id> --context`, which lists `caught by:` and the boundary events. If `bpmn` is not available, read the BPMN XML. ## Step 2: Detect the stack Pick the style by the first match in the build files: | Dependency | Style | |---|---| | `dev.bpm-crafters.process-engine-worker` / `process-engine-api` | `process-engine-api` | | `…external-task-client…` (Camunda 7, CIB seven, Operaton) | `c7-external-task` | | `…bpm-spring-boot-starter…` of Camunda 7, CIB seven, Operaton or Fluxnova | `c7-delegate` | | `io.camunda:camunda-spring-boot-starter` / `spring-boot-starter-camunda-sdk` | `zeebe` | Language: Kotlin if the existing adapters are `.kt`, else Java. Then read `resources/<style>-<kotlin|java>.md`, for example [resources/zeebe-kotlin.md](resources/zeebe-kotlin.md). **Follow what the project already does.** Read one existing handler of the same kind (base class, package, naming, logging) and copy its shape over the resource's default where they differ. ## Step 3: Find the use case - Find the inbound port (`application.port.inbound`, suffix `UseCase`) that does the work. - If there is none, propose its signature with domain types, not primitives or engine types, and create only the interface after confirmation. Implementing the service is a separate task. ## Step 4: Write the handler Follow the resource. Place it in `adapter.inbound.<engine>` (or the package existing handlers use) and name it after the element (`OrderBikeWorker`, `OrderBikeDelegate`). Wire it to the engine the way the resource shows, e.g. the delegate expression bean name or the topic subscription. ## Step 5: Verify and hand over 1. Compile: `./gradlew compileKotlin` / `compileJava`, or `./mvnw compile`. 2. Name the next step: `/test-worker <HandlerClass>`. Behaviour across several elements is `/test-process`.
Files in this package (9)
- SKILL.md 4 KB
- resources/c7-delegate-java.md 6 KB
- resources/c7-delegate-kotlin.md 5 KB
- resources/c7-external-task-java.md 5 KB
- resources/c7-external-task-kotlin.md 4 KB
- resources/process-engine-api-java.md 6 KB
- resources/process-engine-api-kotlin.md 6 KB
- resources/zeebe-java.md 5 KB
- resources/zeebe-kotlin.md 5 KB
Versions
The database has no other skills named create-worker.
Database snapshot: 13.11.2026 · package version 0a7f1e80bf43 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100test-worker
Writes the unit test for one job worker, JavaDelegate or external-task handler, covering inputs, outputs, BPMN errors and retries. Use when testing a worker or after create-worker. - 100migrate-to-bpmn-to-code-apis
Replaces hardcoded BPMN element ids, job types and message names with references to the generated Process API, or rewrites 5.x API references to 6.x with --from-5x. Use when moving code onto the Process API or upgrading to bpmn-to-code 6. - 90create-delegate
Create, update or test a JavaDelegate or an execution/task listener for a BPMN element on CIB seven (Camunda 7 fork), wired as a Spring @Component and invoked by expression (#{beanName}), together with its unit test and the process test of its path. Use when the user asks to… - 100create-delegate
Create, update or test a JavaDelegate or an execution/task listener for a BPMN element on Operaton (Camunda 7 fork), wired as a Spring @Component and invoked by expression (#{beanName}), together with its unit test and the process test of its path. Use when the user asks to… - 90camunda-job-workers
Use this skill when writing the code behind an automated step of a BPMN process — a Java, Spring Boot, or TypeScript handler bound to a service task that completes the job, fails it, or throws a BPMN error — even if job workers aren't mentioned. Implements Camunda 8 job workers.… - 90backend-service
Use when a ticket asks for backend business logic that isn't itself an endpoint or a migration — a service/use-case, a domain operation, a background job, or orchestration across repositories. Invoke for "add a service to do X", "implement the use-case", or "extract the business…