Can anyone point me to documentation on how the out-of-the-box asset expiration/deactivation works in AEM 6.1? I'd like to understand a few things:
What triggers the deactivation; an event, a workflow, something else? I ask in part because I've found some of our assets with expiration dates in the past have not been deactivated.
Is it configurable? For instance, can we set it to auto-deactivate only in certain directories?
Where / how are the Inbox notifications configured?
I am not sure if this is formally documented, I will check that internally.
This is the broad outline:
In Tools > Operations > Replication > Agents on Author > Default Agent (and Dynamic Media Agent if setting up HP) click "Edit" and access "Triggers" tab - check the box next to "On-/Off Time reached"
For the user:
1) Access the AEM Server
2) Upload Images
3) Select any image, click "View Properties"
4) Click "Edit" choose tab "Basic"
5) Input a time for either "On Time" or "Off Time"
6) Allow designated time to pass and check
Check below links. Should be helpful.
For action/deactivation, There is a similar thread with useful information: Scheduled activation programatically
As an overview, activate/deactivate later works is by executing an OOTB workflow called “schedule_activation“ (as we can see in the image attached - "Waiting for Action" or "Waiting for Deactivation", 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.
Note: 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.
If you wanna create your own schedule job, you to create a custom workflow step that sets a workflow “metaData” with property name “absolute time” and the value in millisecond.
From what I see, there is only a "asset expiration job", which sends a report when assets are about to expire. See localhost:4502/system/console/configMgr/com.day.cq.dam.core.impl.ExpiryNotificationJobImpl for its configuration.
I haven't found functionality to automatically deactivate assets (which is a hazardous setting, as it can render you site invalid, if you do not respect the expiration warnings).
In addition to my previous answered, you should see a "Notification" in you which a task has been completed, it means the asset has expired.(image attached)
Besides, you can double check if the workflow associated run properly, checking workflow dashboard for archived as we can see in the screenshot attached which certain useful information like status, model, workflow model, payload, version among others. You can also check the implementation for each Workflow Model (steps involved).