Activate Page new feature | Community
Skip to main content
Level 5
January 25, 2018
Solved

Activate Page new feature

  • January 25, 2018
  • 10 replies
  • 4012 views

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 activate process and this CQ5 | Widgets API , but those don't help that much. Any suggestion?

Thanks a lot!

Kevin

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

10 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
January 25, 2018

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

Kevin_GTaAuthor
Level 5
January 25, 2018

Thank you! I will try that.

smacdonald2008
Level 10
January 25, 2018

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.

Kevin_GTaAuthor
Level 5
January 25, 2018

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

joerghoh
Adobe Employee
Adobe Employee
January 25, 2018

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

Kevin_GTaAuthor
Level 5
January 25, 2018

That's correct.

joerghoh
Adobe Employee
Adobe Employee
January 25, 2018

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

Kevin_GTaAuthor
Level 5
January 25, 2018

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

joerghoh
Adobe Employee
Adobe Employee
January 26, 2018

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

Kevin_GTaAuthor
Level 5
January 29, 2018

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