We are trying to implement some new features on the "Activate Page" function. Currently AEM has its own, but we like to add some validation when users click on that button, both the admin listing page(such as right click on a page) and the page detail with the sidekick. Web editors sometimes activate a page without opening up the "Page Property", whereby they should fill out some required fields. But they can bypass it simply click on the "Activate Page" button. We like to enforce them to fill out those fields, such as page description meta tag. I've looked into this Adobe Experience Manager Help | Customizing the Adobe Experience Manager Sidekick to improve the act... and this CQ5 | Widgets API , but those don't help that much. Any suggestion?
Thanks a lot!
Kevin
Solved! Go to Solution.
Views
Replies
Total Likes
You can look at writing an Activation workflow. Have custom steps in the workflow that read page props and only activate the page if those props are present. Otherwise email messages that says Activation did not occur because of missing props. See this thread: Overriding default activation workflow
Views
Replies
Total Likes
You can look at writing an Activation workflow. Have custom steps in the workflow that read page props and only activate the page if those props are present. Otherwise email messages that says Activation did not occur because of missing props. See this thread: Overriding default activation workflow
Views
Replies
Total Likes
Thank you! I will try that.
Views
Replies
Total Likes
The nice thing is you can write custom steps to read props of the payload using Java logic. Creating custom workflow steps is a powerful feature.
Views
Replies
Total Likes
The question is would the message of "Page successfully activated" still come up? If yes, it will cause some confusion to the editors.
Views
Replies
Total Likes
If I understand you correctly, you want to add custom validation steps before the replication happens. If the validations fail the replication should not start at all. Is that correct?
Jörg
Views
Replies
Total Likes
That's correct.
Views
Replies
Total Likes
You can start a workflow to implement this, but then it isn't really user-friendly; because then you need to observe you inbox and see if it got rejected. You want to have a synchronous process and immediate feedback, pretty much like the referenceProvider, which check of other objects, which are part of the page you activate, but which are not published yet. It should support interactive work well.
I don't think that this is possible yet. Of course you could mis-use a the ReferenceProvider mechanism and implement a custom one which does validation instead. But in case of validation errors it's hard to report these errors.
I don't know a really good solution right now. Workflows are possible, but as said, these are asynchronous processes.
Jörg
Views
Replies
Total Likes
Yes, looks like there isn't a perfect solution for this. But the workflow one seems to be the closest one. Workflows don't solve everything, just to reduce as many manual processes as possible. Thanks for both your help!
Kevin
Views
Replies
Total Likes
And before you invent your own validation model: Check Sling Validation: Apache Sling :: Sling Validation
My assumption is that when a validation approach is implemented into AEM, it is likely based von this.
Jörg
Views
Replies
Total Likes
Is the process com.day.cq.wcm.workflow.process.ActivatePageProcess the default process? I disabled the process, but the page activation is still working.
Views
Replies
Total Likes
Views
Like
Replies