Expand my Community achievements bar.

SOLVED

Delete asset step in aem wf

Avatar

Level 1

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 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

 



View solution in original post

2 Replies

Avatar

Level 3

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.

Avatar

Correct answer by
Community Advisor

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.