Interface WorkflowInstanceRemover
public interface WorkflowInstanceRemover
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidForces an interruption of the Workflow removal process.Gets the Workflow Remover's status.intremoveWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, WorkflowRemovalConfig workflowRemovalConfig) Removes workflow instances that match the parameter criteria.intremoveWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan) Removes workflow instances that match the parameter criteria.intremoveWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan, int batchSize) Removes workflow instances that match the parameter criteria.intremoveWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan, int batchSize, int maxDurationInMins) Removes workflow instances that match the parameter criteria.
-
Field Details
-
WORKFLOW_INSTANCES_PATHS
-
MODEL_ID
- See Also:
-
-
Method Details
-
removeWorkflowInstances
int removeWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan) throws org.apache.sling.api.resource.PersistenceException, WorkflowRemovalException, InterruptedException, WorkflowRemovalForceQuitException Removes workflow instances that match the parameter criteria.- Parameters:
resourceResolver- the resource resolver; must have access to read/delete workflow instancesmodelIds- WF Models to removestatuses- WF Statuses to removepayloads- Regexes; WF Payloads to removeolderThan- UTC time in milliseconds; only delete WF's started after this time- Returns:
- the number of WF instances removed
- Throws:
org.apache.sling.api.resource.PersistenceExceptionWorkflowRemovalExceptionInterruptedExceptionWorkflowRemovalForceQuitException
-
removeWorkflowInstances
int removeWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan, int batchSize) throws org.apache.sling.api.resource.PersistenceException, WorkflowRemovalException, InterruptedException, WorkflowRemovalForceQuitException Removes workflow instances that match the parameter criteria.- Parameters:
resourceResolver- the resource resolver; must have access to read/delete workflow instancesmodelIds- WF Models to removestatuses- WF Statuses to removepayloads- Regexes; WF Payloads to removeolderThan- UTC time in milliseconds; only delete WF's started after this timebatchSize- number of workflow instances to delete per JCR save- Returns:
- the number of WF instances removed
- Throws:
org.apache.sling.api.resource.PersistenceExceptionWorkflowRemovalExceptionInterruptedExceptionWorkflowRemovalForceQuitException
-
removeWorkflowInstances
int removeWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, Collection<String> modelIds, Collection<String> statuses, Collection<Pattern> payloads, Calendar olderThan, int batchSize, int maxDurationInMins) throws org.apache.sling.api.resource.PersistenceException, WorkflowRemovalException, InterruptedException, WorkflowRemovalForceQuitException Removes workflow instances that match the parameter criteria.- Parameters:
resourceResolver- the resource resolver; must have access to read/delete workflow instancesmodelIds- WF Models to removestatuses- WF Statuses to removepayloads- Regexes; WF Payloads to removeolderThan- UTC time in milliseconds; only delete WF's started after this timebatchSize- number of workflow instances to delete per JCR savemaxDurationInMins- max number of mins the workflow removal process is allowed to run- Returns:
- the number of WF instances removed
- Throws:
org.apache.sling.api.resource.PersistenceExceptionWorkflowRemovalExceptionInterruptedExceptionWorkflowRemovalForceQuitException
-
removeWorkflowInstances
int removeWorkflowInstances(org.apache.sling.api.resource.ResourceResolver resourceResolver, WorkflowRemovalConfig workflowRemovalConfig) throws org.apache.sling.api.resource.PersistenceException, WorkflowRemovalException, InterruptedException, WorkflowRemovalForceQuitException Removes workflow instances that match the parameter criteria.- Parameters:
resourceResolver- the resource resolver; must have access to read/delete workflow instancesworkflowRemovalConfig- WF Models to remove- Returns:
- the number of WF instances removed
- Throws:
org.apache.sling.api.resource.PersistenceExceptionWorkflowRemovalExceptionInterruptedExceptionWorkflowRemovalForceQuitException
-
getStatus
WorkflowRemovalStatus getStatus()Gets the Workflow Remover's status. *- Returns:
- the workflow remover's status object
-
forceQuit
void forceQuit()Forces an interruption of the Workflow removal process. Any uncommited changes will be lost.
-