Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

10-02-2018

Here is the Model for  your use case - this will work.

Model.png

We are working on a HELPX Article for this use case. This is a really nice use case in terms of using a custom workflow step and the workflow APIs to achieve this. OOTB - there is no MOVE Asset step. Therefore -  how do you do it. The answer is you have to program a custom step that can get the InputStream of the Asset Payload and then create a new Asset in the Trash folder under /DAM/TRASH.  You can use the AssetManager API for this task.

Also - this made me realize that we need to explore the AEM Workflow APIs in a more detailed way. As a result -  we will be doing this month (FEB 2018) Ask the AEM Community Experts on this subject - sign up soon.

Article -- Scott's Digital Community: Modifying Digital Assets using Adobe Experience Manager Workflows

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

10-02-2018

After testing - this is the model that works. Notice the last step - its Delete Node as opposed to Delete Asset (Delete Node deletes the asset). This workflow does exactly what you want. It moves the Asset to /DAM/Trash and then deletes the original asset.

Model.png

Notice that the asset is in Trash folder.

Trash.png

Avatar

Avatar

ramya_reddy

Avatar

ramya_reddy

ramya_reddy

12-02-2018

Hi smacdonald2008​,

Thanks for your reply and for working on this usecase.

The workflow with the above steps mentioned is not suitable for our requirement. Our DAM users can run this workflow to achieve this functionality, but our users are not expected to run any workflow. Also, this does not cover the usecase when users click on Delete button or delete assets from Desktop app. Since our DAM users will have delete permissions on assets, we need to move assets to trash folder whenever they click on Delete button in UI or whenever they delete from Desktop App. Moving to trash folder should automatically happen whenever users delete assets from DAM.

I have also explored using a workflow launcher, but that does not work either(See my above posts).

Thanks,

Ramya

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

12-02-2018

You should have your users that can delete asset belong to a workflow user group so they can invoke WFs.  As Far as the Delete button, you need to document to your users to invoke the TrashAsset workflow to remove assets, not use the Delete button.

To delete assets using this WF - you need to have a user select the asset from the Asset view.

Asset.png

Select the Workflow button - not Delete button and select the specific workflow.

WFF.png

Once done, the Asset is placed into the Trash folder.

TrashFolderView.png

and the original asset is deleted.

This is the best way to achieve your requirements. Adobe does not recommend trying to reverse eng the Delete button, etc, This would not be supported if something broke. This is exactly why Workflows were added to the product. Use the tooling that is part of AEM.

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K
Jörg_Hoh
Employee

13-02-2018

Hi,

if you need to work it via the Desktop App as well, the best way to deal with it is to talk to Adobe Support and see if and how it can be done. I am not an expert with the Desktop App.

Jörg