Skip to main content
Version: 8.9

Type Alias: ThreadedJobHandler

type ThreadedJobHandler = (
job,
client
) => Promise<JobActionReceipt> | JobActionReceipt;

Handler function signature for threaded job workers.

Import this type in your handler module for full intellisense on job and client:

import type { ThreadedJobHandler } from "@camunda8/orchestration-cluster-api";

const handler: ThreadedJobHandler = async (job, client) => {
// full intellisense for job.variables, job.complete(), client.publishMessage(), etc.
return job.complete({ result: "done" });
};
export default handler;

Parameters

job

ThreadedJob

client

CamundaClient

Returns

| Promise<JobActionReceipt> | JobActionReceipt