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 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 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 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. |
Field Details
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 |
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) |
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 |