Skip to content

AsyncChainExecution__c

Sobject

apex
global class AsyncChainExecution__c extends SObject

Extends: SObject

Tracks async chain executions including state, step definitions, shared context, and progress. Each record represents one chain execution lifecycle.


Fields

FieldDescription
global String ActiveDeduplicationKey__cActive-run deduplication key.
global String ChainName__cThe name assigned to this chain via newChain().
global Datetime CompletedAt__cWhen chain execution finished (completed, failed, or aborted).
global Decimal CompletedSteps__cNumber of steps that completed successfully.
global String ContextData__cSerialized JSON of the shared chain context (Map of String to Object).
global String CorrelationId__cUUID linking this chain execution to all related log entries across async boundaries.
global String CurrentJobId__cIdentifier of the queueable job currently executing this chain run.
global String CurrentStepName__cName of the currently executing or last executed step.
global Decimal DurationMs__cWall-clock duration in milliseconds from chain start to terminal state.
global String ErrorMessage__cError details if chain failed.
global String FailureCategory__cWhy the chain left the happy path.
global String RunKey__cInternal run-key fence token.
global Datetime StartedAt__cWhen chain execution began.
global String Status__cCurrent chain execution state.
global String StepLog__cSerialized JSON array logging each step's class name, configuration, execution result, and duration.
global Decimal TotalSteps__cTotal number of steps defined in the chain.

ActiveDeduplicationKey__c

apex
global String ActiveDeduplicationKey__c

Active-run deduplication key. Held while the chain is running or stalled; cleared in the same update that writes any terminal status, so a finished chain frees its key for the next run. The unique index makes a second concurrent start with the same key land on the active run instead of creating a duplicate.

Field Attributes:

AttributeValue
Data TypeText(255), case-insensitive
Requiredfalse
Uniquetrue
External IDtrue

ChainName__c

apex
global String ChainName__c

The name assigned to this chain via newChain(). Used for identification in logs, monitoring, and per-chain kill switches.

Field Attributes:

AttributeValue
Data TypeText(255)
Requiredtrue
Uniquefalse
External IDfalse

CompletedAt__c

apex
global Datetime CompletedAt__c

When chain execution finished (completed, failed, or aborted).

Field Attributes:

AttributeValue
Data TypeDate Time
Requiredfalse

CompletedSteps__c

apex
global Decimal CompletedSteps__c

Number of steps that completed successfully.

Field Attributes:

AttributeValue
Data TypeNumber(5,0)
Requiredfalse
Uniquefalse
External IDfalse

ContextData__c

apex
global String ContextData__c

Serialized JSON of the shared chain context (Map of String to Object). Framework enforces 32K default limit with configurable override.

Field Attributes:

AttributeValue
Data TypeLong Text Area(131072)

CorrelationId__c

apex
global String CorrelationId__c

UUID linking this chain execution to all related log entries across async boundaries.

Field Attributes:

AttributeValue
Data TypeText(36), case-insensitive
Requiredfalse
Uniquetrue
External IDtrue

CurrentJobId__c

apex
global String CurrentJobId__c

Identifier of the queueable job currently executing this chain run. Stamped at each step's progress write; the watchdog uses it to check whether a live executor still exists before recovering the chain. Shown read-only on the record page for diagnostics.

Field Attributes:

AttributeValue
Data TypeText(18)
Requiredfalse
Uniquefalse
External IDfalse

CurrentStepName__c

apex
global String CurrentStepName__c

Name of the currently executing or last executed step.

Field Attributes:

AttributeValue
Data TypeText(255)
Requiredfalse
Uniquefalse
External IDfalse

DurationMs__c

apex
global Decimal DurationMs__c

Wall-clock duration in milliseconds from chain start to terminal state. Includes async gaps between Queueable transactions (platform scheduling overhead). Individual step durations in the Step Log field reflect CPU time within each transaction.

Field Attributes:

AttributeValue
Data TypeNumber(10,0)
Requiredfalse
Uniquefalse
External IDfalse

ErrorMessage__c

apex
global String ErrorMessage__c

Error details if chain failed. Includes step name and exception information.

Field Attributes:

AttributeValue
Data TypeLong Text Area(32768)

FailureCategory__c

apex
global String FailureCategory__c

Why the chain left the happy path. Set by the framework at each terminal or stall transition. Empty on healthy chains and on records created before this field existed.

Field Attributes:

AttributeValue
Data TypePicklist
Requiredfalse

Picklist Values:

API NameLabelActive
StepExceptionStep ExceptionYes
RetriesExhaustedRetries ExhaustedYes
KillSwitchKill SwitchYes
StalledStalledYes
OperatorAbortOperator AbortYes

RunKey__c

apex
global String RunKey__c

Internal run-key fence token. Rotated on initial start and on every watchdog re-drive; the executor re-checks it before each persist so a stale-key zombie cannot corrupt a resumed run. Shown read-only on the record page for diagnostics.

Field Attributes:

AttributeValue
Data TypeText(36)
Requiredfalse
Uniquefalse
External IDfalse

StartedAt__c

apex
global Datetime StartedAt__c

When chain execution began.

Field Attributes:

AttributeValue
Data TypeDate Time
Requiredfalse

Status__c

apex
global String Status__c

Current chain execution state.

Field Attributes:

AttributeValue
Data TypePicklist
Requiredfalse

Picklist Values:

API NameLabelActive
AbortedAbortedNo
CompletedCompletedNo
DelayedDelayedNo
FailedFailedNo
RunningRunningYes
StalledStalledNo

StepLog__c

apex
global String StepLog__c

Serialized JSON array logging each step's class name, configuration, execution result, and duration. Populated at chain creation with step definitions, then enriched with runtime outcomes as each step completes.

Field Attributes:

AttributeValue
Data TypeLong Text Area(131072)

TotalSteps__c

apex
global Decimal TotalSteps__c

Total number of steps defined in the chain.

Field Attributes:

AttributeValue
Data TypeNumber(5,0)
Requiredfalse
Uniquefalse
External IDfalse