Interface: EnrichedActivatedJob
Enriched job type with convenience methods.
A back-compatible interface so downstream consumers can declaration-merge
or extends it exactly as they could before the dependent-presence typing
work landed (restoring the pre-#513 public surface — turning it into a generic
type alias was a breaking change for those consumers). It resolves to the base
ActivatedJobResult shape plus the action methods.
The marker-driven dependent-presence projections (see
hooks/post/710-derive-present-when.ts) narrow individual response properties
via the generic EnrichedActivatedJobOf companion instead of
re-parameterising this interface — an interface cannot intersect an arbitrary
type parameter, and keeping this name non-generic preserves back-compat.
Extends
EnrichedActivatedJobActions.ActivatedJobResult
Properties
acknowledged?
optional acknowledged?: boolean;
Set true once any acknowledgement method is invoked.
Inherited from
EnrichedActivatedJobActions.acknowledged;
businessId
businessId: BusinessId | null;
The business ID of the owning process instance, inherited when the job was created.
This is null for jobs created before version 8.10 and for jobs whose owning process
instance has no business ID.
clock
clock: HandlerClock;
The clock this worker's client resolves time through. Reading and waiting through it means a test that pins the client's clock also drives the handler.
Inherited from
EnrichedActivatedJobActions.clock;
customHeaders
customHeaders: object;
A set of custom headers defined during modelling; returned as a serialized JSON document.
Index Signature
[key: string]: unknown
deadline
deadline: number;
When the job can be activated again, sent as a UNIX epoch timestamp.
elementId
elementId: ElementId;
The associated task element ID.
elementInstanceKey
elementInstanceKey: ElementInstanceKey;
The element instance key of the task.
jobKey
jobKey: JobKey;
The key, a unique identifier for the job.
jobLeaseToken
jobLeaseToken: JobLeaseToken | null;
The lease token identifying this activation. This is null when the job was activated without a lease.
kind
kind: JobKindEnum;
listenerEventType
listenerEventType: JobListenerEventTypeEnum;
log
log: Logger;
Inherited from
EnrichedActivatedJobActions.log;
modifyJobTimeout
modifyJobTimeout: (__namedParameters) => Promise<void>;
Extend the timeout for the job by setting a new timeout
Parameters
__namedParameters
newTimeoutMs
number
Returns
Promise<void>
Inherited from
EnrichedActivatedJobActions.modifyJobTimeout;
modifyRetries
modifyRetries: (__namedParameters) => Promise<void>;
Parameters
__namedParameters
retries
number
Returns
Promise<void>
Inherited from
EnrichedActivatedJobActions.modifyRetries;
physicalTenantId
physicalTenantId: string;
The ID of the physical tenant that the job-activation request was routed to; the default physical tenant when the request did not specify one.
priority
priority: number;
The priority of the job. Higher values indicate higher priority. Jobs created before 8.10 have no stored priority; the API returns 0 for such jobs.
processDefinitionId
processDefinitionId: ProcessDefinitionId;
The bpmn process ID of the job's process definition.
processDefinitionKey
processDefinitionKey: ProcessDefinitionKey;
The key of the job's process definition.
processDefinitionVersion
processDefinitionVersion: number;
The version of the job's process definition.
processInstanceKey
processInstanceKey: ProcessInstanceKey;
The job's process instance key.
retries
retries: number;
The amount of retries left to this job (should always be positive).
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.
tags
tags: TagSet;
tenantId
tenantId: TenantId;
The ID of the tenant that owns the job.
type
type: string;
The type of the job (should match what was requested).
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.
variables
variables: object;
All variables visible to the task scope, computed at activation time.
Index Signature
[key: string]: unknown
worker
worker: string;
The name of the worker which activated this job.
Methods
cancelWorkflow()
cancelWorkflow(): Promise<"JOB_ACTION_RECEIPT">;
Returns
Promise<"JOB_ACTION_RECEIPT">
Inherited from
EnrichedActivatedJobActions.cancelWorkflow;
complete()
complete(variables?, result?): Promise<"JOB_ACTION_RECEIPT">;
Parameters
variables?
result?
Returns
Promise<"JOB_ACTION_RECEIPT">
Inherited from
EnrichedActivatedJobActions.complete;
error()
error(error): Promise<"JOB_ACTION_RECEIPT">;
Parameters
error
Returns
Promise<"JOB_ACTION_RECEIPT">
Inherited from
EnrichedActivatedJobActions.error;
fail()
fail(body): Promise<"JOB_ACTION_RECEIPT">;
Parameters
body
any
Returns
Promise<"JOB_ACTION_RECEIPT">
Inherited from
EnrichedActivatedJobActions.fail;
ignore()
ignore(): Promise<"JOB_ACTION_RECEIPT">;
Returns
Promise<"JOB_ACTION_RECEIPT">
Inherited from
EnrichedActivatedJobActions.ignore;