Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to take an action on a deleted Asset in Adobe Experience Manager?

Avatar

Avatar
Validate 1
Level 1
jessica210
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
jessica210
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
jessica210
Level 1

28-07-2017

I have a system external to Adobe Experience Manager that I need to make a quick call to whenever an Asset is deleted in AEM. Not being an expert in AEM, my options feel very limited.

I've attempted to create a workflow with a step that can make the appropriate call, and have hooked up a Launcher to listen for a Remove event on any "dam:Asset" type nodes from a certain path in AEM. That means I've got a Java class I've pushed into AEM that extends WorkflowProcess, and is called as part of that workflow.

However, this workflow is not being triggered when I go delete an Asset. If, however, I change the Launcher to listen for a Remove event on "Any Node Type", the workflow is called as I would have expected, however it appears that the asset has already been deleted by the time it hits my process, so the node path provided to my process is already null and void and I'm unable to do anything with it. In any case, I can't leave the Launcher set to fire on "Any Node Type"...

What am I missing? Is there a better way to capture a delete event on an asset? All I need is to be able to gather some information from the deleted node and its children to make this external call. I just need a handle on the Node when a user deletes an Asset...

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
JE_Bailey
Level 2

Likes

10 likes

Total Posts

26 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
JE_Bailey
Level 2

Likes

10 likes

Total Posts

26 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
JE_Bailey
Level 2

31-07-2017

There's a number of possible problems that are occurring.

In the workflow process step that you have, the contents of the deleted node should have been part of workflow item that you are working on. Or did you attempt to look up the deleted item from within the process?

Additionally, it may be simpler to do an event listener

Adobe Experience Manager Help | Creating Event Handlers for Adobe Experience Manager

Answers (3)

Answers (3)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

01-08-2017

Hi,

the problem here is, that as soon as the node (the DAM Asset is implemented as a number of JCR nodes) is gone, you cannot retrieve any information from it anymore.

Therefor even Scott's tip to use a JCR Observation Event handler will not really help here. You need to collect the information upfront, before the asset is actually removed.

I could think of a way, that you run the deletion of an asset through a workflow; and before you finally remove the asset, you collect all the information you need, store it as part of the workflow. And when the asset is gone, you have the information you need to perform your external call.

kind regards,
Jörg

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

31-07-2017

A JCR Event handler will solve this requirement!

Avatar

Avatar
Boost 1
Employee
Sheena_Kaul
Employee

Like

1 like

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Employee
Sheena_Kaul
Employee

Like

1 like

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Sheena_Kaul
Employee

29-07-2017