Delete asset step in aem wf | Community
Skip to main content
New Member
June 20, 2025
Solved

Delete asset step in aem wf

  • June 20, 2025
  • 2 replies
  • 480 views

Hi All,

 

I am trying to use "delete assets" step in my custom WF in my AEMasCS instance but the functionality is not working. I have checked below step

1.Given all permission to WF user.

2.Cheked logs(No error)

3.workflow instance is successful.

 

@arunpatidar 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Raja_Reddy

Hi @shwetade 
Confirm the process step uses the right implementation class if it’s custom, or the correct OOTB delete process.

You can add a log step or debugging to confirm the payload paths before the delete step.

Check if the workflow uses a service user mapping (system-user-mapping) and confirm that user has delete rights on the asset repository path.
If the workflow is triggered by events, verify if there’s any conflict with other workflows or event handlers that might prevent deletion.
Even if no errors appear, enable debug logs for workflow and asset management packages:

com.adobe.granite.workflow

com.day.cq.dam

Look for warnings or messages that might hint at failure to delete.

 

2 replies

Karishma_begumSh
Level 4
June 20, 2025

Hi @shwetade 

If the "Delete Asset" step in AEMaaCS is not deleting the asset even though the workflow completes successfully:

  • Make sure the payload is a direct path to a dam:Asset (not a folder).
  • Check if the asset is referenced anywhere — AEM won’t delete referenced assets.
  • Confirm the step uses com.day.cq.dam.core.workflow.DeleteAssetProcess.
  • Run it on Author only.
  • Double-check permissions — the workflow user needs jcr:removeNode.

Add debug logs or a custom step if needed to verify AssetManager.deleteAsset() is triggered.

 

Hope this is helpful.

 

Regards,

Karishma.

Raja_Reddy
Community Advisor
Raja_ReddyCommunity AdvisorAccepted solution
Community Advisor
June 22, 2025

Hi @shwetade 
Confirm the process step uses the right implementation class if it’s custom, or the correct OOTB delete process.

You can add a log step or debugging to confirm the payload paths before the delete step.

Check if the workflow uses a service user mapping (system-user-mapping) and confirm that user has delete rights on the asset repository path.
If the workflow is triggered by events, verify if there’s any conflict with other workflows or event handlers that might prevent deletion.
Even if no errors appear, enable debug logs for workflow and asset management packages:

com.adobe.granite.workflow

com.day.cq.dam

Look for warnings or messages that might hint at failure to delete.