Auto delete/deactivate page | Community
Skip to main content
jamesm77050123
Level 2
Sep 28, 2018 6:50 AM UTC
Solved

Auto delete/deactivate page

I'm working on enhancing an existing ecommerce page. The product is created using scaffolding, a page is created and the product is imported into the page. One of the product parameters is a sale date. The client wants the product and the page to be automatically deactivated and deleted when the sale date has passed. Is this possible? I've attached a screenshot of the product creation page

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
VeenaVikraman
VeenaVikramanAccepted solution
New Participant
Sep 28, 2018 2:04 PM UTC

jamesm77050123​

      I think may be you can solve this issue by using a scheduler you can solve this issue. Run the scheduler every night and check for the product's sale date against current date and deactivate those which are expired. I am pasting few links from www below,

Apache Sling :: Scheduler Service (commons scheduler)

https://hashimkhan.in/aem-adobecq5-code-templates/scheduler/

Adobe Experience Manager Help | Scheduling Adobe Experience Manager Jobs using Apache Sling

4 replies

VeenaVikraman
VeenaVikramanAccepted solution
New Participant
Sep 28, 2018 2:04 PM UTC

jamesm77050123​

      I think may be you can solve this issue by using a scheduler you can solve this issue. Run the scheduler every night and check for the product's sale date against current date and deactivate those which are expired. I am pasting few links from www below,

Apache Sling :: Scheduler Service (commons scheduler)

https://hashimkhan.in/aem-adobecq5-code-templates/scheduler/

Adobe Experience Manager Help | Scheduling Adobe Experience Manager Jobs using Apache Sling

Translate
smacdonald2008
Level 10
Sep 28, 2018 1:25 PM UTC

As Peter and Leo point out - the solution here is using Workflows.

Translate
Employee
Sep 28, 2018 12:18 PM UTC

OOTB a page deletion on an AEM author also unpublishing the page. You can easily build your solution by using workflows:

Request for Deactivation - /etc/workflow/models/request_for_deactivation

Request for Deletion - /etc/workflow/models/request_for_deletion

Translate
Peter_Puzanovs
New Participant
Sep 28, 2018 7:57 AM UTC

Dear James,

Deactivate later is OOTB functionality present in AEM.

Delete after deactivate is not OOTB and would require a customisation.

This customisation can be achieved using AEM Workflow system.

Regards,

Peter

Translate