Skip to content

Latest commit

 

History

History
152 lines (91 loc) · 4.09 KB

File metadata and controls

152 lines (91 loc) · 4.09 KB

class is constructed with a list of QueueableProcess Objects, and any passthrough data. The first promise in the list is executed. The QueueableProcess class automatically attaches this finalizer to it's execution.

Implements

System.Finalizer

Fields

dataProvider

TESTVISIBLE

a DataProvider instance. This is used to allow for dependency injection in unit tests.

Signature

private dataProvider

Type

QueueableProcessDataProvider


processSteps

A list of QueueableProcess Objects. The first step in the list is executed.

Signature

private final processSteps

Type

List<QueueableProcess>


dataPassthrough

This field allows you to pass information into your initial QueueableProcessStep. This is also the field that is passed to the next QueueableProcessStep in the list.

Signature

private final dataPassthrough

Type

Object


queueableContextHistory

Signature

private final queueableContextHistory

Type

List<QueueableContext>


finalizerContextHistory

Signature

private finalizerContextHistory

Type

List<FinalizerContext>

Constructors

EnqueueNextQueueableProcessStep(processSteps, dataPassthrough, queueableContextHistory, finalizerContextHistory)

SUPPRESSWARNINGS

Constructor for the EnqueueNextQueueableProcessStep class.

Signature

public EnqueueNextQueueableProcessStep(List<QueueableProcess> processSteps, Object dataPassthrough, List<QueueableContext> queueableContextHistory, List<FinalizerContext> finalizerContextHistory)

Parameters

Name Type Description
processSteps List<QueueableProcess> List<QueueableProcess> A list of QueueableProcess Objects. The first step in the list is,[object Object],,[object Object],executed.
dataPassthrough Object Object this is either the initial data passed into the first QueueableProcessStep, or the,[object Object],data passed from the previous QueueableProcessStep.
queueableContextHistory List<QueueableContext> List<QueueableContext> A list of QueueableContext Objects.
finalizerContextHistory List<FinalizerContext> List<FinalizerContext> A list of FinalizerContext Objects.

Methods

execute(context)

This method is required by the Apex Transaction Finalizer interface. It's used to enqueue the next QueueableProcessStep in the list, if one exists.

Signature

public void execute(FinalizerContext context)

Parameters

Name Type Description
context FinalizerContext FinalizerContext Dependency injected by Salesforce at execution time. Contains the result of the
QueueableProcessStep that just executed.

Return Type

void


handleException(context)

Signature

private void handleException(FinalizerContext context)

Parameters

Name Type Description
context FinalizerContext

Return Type

void