April 7, 2020
Estimated Post Reading Time ~

Scheduled activation with workflows

Activation of a page at a scheduled date/time is available through the “Activate Later” feature provided OTB in AEM 5.6. The way activate later works is by executing an OTB workflow called “schedule_activation“, which waits for activation until the time is reached. This is different from the way Page On/Off time-based scheduling works, which activates the page immediately but makes the page accessible at the Publisher only between the On/Off time.

Now, if you have a need to scheduled activation on your own workflow, one of the way to accomplish is by doing the following

a) Have a custom workflow step that sets a workflow “metaData” with property name “abosluteTime” and value being the time in milliseconds (calendar.getTimeInMillis()). This custom step can even use the On-Time set on the page properties or use a custom dialog to capture date/time for activation depending on what you need



b) Have a participant step (could be called Waiting for activation), which could be assigned to the admin user and set the timeout handler to the OTB provided “Absolute Time Auto Advancer” properties to the following



The Absolute Time Auto Advancer times outs and advances to the next step automatically (which can be the Activate Page step) at the time provided in the absoluteTime property. Alternatively, you can write your own Timeout Advancer as well that works out of a page property directly.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.