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.

Since: 1.0

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 successWhether the step completed successfully.

Property Details

data

apex
global Object data

Type: Object

Optional payload data returned by the step.

Since:

error

apex
global Exception error

Type: Exception

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

Since:

message

apex
global String message

Type: String

Optional human-readable message describing the outcome.

Since:

success

apex
global Boolean success

Type: Boolean

Whether the step completed successfully.

Since: