Skip to content

UTIL_AsyncChain.StepResult ​

Class

apex
global inherited sharing class UTIL_AsyncChain.StepResult

Immutable result object returned by each ChainStep to indicate success or failure. Use the static factory methods to create instances.

Example

apex
UTIL_AsyncChain.StepResult result = UTIL_AsyncChain.succeeded('All records processed');
UTIL_AsyncChain.StepResult failure = UTIL_AsyncChain.failed('Missing required field');

Properties ​

PropertyDescription
global Object dataOptional payload data returned by the step.
global Exception errorThe exception that caused the step to fail, if applicable.
global String messageOptional human-readable message describing the outcome.
global Boolean permanentFailureTrue when the step declared this failure permanent: the failure is deterministic, so the chain refuses any retry regardless of the configured retry budget and records the failure with category StepException.
global Boolean successWhether the step completed successfully.

data ​

apex
global Object data

Type: Object

Optional payload data returned by the step.

error ​

apex
global Exception error

Type: Exception

The exception that caused the step to fail, if applicable.

message ​

apex
global String message

Type: String

Optional human-readable message describing the outcome.

permanentFailure ​

apex
global Boolean permanentFailure

Type: Boolean

True when the step declared this failure permanent: the failure is deterministic, so the chain refuses any retry regardless of the configured retry budget and records the failure with category StepException. Never null: false on every result except one built by failedPermanently().

success ​

apex
global Boolean success

Type: Boolean

Whether the step completed successfully.