fferpcore.ffasync_ProcessIterableglobal 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) { this.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) { endOfProcessActions.add(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 } } } Methods
ffasync_ProcessIterableglobal ffasync_ProcessIterable() getIterableglobal abstract Iterable<Object> getIterable() Returns the Iterable list of data used by this process. getStepglobal abstract fferpcore.ffasync_ProcessIterable.IterableStep getStep() Returns the IterableStep used by this process for each chunk of data. getLoggingRequirementglobal 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. getDescriptionglobal virtual String getDescription() Text description of the process. Used on Process Run SObject records. Defaults to "ProcessIterable". getScopeSizeglobal virtual Integer getScopeSize() Data scope size for the batch spawned by the process. Defaults to 1. getEndOfProcessActionsglobal 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. fferpcore.ffasync_ProcessIterable.IterableStepglobal 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: Methods
IterableStepglobal IterableStep() canRunParallelglobal virtual Boolean canRunParallel() Flag used to run process steps in parallel or serial. runglobal 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
|