@camunda8/sdk
    Preparing search index...

    Interface ZeebeJob<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>

    interface ZeebeJob<
        WorkerInputVariables = IInputVariables,
        CustomHeaderShape = ICustomHeaders,
        WorkerOutputVariables = IOutputVariables,
    > {
        bpmnProcessId: string;
        cancelWorkflow: () => Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
        complete: (
            updatedVariables?: WorkerOutputVariables,
        ) => Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
        customHeaders: Readonly<CustomHeaderShape>;
        deadline: string;
        elementId: string;
        elementInstanceKey: string;
        error: ErrorJobOutcome;
        fail: {
            (
                errorMessage: string,
                retries?: number,
            ): Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
            (
                failureConfiguration: JobFailureConfiguration,
            ): Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
        };
        forward: () => "JOB_ACTION_ACKNOWLEDGEMENT";
        key: string;
        processDefinitionVersion: number;
        processInstanceKey: string;
        retries: number;
        tenantId: string;
        type: string;
        variables: Readonly<WorkerInputVariables>;
        worker: string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    bpmnProcessId: string

    The bpmn process ID of the job process definition

    cancelWorkflow: () => Promise<"JOB_ACTION_ACKNOWLEDGEMENT">

    Cancel the workflow.

    complete: (
        updatedVariables?: WorkerOutputVariables,
    ) => Promise<"JOB_ACTION_ACKNOWLEDGEMENT">

    Complete the job with a success, optionally passing in a state update to merge with the process variables on the broker.

    customHeaders: Readonly<CustomHeaderShape>

    A set of custom headers defined during modelling

    deadline: string

    Epoch milliseconds

    elementId: string

    The associated task element ID

    elementInstanceKey: string

    The unique key identifying the associated task, unique within the scope of the process instance

    Report a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.

    fail: {
        (
            errorMessage: string,
            retries?: number,
        ): Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
        (
            failureConfiguration: JobFailureConfiguration,
        ): Promise<"JOB_ACTION_ACKNOWLEDGEMENT">;
    }

    Fail the job with an informative message as to the cause. Optionally, pass in a value remaining retries. If no value is passed for retries then the current retry count is decremented. Pass in 0for retries to raise an incident in Operate. Optionally, specify a retry backoff period in milliseconds. Default is 0ms (immediate retry) if not specified.

    forward: () => "JOB_ACTION_ACKNOWLEDGEMENT"

    Mark this job as forwarded to another system for completion. No action is taken by the broker. This method releases worker capacity to handle another job.

    key: string

    The key, a unique identifier for the job

    processDefinitionVersion: number

    The version of the job process definition

    processInstanceKey: string

    The job's process instance key

    retries: number
    tenantId: string

    The tenantId of the job in a multi-tenant cluster

    type: string

    The job type, as defined in the BPMN process (e.g. <zeebe:taskDefinition type="payment-service" />)

    variables: Readonly<WorkerInputVariables>

    All visible variables in the task scope, computed at activation time.

    worker: string

    The name of the worker that activated this job