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

Scheduling publication of multiple page versions

Avatar

Level 2

Hi all,

Sorry if this seems like a really basic question (it seems like it should be trivial) but we have struggled to find a way to do this and I'm hoping more experienced heads may have the answer.

I have a page built in AEM that needs to be updated several times over the next few weeks, however those updates need to happen in the early hours so we want to schedule them.

We also need to build all of these versions of the page at the same time for approval purposes, so we will have 4 or 5 unpublished versions on the system at the same time.

The question is how can we go through the following process, without causing down time of the pages and for it to be automated given the time that they need to swap over

1) Unpublish the existing page

2) Change URL of the new page version to match the existing page

3) Publish the new version of the page

Can this be automated? I have read about Workflows that should be able to do this, but my agency is saying that it can't and I'm afraid I'm not experienced enough with AEM to know if this is the case.

If someone could point me in the right direction or even confirm that I'm not mad and that this should be easy, I'd really appreciate it.

1 Accepted Solution

Avatar

Correct answer by
Level 10

I would start looking at workflows - they are exactly what you need. You can add much better logic, send emails, setup approval use cases ,etc. See this article that shows how to setup a basic approval workflow that sends an asset through as a payload.

Scott's Digital Community: Invoking an Adobe Experience Manager Custom 6.4 Workflow from a web page

A typical approval workflow looks like this:

Model.png

Then you can build your workflow out to meet your business requirements - publish pages, etc.

View solution in original post

11 Replies

Avatar

Level 10

What types of updates do you need to make. Will an author be making these updates.

You can do a lot with AEM workflows and even have a scheduler run that can invoke a workflow via code. I am trying to determine what changes you want to make to a page. WHen you say change an URL - that is not clear to me.

Avatar

Community Advisor

Hi,

In AEM you can create a version whenever you want and revert without publishing as well. Whenever you publish page a new version is created.

If you'll publish the new page existing page will be overwritten with new one so no need to deactivate/unpublish.

For scheduled publishing page you can create a workflow which will deploy the page at the exact time by configuring autoAbsoluteTime

https://aem.adobemarketingclub.com/scheduled-activation-workflows/

Please check if this make sense for your requirement.

Thanks

Arun

Avatar

Level 2

Thanks for replying.

Let me see if I can explain what we are trying to a little more clearly.

Yes, we will be using content authors to make these updates.

We need to create 4 or 5 versions of the same page that will effectively be published over each other over a period of a few weeks.

To get these all approved at the same time, we are creating separate versions of the pages within AEM so that approvers can review links in one go.

The challenge comes when we try to publish these pages. Obviously we are having to give the versions unique names during approvals (example.html = live, example2.html = version 2, example3.html = version 3, etc). We then need to change the name of these pages so that they can be published over the live page.

Unfortunately, the "publish later" functionality doesn't allow you to change the name of the page (this is what we meant by changing the URL) at the same time as scheduling the publication in the early hours of the morning.

Are we going about this in completely the wrong way or just missing something obvious within AEM.

Many thanks for the input

Avatar

Level 2

Thanks Arun,

I'm not sure that the versions functionality within the timeline helps us as we need to be able to share links with approvers for all versions of the page at the same time.

Again, unless we are missing something (which is highly likely), I don't think that we can use this to achieve what we need.

I will take a long look at the link you have shared though. Appreciate that.

Avatar

Level 10

A few things - when you put your page through a review cycle - are you using workflows? (Sounds like you are not from the previous comment).  Using AEM Workflow to approve content is typically best practice in AEM. You can then use an OR split and define workflow logic to handle when a page is approved or not approved. 

Avatar

Level 2

Not using Workflows at the moment. We simply send an unpublished version of the page to the approvers via email. It's clunky I know, but works for most scenarios when all we need to do is share a single page.

I get the impression that workflows are the way to achieve what we are looking for, but as we have not done this before I wanted to know that this is possible before we invest the time in learning how they work.

Unfortunately we are not that advanced with our use of AEM yet and are trying to explore its capabilities at the same time as understanding how to do it.

Avatar

Correct answer by
Level 10

I would start looking at workflows - they are exactly what you need. You can add much better logic, send emails, setup approval use cases ,etc. See this article that shows how to setup a basic approval workflow that sends an asset through as a payload.

Scott's Digital Community: Invoking an Adobe Experience Manager Custom 6.4 Workflow from a web page

A typical approval workflow looks like this:

Model.png

Then you can build your workflow out to meet your business requirements - publish pages, etc.

Avatar

Level 3

Just an idea - I think this might be possible just using the Scheduled Page/Asset Activation workflow. You can try this in your dev environment:

- Make the first change to your page, then from the sites interface ( http://localhost:4502/sites.html ) select the page then click on Manage Publication then in the dialog click on Later and chose the time for publication.

- Make the subsequent changes on the same page and schedule their publication using the same process.

I think this will work because doing this is starting a new Scheduled Page/Asset Activation workflow instance. In the first step of the workflow there is a new version of the page being created and the version number is then saved in the workflow metadata map and used in the second step which is activating this specific version of the page.

The only downside of this method is that once you scheduled an activation you can't really go back and edit one of the versions to be published without terminating all the activation workflows, reverting to that previous version and basically doing it again.

A potential improvement would be using experience fragments. Make the content that is changing on the page part of an experience fragment. Create a new fragment for every version and use them in the different versions of the page. I think you should be able to still edit the experience fragments even after you scheduled the page activation and those changes should be reflected.

If this doesn't work for you then probably a custom workflow would be the way to go.

Avatar

Employee Advisor

I would recommend to use the "launches" feature [1] to author the different versions upfront; and then you might be able to use the Activate Later feature to activate them on time.

Jörg

[1] Launches

Avatar

Level 2

Thanks everyone for your input. After a lot of learning, we believe that the Workflows is certainly the way forward.

I think we have a permissions issue with our set-up though which is maybe why we haven't been able to use them before now.

Still, we will get that part solved and then all become power users in no time.

Thanks again for the detailed responses everyone, much appreciated.

Avatar

Level 2

Versions have Jcr:lock on them so even if you use workflow you can only play with one version at  a time.

I think launch https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/sites/authoring/lau...  is the solution that can handle your scenario.