Workflow Remover
Available since version 1.10.0
Purpose
During content migration, bulk ingest, development, or just unanticipated situations, large volumes of Workflow instances can amass.
AEM has OOTB support for Workflow clean-up via Granite Console and JMX however may not satisfy all use cases. ACS AEM Commons’ Workflow Remover helps bridge the gap and provide power-tooling to remove unwanted Workflow instances.
How to Use
Web UI
In AEM, navigate to the (1) Tools > (2) ACS AEM Commons > (3) Manage Controlled Processes
From the MCP console, click “Start Process.” (4)
Select the Workflow Remover process from the list and click next. (5)
Options
- Workflow Payload Paths: [Optional] Workflow payload paths must match at least one regex to be removed. Click the add button to add additional paths.
- Workflows Older Than: [Optional] Workflow instances must be created older than this time.
- Workflow Models: [Optional] Workflow models that are eligible for removal.
- If no models are selected, all models are eligible for removal.
- Workflow Statuses: [Required] Select the statuses for the Workflows to be removed.
- If no status is selected, no Workflow instances will be removed. Click the add button to select multiple statuses if desired.
Once you click start, the process will be run and managed by MCP. When it is complete a report of removed items is provided
Scheduled Service
ACS AEM Commons’ Workflow Remover can also be used to schedule removal of workflow instances sing the same criteria as the Web UI.
OSGi Configuration
Define a sling:OsgiConfig
with the following attributes.
/apps/mysite/config.author/com.adobe.acs.commons.workflow.bulk.removal.impl.WorkflowInstanceRemoverScheduler-pdfs.xml
- scheduler.expression: The usual Sling Scheduler expression (see www.cronmaker.com)
- workflow.statuses: Only remove Workflow Instances that have one of these statuses
- ABORTED,COMPLETE,RUNNING,SUSPENDED,STALE
- workflow.models: Only remove Workflow Instances that belong to one of these WF Models.
- Example: /etc/workflow/models/dam/adddamsize/jcr:content/model
- workflow.payloads: Only remove Workflow Instances whose payloads match one of these regex patterns.
- worlflow.older-than: Only remove Workflow Instances whose payloads are older than this UTC Time in milliseconds.
- max-duration: Max number of minutes to run. 0 for no limit.
Service User
On AEM 6.2 or above, this service uses a Service User for repository access. This user is configured with the expected permissions required, but additional permissions may be required if your repository design deviates from the expected structure.
User name: acs-commons-workflow-remover-service
ACLs:
jcr:read
,jcr:write
on/etc/workflow/instances