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.
SOLVED

Activate Page new feature

Avatar

Level 6

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

10 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 10

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.

Avatar

Level 6

The question is would the message of "Page successfully activated" still come up? If yes, it will cause some confusion to the editors.

Avatar

Employee Advisor

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

Avatar

Employee Advisor

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

Avatar

Level 6

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

Avatar

Employee Advisor

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

Avatar

Level 6

Is the process com.day.cq.wcm.workflow.process.ActivatePageProcess the default process? I disabled the process, but the page activation is still working.