Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ZeebeJob<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>

Type parameters

Hierarchy

Index

Properties

Readonly bpmnProcessId

bpmnProcessId: string

The bpmn process ID of the job process definition

Readonly customHeaders

customHeaders: Readonly<CustomHeaderShape>

A set of custom headers defined during modelling

Readonly deadline

deadline: string

Readonly elementId

elementId: string

The associated task element ID

Readonly elementInstanceKey

elementInstanceKey: string

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

error

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

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

Type declaration

    • (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.

      Parameters

      • errorMessage: string
      • Optional retries: number

      Returns 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.

      Parameters

      Returns Promise<JOB_ACTION_ACKNOWLEDGEMENT>

Readonly key

key: string

The key, a unique identifier for the job

Readonly processDefinitionVersion

processDefinitionVersion: number

The version of the job process definition

Readonly processInstanceKey

processInstanceKey: string

The job's process instance key

Readonly processKey

processKey: string

The key of the job process definition

Readonly retries

retries: number

Readonly type

type: string

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

Readonly variables

variables: Readonly<WorkerInputVariables>

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

Readonly worker

worker: string

The name of the worker that activated this job

Methods

cancelWorkflow

  • cancelWorkflow(): Promise<"JOB_ACTION_ACKNOWLEDGEMENT">

complete

  • 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.

    Parameters

    • Optional updatedVariables: WorkerOutputVariables

    Returns Promise<"JOB_ACTION_ACKNOWLEDGEMENT">

forward

  • forward(): "JOB_ACTION_ACKNOWLEDGEMENT"

Generated using TypeDoc