Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Activate Page new feature

Avatar

Level 4

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

0 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 4

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 4

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 4

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