AsyncChainExecution__c
Sobject
global class AsyncChainExecution__c extends SObjectExtends: SObject
Tracks async chain executions including state, step definitions, shared context, and progress. Each record represents one chain execution lifecycle.
Fields
| Field | Description |
|---|---|
| global String ActiveDeduplicationKey__c | Active-run deduplication key. |
| global String ChainName__c | The name assigned to this chain via newChain(). |
| global Datetime CompletedAt__c | When chain execution finished (completed, failed, or aborted). |
| global Decimal CompletedSteps__c | Number of steps that completed successfully. |
| global String ContextData__c | Serialized JSON of the shared chain context (Map of String to Object). |
| global String CorrelationId__c | UUID linking this chain execution to all related log entries across async boundaries. |
| global String CurrentJobId__c | Identifier of the queueable job currently executing this chain run. |
| global String CurrentStepName__c | Name of the currently executing or last executed step. |
| global Decimal DurationMs__c | Wall-clock duration in milliseconds from chain start to terminal state. |
| global String ErrorMessage__c | Error details if chain failed. |
| global String FailureCategory__c | Why the chain left the happy path. |
| global String RunKey__c | Internal run-key fence token. |
| global Datetime StartedAt__c | When chain execution began. |
| global String Status__c | Current chain execution state. |
| global String StepLog__c | Serialized JSON array logging each step's class name, configuration, execution result, and duration. |
| global Decimal TotalSteps__c | Total number of steps defined in the chain. |
ActiveDeduplicationKey__c
global String ActiveDeduplicationKey__cActive-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:
| Attribute | Value |
|---|---|
| Data Type | Text(255), case-insensitive |
| Required | false |
| Unique | true |
| External ID | true |
ChainName__c
global String ChainName__cThe name assigned to this chain via newChain(). Used for identification in logs, monitoring, and per-chain kill switches.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(255) |
| Required | true |
| Unique | false |
| External ID | false |
CompletedAt__c
global Datetime CompletedAt__cWhen chain execution finished (completed, failed, or aborted).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Date Time |
| Required | false |
CompletedSteps__c
global Decimal CompletedSteps__cNumber of steps that completed successfully.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Number(5,0) |
| Required | false |
| Unique | false |
| External ID | false |
ContextData__c
global String ContextData__cSerialized JSON of the shared chain context (Map of String to Object). Framework enforces 32K default limit with configurable override.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(131072) |
CorrelationId__c
global String CorrelationId__cUUID linking this chain execution to all related log entries across async boundaries.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(36), case-insensitive |
| Required | false |
| Unique | true |
| External ID | true |
CurrentJobId__c
global String CurrentJobId__cIdentifier 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:
| Attribute | Value |
|---|---|
| Data Type | Text(18) |
| Required | false |
| Unique | false |
| External ID | false |
CurrentStepName__c
global String CurrentStepName__cName of the currently executing or last executed step.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(255) |
| Required | false |
| Unique | false |
| External ID | false |
DurationMs__c
global Decimal DurationMs__cWall-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:
| Attribute | Value |
|---|---|
| Data Type | Number(10,0) |
| Required | false |
| Unique | false |
| External ID | false |
ErrorMessage__c
global String ErrorMessage__cError details if chain failed. Includes step name and exception information.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(32768) |
FailureCategory__c
global String FailureCategory__cWhy 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:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | false |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
StepException | Step Exception | Yes |
RetriesExhausted | Retries Exhausted | Yes |
KillSwitch | Kill Switch | Yes |
Stalled | Stalled | Yes |
OperatorAbort | Operator Abort | Yes |
RunKey__c
global String RunKey__cInternal 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:
| Attribute | Value |
|---|---|
| Data Type | Text(36) |
| Required | false |
| Unique | false |
| External ID | false |
StartedAt__c
global Datetime StartedAt__cWhen chain execution began.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Date Time |
| Required | false |
Status__c
global String Status__cCurrent chain execution state.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | false |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
Aborted | Aborted | No |
Completed | Completed | No |
Delayed | Delayed | No |
Failed | Failed | No |
Running | Running | Yes |
Stalled | Stalled | No |
StepLog__c
global String StepLog__cSerialized 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:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(131072) |
TotalSteps__c
global Decimal TotalSteps__cTotal number of steps defined in the chain.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Number(5,0) |
| Required | false |
| Unique | false |
| External ID | false |