MSM Rollout Conflicts msm-rollout-conflicts
Conflicts can occur if new pages with the same page name are created in both the blueprint branch and a dependent live copy branch.
Such conflicts must be handled and resolved upon rollout.
Conflict Handling conflict-handling
When conflicting pages do exist (in the blueprint and live copy branches), MSM lets you define how (or even if) they should be handled.
To ensure that the rollout is not blocked, possible definitions can include:
-
which page (blueprint or live copy) has priority during rollout,
-
which pages are renamed (and how),
-
how this affects any published content.
The default behavior of Adobe Experience Manager (AEM) (out-of-the-box) is that published content is not impacted. So if a page that was manually created in the live copy branch has been published, that content is still published after the conflict handling and rollout.
In addition to the standard functionality, customized conflict handlers can be added to implement different rules. These can also allow publishing actions as an individual process.
Example Scenario example-scenario
In the following sections, you must use the example of a new page b
, created in both the blueprint and the live copy branch (created manually), to illustrate the various methods of conflict resolution:
-
blueprint:
/b
A master page; with one child page, bp-level-1.
-
live copy:
/b
A page manually created in the live copy branch; with one child page,
lc-level-1
.- Activated on publish as
/b
, together with the child page.
- Activated on publish as
Before Rollout
Rollout Manager and Conflict Handling rollout-manager-and-conflict-handling
The rollout manager lets you activate or deactivate conflict management.
This is done using the OSGi configuration of Day CQ WCM Rollout Manager:
-
Handle conflicts with manually created Pages:
(
rolloutmgr.conflicthandling.enabled
)Set to true if the rollout manager should handle conflicts from a page created in the live copy with a name that exists in the blueprint.
AEM has predefined behavior when conflict management has been deactivated.
Conflict Handlers conflict-handlers
AEM uses conflict handlers to resolve any page conflicts that exist when rolling out content from a blueprint to a live copy. Renaming pages is one (the usual) method of resolving such conflicts. More than one conflict handler can be operational to allow for a selection of different behaviors.
AEM provides:
-
ResourceNameRolloutConflictHandler
-
The possibility to implement a customized handler.
-
The service ranking mechanism that lets you set the priority of each individual handler. The service with the highest ranking is used.
Default Conflict Handler default-conflict-handler
The default conflict handler:
-
Is called
ResourceNameRolloutConflictHandler
-
With this handler, the blueprint page is given precedence.
-
The service ranking for this handler is set low (that is, below the default value for the
service.ranking
property) as the assumption is that customized handlers need a higher ranking. However, the ranking is not the absolute minimum to ensure flexibility when required.
This conflict handler gives precedence to the blueprint. The live copy page /b
is moved (within the live copy branch) to /b_msm_moved
.
-
live copy:
/b
Is moved (within the live copy) to
/b_msm_moved
. This acts as a backup and ensures that no content is lost.lc-level-1
is not moved.
-
blueprint:
/b
Is rolled out to the live copy page
/b
.bp-level-1
is rolled out to the live copy.
After Rollout
Customized Handlers customized-handlers
Customized conflict handlers let you implement your own rules. Using the service ranking mechanism you can also define how they interact with other handlers.
Customized conflict handlers can have the following:
-
Named according to your requirements.
-
Developed/configured according to your requirements; for example, you can develop a handler so that the live copy page is given precedence.
-
Designed to be configured using the OSGi configuration; in particular the:
-
Service Ranking:
Defines the order related to other conflict handlers (
service.ranking
).The default value is 0.
-
Behavior When Conflict Handling Deactivated behavior-when-conflict-handling-deactivated
If you manually deactivate conflict handling, then AEM takes no action on any conflicting pages (non-conflicting pages are rolled out as expected).
In this case, the live copy effectively takes precedence. The blueprint page /b
is not copied and the live copy page /b
is left untouched.
-
blueprint:
/b
Not copied at all, but is ignored.
-
live copy:
/b
The same.
Service Rankings service-rankings
The OSGi service ranking can be used to define the priority of individual conflict handlers.