Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.

AEM6.5 Workflow Purge Configuration for Failed workflow status.

Avatar

Level 7

Hi Team,

 

As we have an OOB Configuration to purge the workflows that are in COMPLETED Status.

means delete the nodes of the workflow that are completed after x days.

Here is the configuration:

tushaar_srivastava_0-1767880322447.png

Now, let's suppose I need to purge the failed workflows that are 30 days old from the same factory, create a new configuration, and provide the name as any (example: AutomatedFailedWorkflowPurge)

tushaar_srivastava_1-1767880762190.png

 

Can you please review and let me know, because it is not deleting the failed workflows, which are 30days old; however, I can see the failed workflow in the workflow failure console, which are more than 30 days old.

Any suggestions will be much appreciated.

Thanks

 

 

@kautuk_sahni , @lukasz-m @arunpatidar  @BrianKasingli 

2 Replies

Avatar

Level 4

Hi @tushaar_srivastava 

Create Custom Purge Job

Set up a new bulk deletion system job named "AutomatedFailedWorkflowPurge" in your factory's admin settings:

  • Entity: System Jobs (AsyncOperation table).

  • Query Conditions:

    • Status Equals Completed.

    • Status Reason Equals Failed.

    • Completed On Older Than 30 days.

    • Optional: System Job Type Equals Workflow; filter by specific factory/model.

  • Enable recurrence (e.g., daily) and preview records to confirm targeting.

Troubleshooting Steps

  • Verify the job runs successfully without suspension—check logs for errors or conflicts with OOB jobs.

  • Confirm failed workflows qualify as "deletable" (not in progress/suspended); some platforms exclude active-faulted states.

  • Test on a small set first, then monitor the workflow failure console post-run.

Additional Fixes

  • Adjust global retention params if available (e.g., FailedSystemJobPersistenceInDays=30), but custom jobs override for specificity.

  • If using Adobe Experience Manager or similar, combine with OSGi configs or weekly maintenance purges, ensuring no date overlaps. Re-run after config save.

Avatar

Community Advisor