Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Custom Generated Data - Purge Workflow

Avatar

Level 3

Hello guys.

So, I'm storing a form data my visitors fill in AEM, using the Store Content action on my form.

However, I need to clean this user generated data periodically, so my user can get reports every month with just that month data.

Is there an easy way to do this? The optimal way would be to inform a path in a workflow and the it would delete everything below this node. I've already explored some of the ootb workflows and couldn't achieve this goal (there is one that delete content, but a node at a time).

Edit: Working with AEM 6.0, SP3.

 

Thanks very much.

Matheus Barreto.

6 Replies

Avatar

Administrator

Hi

Moving this post to AEM "Forms" topic so that contextual experts can help you.

~kautuk



Kautuk Sahni

Avatar

Level 3
Kautuk, I'm using AEM 6.0 and the website component form to get user inputed data, not the "AEM Forms" adaptative one or something like that. Also, the Purge workflow of a node children nodes I need to implement is kind of AEM general use, right? Anyway, thanks for move it out to the right section. Hoping the experts can help :)

Avatar

Level 3

Waiting for some help from the experts. Been looking for a solution in the platform documentation without success.

Avatar

Employee Advisor

have you tried storing data specific to month. For example Jan data under Jan node, Feb data under Feb Node

, This way it will be easier to purge the nodes

Avatar

Employee
       If you are looking for a workflow which deletes all nodes below a given path then that should be easy to author if it is not available OOTB. You simply need to drag Process step in the workflow and write ecma script to delete the path and it's child nodes.

Avatar

Level 3

Hello, thanks for the answer. Do you mind elaborating in the "ecma script"? Can you write me a sample? Thanks!