Foundations Apex API Developer Reference


global abstract inherited sharing class ffasync_ProcessIterable implements ffasync_IProcess

This class is the main entry point for the system. It must be implemented.

This class implements the following interfaces:

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

public class SampleProcessIterable extends fferpcore.ffasync_ProcessIterable
    private List<Object> data;
    private IterableStep step;
    private List<fferpcore.ffasync_IAction> endOfProcessActions;

    public SampleProcessIterable(List<Object> data)
    { = data;
        this.step = new SampleIterableStep();
        this.endOfProcessActions = new List<fferpcore.ffasync_IAction>();

    public override Iterable<Object> getIterable()
        return data;

    public override IterableStep getStep()
        return step;

    public override String getDescription()
        return "Sample";

    public override Integer getScopeSize()
        return 1;

    public void addEndOfProcessAction(fferpcore.ffasync_IAction action)

    public override List<fferpcore.ffasync_IAction> getEndOfProcessActions()
        return endOfProcessActions;

    public class SampleIterableStep extends fferpcore.ffasync_ProcessIterable.IterableStep
        public override Boolean canRunParallel()
            return true;

        public override fferpcore.ffasync_ProcessService.ProcessResponse run(
            fferpcore.ffasync_ProcessService.ProcessExecutionContext ec,
            List<Object> objs
            // Batch/Queueable Execute code over chunk of data 



global ffasync_ProcessIterable()


global abstract Iterable<Object> getIterable()

Returns the Iterable list of data used by this process.


global abstract fferpcore.ffasync_ProcessIterable.IterableStep getStep()

Returns the IterableStep used by this process for each chunk of data.


global fferpcore.ffasync_Process.LoggingRequirement getLoggingRequirement()

Returns the Logging Requirement for this process. As iterable processes may not have object records, simple logging is enforced in all instances.


global virtual String getDescription()

Text description of the process. Used on Process Run SObject records. Defaults to "ProcessIterable".


global virtual Integer getScopeSize()

Data scope size for the batch spawned by the process. Defaults to 1.


global virtual List<fferpcore.ffasync_IAction> getEndOfProcessActions()

Provides custom actions to be run after process completion. For example, email or task notifications can be generated to inform users that the process has completed.


global abstract inherited sharing class IterableStep implements ffasync_IProcessStep

A step encapsulates the work that will be done by the process on a chunk of data, executed via Batch or Queueable apex.

This class implements the following interfaces:



global IterableStep()


global virtual Boolean canRunParallel()

Flag used to run process steps in parallel or serial.


global abstract fferpcore.ffasync_ProcessService.ProcessResponse run(fferpcore.ffasync_ProcessService.ProcessExecutionContext ec, List<Object> objs)

The framework calls this method as part of the Batch or Queueable execute.

Input Parameters

Name Type Description
ec fferpcore.ffasync_ProcessService.ProcessExecutionContext Execution Context for the current process.
objs List<Object> A list of objects representing a chunk of the data. Length determined by scope size.
© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.