Class AbstractWorkflowRunner

    • Constructor Detail

      • AbstractWorkflowRunner

        public AbstractWorkflowRunner()
    • Method Detail

      • 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
      • 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