Skip to main content
Version: 8.9

Interface: EnrichedActivatedJob

Enriched job type with convenience methods.

Extends

  • ActivatedJobResult

Properties

acknowledged?

optional acknowledged?: boolean;

Set true once any acknowledgement method is invoked.


customHeaders

customHeaders: object;

A set of custom headers defined during modelling; returned as a serialized JSON document.

Index Signature

[key: string]: unknown

Inherited from

ActivatedJobResult.customHeaders;

deadline

deadline: number;

When the job can be activated again, sent as a UNIX epoch timestamp.

Inherited from

ActivatedJobResult.deadline;

elementId

elementId: ElementId;

The associated task element ID.

Inherited from

ActivatedJobResult.elementId;

elementInstanceKey

elementInstanceKey: ElementInstanceKey;

The element instance key of the task.

Inherited from

ActivatedJobResult.elementInstanceKey;

jobKey

jobKey: JobKey;

The key, a unique identifier for the job.

Inherited from

ActivatedJobResult.jobKey;

kind

kind: JobKindEnum;

Inherited from

ActivatedJobResult.kind;

listenerEventType

listenerEventType: JobListenerEventTypeEnum;

Inherited from

ActivatedJobResult.listenerEventType;

log

log: Logger;

modifyJobTimeout

modifyJobTimeout: (__namedParameters) => Promise<void>;

Extend the timeout for the job by setting a new timeout

Parameters

__namedParameters
newTimeoutMs

number

Returns

Promise<void>


modifyRetries

modifyRetries: (__namedParameters) => Promise<void>;

Parameters

__namedParameters
retries

number

Returns

Promise<void>


processDefinitionId

processDefinitionId: ProcessDefinitionId;

The bpmn process ID of the job's process definition.

Inherited from

ActivatedJobResult.processDefinitionId;

processDefinitionKey

processDefinitionKey: ProcessDefinitionKey;

The key of the job's process definition.

Inherited from

ActivatedJobResult.processDefinitionKey;

processDefinitionVersion

processDefinitionVersion: number;

The version of the job's process definition.

Inherited from

ActivatedJobResult.processDefinitionVersion;

processInstanceKey

processInstanceKey: ProcessInstanceKey;

The job's process instance key.

Inherited from

ActivatedJobResult.processInstanceKey;

retries

retries: number;

The amount of retries left to this job (should always be positive).

Inherited from

ActivatedJobResult.retries;

rootProcessInstanceKey

rootProcessInstanceKey: ProcessInstanceKey | null;

The key of the root process instance. The root process instance is the top-level ancestor in the process instance hierarchy. This field is only present for data belonging to process instance hierarchies created in version 8.9 or later.

Inherited from

ActivatedJobResult.rootProcessInstanceKey;

tags

tags: TagSet;

Inherited from

ActivatedJobResult.tags;

tenantId

tenantId: TenantId;

The ID of the tenant that owns the job.

Inherited from

ActivatedJobResult.tenantId;

type

type: string;

The type of the job (should match what was requested).

Inherited from

ActivatedJobResult.type;

userTask

userTask: UserTaskProperties | null;

User task properties, if the job is a user task. This is null if the job is not a user task.

Inherited from

ActivatedJobResult.userTask;

variables

variables: object;

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

Index Signature

[key: string]: unknown

Inherited from

ActivatedJobResult.variables;

worker

worker: string;

The name of the worker which activated this job.

Inherited from

ActivatedJobResult.worker;

Methods

cancelWorkflow()

cancelWorkflow(): Promise<"JOB_ACTION_RECEIPT">;

Returns

Promise<"JOB_ACTION_RECEIPT">


complete()

complete(variables?, result?): Promise<"JOB_ACTION_RECEIPT">;

Parameters

variables?
result?

JobResult

Returns

Promise<"JOB_ACTION_RECEIPT">


error()

error(error): Promise<"JOB_ACTION_RECEIPT">;

Parameters

error

JobErrorRequest

Returns

Promise<"JOB_ACTION_RECEIPT">


fail()

fail(body): Promise<"JOB_ACTION_RECEIPT">;

Parameters

body

any

Returns

Promise<"JOB_ACTION_RECEIPT">


ignore()

ignore(): Promise<"JOB_ACTION_RECEIPT">;

Returns

Promise<"JOB_ACTION_RECEIPT">