Interface BulkWorkflowRunner
- All Known Implementing Classes:
AbstractAEMWorkflowRunner,AbstractWorkflowRunner,AEMTransientWorkflowRunnerImpl,AEMWorkflowRunnerImpl,FastActionManagerRunnerImpl,SyntheticWorkflowRunnerImpl
@ProviderType
public interface BulkWorkflowRunner
-
Method Summary
Modifier and TypeMethodDescriptionvoidMarks a Workspace as being complete, indicating all work has been processed.voidMarks a payload as being completed.voidforceTerminate(Workspace workspace, Payload payload) Marks a payload being force terminated.org.apache.sling.commons.scheduler.ScheduleOptionsgetOptions(Config config) If a non-null value is returned, the result of run(..) will be scheduled to run w these options.getRunnable(Config config) voidinitialize(QueryHelper queryHelper, Config config) Collects and initializes the Workspace JCR structure with the payload nodes.voidinitialize(Workspace workspace, int totalCount) Initialize the Bulk Workflow Manager workspace w the total count of items to process.voidProcesses a payload under the Workspace.voidStarts work on the Workspace.voidStops (or pauses) work in the Workspace.voidStops (or pauses) work in the Workspace.voidUsed to request stop of a Workspace however workspace may still continue to run in order to allow active payloads to complete.voidstopWithError(Workspace workspace) Stops (or pauses) work in the Workspace due to Error.
-
Method Details
-
getRunnable
- Parameters:
config- the Config- Returns:
- the runnable object that will be used to perform the work.
-
getOptions
If a non-null value is returned, the result of run(..) will be scheduled to run w these options. If null the job will be immediately run in the same thread.- Parameters:
config- the Config- Returns:
- The Sling Scheduler options or null;
-
initialize
void initialize(QueryHelper queryHelper, Config config) throws org.apache.sling.api.resource.PersistenceException, javax.jcr.RepositoryException Collects and initializes the Workspace JCR structure with the payload nodes.- Parameters:
queryHelper- the QueryHelperconfig- the Config- Throws:
org.apache.sling.api.resource.PersistenceExceptionjavax.jcr.RepositoryException
-
initialize
void initialize(Workspace workspace, int totalCount) throws org.apache.sling.api.resource.PersistenceException Initialize the Bulk Workflow Manager workspace w the total count of items to process.- Parameters:
workspace- the WorkspacetotalCount- total number of items to process- Throws:
org.apache.sling.api.resource.PersistenceException
-
start
Starts work on the Workspace.- Parameters:
workspace- the Workspace- Throws:
org.apache.sling.api.resource.PersistenceException
-
stopping
Used to request stop of a Workspace however workspace may still continue to run in order to allow active payloads to complete.- Parameters:
workspace- the Workspace- Throws:
org.apache.sling.api.resource.PersistenceException
-
stop
Stops (or pauses) work in the Workspace.- Parameters:
workspace- the Workspace- Throws:
org.apache.sling.api.resource.PersistenceException
-
stop
void stop(Workspace workspace, SubStatus subStatus) throws org.apache.sling.api.resource.PersistenceException Stops (or pauses) work in the Workspace.- Parameters:
workspace- the WorkspacesubStatus- SubStatus used to identify cause of stopping for corner cases- Throws:
org.apache.sling.api.resource.PersistenceException
-
stopWithError
Stops (or pauses) work in the Workspace due to Error.- Parameters:
workspace- the Workspace- Throws:
org.apache.sling.api.resource.PersistenceException
-
complete
Marks a Workspace as being complete, indicating all work has been processed.- Parameters:
workspace- the Workspace- Throws:
org.apache.sling.api.resource.PersistenceException
-
complete
Marks a payload as being completed.- Parameters:
workspace- the Workspacepayload- the completed Payload- Throws:
Exception
-
run
Processes a payload under the Workspace.- Parameters:
workspace- the Workspacepayload- the Payload to process
-
forceTerminate
Marks a payload being force terminated.- Parameters:
workspace- the Workspacepayload- the completed Payload- Throws:
Exception
-