Class AbstractWorkflowRunner

java.lang.Object
com.adobe.acs.commons.workflow.bulk.execution.impl.runners.AbstractWorkflowRunner
All Implemented Interfaces:
BulkWorkflowRunner
Direct Known Subclasses:
AbstractAEMWorkflowRunner, FastActionManagerRunnerImpl, SyntheticWorkflowRunnerImpl

public abstract class AbstractWorkflowRunner extends Object implements BulkWorkflowRunner
  • Field Details

  • Constructor Details

    • AbstractWorkflowRunner

      public AbstractWorkflowRunner()
  • Method Details

    • initialize

      public 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.
      Specified by:
      initialize in interface BulkWorkflowRunner
      Parameters:
      queryHelper - the QueryHelper
      config - the Config
      Throws:
      org.apache.sling.api.resource.PersistenceException
      javax.jcr.RepositoryException
    • initialize

      public void initialize(Workspace workspace, int totalCount) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Initialize the Bulk Workflow Manager workspace w the total count of items to process.
      Specified by:
      initialize in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      totalCount - total number of items to process
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • start

      public void start(Workspace workspace) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Starts work on the Workspace.
      Specified by:
      start in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • stopping

      public void stopping(Workspace workspace) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Used to request stop of a Workspace however workspace may still continue to run in order to allow active payloads to complete.
      Specified by:
      stopping in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • stop

      public void stop(Workspace workspace) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Stops (or pauses) work in the Workspace.
      Specified by:
      stop in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • stop

      public void stop(Workspace workspace, SubStatus subStatus) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Stops (or pauses) work in the Workspace.
      Specified by:
      stop in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      subStatus - SubStatus used to identify cause of stopping for corner cases
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • stopWithError

      public void stopWithError(Workspace workspace) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Stops (or pauses) work in the Workspace due to Error.
      Specified by:
      stopWithError in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • complete

      public void complete(Workspace workspace) throws org.apache.sling.api.resource.PersistenceException
      Description copied from interface: BulkWorkflowRunner
      Marks a Workspace as being complete, indicating all work has been processed.
      Specified by:
      complete in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      Throws:
      org.apache.sling.api.resource.PersistenceException
    • complete

      public void complete(Workspace workspace, Payload payload) throws Exception
      Description copied from interface: BulkWorkflowRunner
      Marks a payload as being completed.
      Specified by:
      complete in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      payload - the completed Payload
      Throws:
      Exception
    • run

      public void run(Workspace workspace, Payload payload)
      Description copied from interface: BulkWorkflowRunner
      Processes a payload under the Workspace.
      Specified by:
      run in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      payload - the Payload to process
    • fail

      public void fail(Workspace workspace, Payload payload) throws Exception
      Throws:
      Exception
    • forceTerminate

      public abstract void forceTerminate(Workspace workspace, Payload payload) throws Exception
      Description copied from interface: BulkWorkflowRunner
      Marks a payload being force terminated.
      Specified by:
      forceTerminate in interface BulkWorkflowRunner
      Parameters:
      workspace - the Workspace
      payload - the completed Payload
      Throws:
      Exception