Ad Code

Thursday, April 16, 2020

Request to Complete Move Operation Workflow in AEM

Hello Everyone,

Today I will talk about an OOTB workflow provided by AEM which is “Request to Complete Move Operation” Workflow.


A little Background:
Usually to maintain a website from the content-authoring point of view, we maintain two
groups one is content-authors and other is content-approvers.

Content-authors: This group is used to do content authoring and don’t
have replication access. which means they can not publish the pages and make them live.
Content-approvers: The people in this group review the content and publish the pages.
Ideally they used to have all the permission which content-authors are having with
additional permission of replicating the pages.

How Move operation work and it’s behavior:
If  approver (or anybody having replication access) is doing the move operation-
1. If the page is not published anytime before,then the move operation will only happen in author and page will not be get published until approver really publishes it.

2. If the page is already published then the move operation happens in author and publish both. Ex: If page P, in A hierarchy is already published and approver is moving it to B hierarchy, then the Page P  from A hierarchy will get deleted from the author as well as publish and the page P will start appearing in B hierarchy in the live site .

When the workflow (request to move operation) gets triggered??
If the move operation is done by content-authors (not having replication permission) then the
OOTB workflow “request to move operation” gets triggered. Now approver
has to approve the workflow to make it function like the above mentioned move operation.

Client Concern:
There are so many content-authors, which are constantly moving pages from one place
to another and there are a lot of “request to move operation” inbox notification for approvers.
Clients don't want this workflow to be there, because there are hundreds of pages for which they are doing content pop and not living soon. They are still deciding hierarchy and in this process they keep on moving pages. In such scenarios, there are always so many workflows running.

What will happen If we remove the workflow :
If content-author moves the published pages, then this movement will happen in author
only and then how i will make this move operation available in publish server.
Ex: If page P, in A hierarchy is already published and author is moving it to B hierarchy,
then the Page from A hierarchy will get deleted and will start showing in B hierarchy in author.
If they ask the approver to publish the page P from B Hierarchy, then the old page “P” is
still available in A hierarchy in the publish server  and will never get deleted so we suggested
the client not to remove this workflow.

How we can solve client issue:
What we suggested is, We will add one step in the workflow which will check if the page
is published/unpublished. If the page is unpublished, we will end the workflow, else the request
will go to content-approver and the workflow will be executed like it is happening right now.

Product Bug:
We are having author/approve groups in place for our AEM servers.Ideally content authors
don't have replication permission and because of this when the author moves a page the
"Request to Complete Move Operation" workflow is triggered. 

Now take an example if the Page "P(Considering that the page is already being published and visible on live site)" is under "A" Hierarchy and an author trying to move it under "B" hierarchy Then the workflow triggers.

If without completing the workflow, approver publishes the "P" page sitting under "B" hierarchy,
then the workflow “request to move operation” workflow instance is also getting aborted and
now on the live site "P" page can be seen under A and B both hierarchies and there is no
other way to delete the "P" page from "A" hierarchy,

Note: Because the page is already being moved to B hierarchy, so in author "A" hierarchy don’t have a "P" page anymore.So approver can’t unpublish the old page.
The issue is when an approver publishes the page, they don't even check if the "Request to Complete Move Operation" is running for that particular page and if they publish the pages,then there is no way to delete the old page (P under Hierarchy A) in publish server.

I raised it as a Day Care ticket and will update here if Adobe comes up with any solution.

Workaround Solution by providing guidelines:
1. We can make a guideline for content-authors not to move the page but to ask content-approvers to do that to avoid so many notifications for move operation or to avoid the workflow enhancement.

2. We can ask content-approvers that before publishing a published page, at least check if there is any move operation workflow for that page  running or not. If it is running, Complete that in place of publishing the page.
Once an approver opens the page during workflow execution, they may see a blue bar on the page with the following message:

But again guidelines can’t stop human error, So if
  • If content-authors are moving the pages then Be ready by completing so many workflows or make the workflow enhancement to solve this issue.
  • if content-approvers are publishing the page for which move operation is already running, be ready to delete the pages in prod publish servers by going in CRXDE.

I know this is a long and very theoretical but i hope it is a good and interesting
read for you.Thanks and Happy Learning






1 comment:

  1. Is it possible to get to see the implementation of Replicate After page move java workflow class

    ReplyDelete