Generate Live Usage Report of Multiple Components with a Click

Enriching the features of OOTB Live Component Usage in AEM by providing enhanced features and functionality.

Content authors or editors usually find themselves in scenarios where there is a requirement for reporting live usage of components on the content pages. With OOTB Live Component Usage, we can get the report of a single component’s live usage. Wouldn’t it be better if we could get multi-site and multi-component live usage report, and export this report for further usage? Also, wouldn’t it be great if you could check the live usage of nested components present in either iparsys or template level in AEM? The New Components Usage Report is an easy-to-use console optimized to fetch results quickly and generate detailed reports.

Purpose:

  • To provide editors or admins the option to select multiple projects to get live report of multiple components.
  • To improve the available features of OOTB Live Usage by adding comment option for each component.

 

Implementation:

  1. The administrator will have to configure the projects for which the authors or editors can generate the live usage report. Go to system console (<host>:<port>/system/console/configMgr) and search for ‘ADX-Utilities Components Usage Project Name Service’. Admins can add any number of projects in the field ‘Project names’ (multi-field) in the format /apps/projectName.component usage report tool in AEM
  2.  The users can select any number of projects from the dropdown available in the tool. And click on ‘Show Components’ to get the list of components present in the project(s) selected.component usage report tool for AEM
  3. It will open a user-friendly component selector in which the editor can choose any number of components for which they want the live usage report. Editors will also have the ability to give comments respective to the components.
    component usage report
  4. The users can enter various content root paths and click on ‘Generate Report’. A key highlight of the tool is that the report will also include results of nested components such as embedded components in templates, components present in iparsys or experience fragments. To include the report of embedded components present in a container, the admin has to enter the details of those components in a configuration ‘ADX-Utilities Embedded Component Report Service’.
  5. For listing embedded components as stated in the above point, the list of embedded components should be added in the field ‘Component names’ (multifield) in the format,
    Embedded Component Resourcetype(projectName/pathToEmbeddedComponent) = Container Component Resourcetype(projectName/pathToContainerComponent).
  6. A detailed report is provided for the components selected giving relevant information about the usage. The results can be sorted or filtered based on any keyword.
  7. Users have an option to export the report as csv.

 

Key features of the tool:

  • Multi-site multi-component live usage report
  • Option for editors or authors to give relevant comments
  • Export to csv option
  • Easy-to-use component selector
  • Detailed result for nested components i.e. embedded components at template level, components present in iparsys or experience fragments, etc.

 

The video demonstration of the tool can be viewed at:

Related Blogs:

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

 

Simplifying Package Creation in AEM

Backing up pages before updating them during a package deployment is an advisable practice. You can always use the backup to restore your pages if anything goes wrong (you never know).

But the list of paths for package creation is usually long, and manual package creation with such a list becomes tedious and time-consuming for content authors.

Purpose:

Create an AEM package from paths (filters) present in an Excel file.

Implementation:

Argil DX presents a tool with a user-friendly console to help users create AEM packages in a simpler and quicker manner through the following input fields:

  • Name – name of the package
  • Version – version of the package
  • Group – group of the package
  • Access Control Handling – permissions to handle the nodes
  • Excel file – file containing fields such as Path, Include child node, Include Image Renditions

 

All of the fields have default values except the Excel file.

ADX Selective Content Packaging Tool

A sample Excel file can be downloaded using the ‘Sample’ button present after the description of the file field.

 

The Excel file contains 3 fields:

  1. Path – the absolute path of the node
  2. Include Child Node (Yes/No) – asking for tree activation on the specified path
  3. Include DAM Renditions (if applicable) (Yes/No) – AEM workflows automatically create DAM renditions on every server (unless altered), but users can opt not to include them by entering ‘No’ in this field.

 

Selective Content Packaging in AEM

 

The tool also has a history page with a record of all the packages created using it. We can see the logs of operations as well as download the old package.

Selective Content Packaging in AEM

The history icon is present on the top right corner of the tool.

Advantages of the tool:

  • Easy-to-use console for package creation
  • Packages and their respective logs are accessible from remote locations
  • Create space-saver packages by eliminating renditions of assets
  • Easy searching and sorting in logs
  • History page for package creation

 

The video demonstration of the tool can be viewed below:

Related Blogs:

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

 

Delete Multiple Unwanted Packages in AEM Instances at Once

How many of us would prefer to work with a faster AEM instance without spending a dime on the infrastructure? All of us would.

So, to take away all your hassles related to package deletion, we present you with a tool that will enable you to perform bulk package purging.

Purpose:

To get a list of packages which are consuming maximum size on an AEM instance and to have the ability to delete multiple packages at once.

Implementation:

At Argil DX, we have made a tool to delete multiple packages of AEM with a single click of a button. This tool provides a simplified console to monitor and manage AEM Packages, the list of packages will be sorted by size and collected according to their package group.

 

To delete package(s), just select their respective checkboxes and click on ‘Delete’ button and all the selected packages will be deleted in a moment. Along with delete operation, we can also download any package for backup before deleting it.

Package purging in AEM

 

Package Purging Tool provides various details of a package viz.

  • Name-Version
  • Group
  • Last Modified Time
  • Last Replicated Time
  • Created By
  • Is Installed
  • Size

 

A user can further search or sort packages within the list through any of the above-mentioned details.

Package purging in AEM

 

Packages are listed in two sections – the first section named ‘All’ contains all the packages and the second section contains the packages collected based on their package-group. The number against the name of each set represents the number of packages in it.

 

For reporting and documenting purposes, package lists can be exported in PDF and Excel formats by clicking on the ‘Excel’ and ‘PDF’ buttons on the top of every list.

Package Purging in AEM

 

Steps to purge packages :

1. Select Package(s) by clicking on checkbox(es).

Package Purging in AEM      2. Click on the delete button.

Package Purging in AEM       3. On the confirmation screen validate and click on “Delete” button. Sit back and relax, packages will be deleted within a few moments.

 

Package purging in AEM

Tool Guide

            A tool guide at the top-right helps users understand the tool and use it effectively.

Package Purging in AEM

Package Purging in AEMPackage Purging in AEM

 

You can find the demonstration video of the same below

Related Blogs:

 

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

 

Selective Replication: Bulk Content Replication Made Easier

Selective Replication tool, which is one of the tools in the ADX Tools package, simplifies bulk activation, deactivation and delete operations for AEM users.

Selective Replication Tool augments AEM Activation Tree with some useful additional features. AEM Activation Tree is a replication console to activate the entire tree in one action. Selective Replication tool adds to the utilities of bulk activation, deactivation and delete operations. The task gets even simpler when there is an option to selectively choose the root paths to replicate, with an added advantage of selecting the replication agents. To further apply the feature of selectivity, users have the option to include or exclude child node or DAM assets.

Purpose:

To perform bulk activation, deactivation or delete operations on a path-task list uploaded via Excel with the ability to select relevant replication agents.

Implementation:

  1. The simplest part of the tool is its input, which is uploading an Excel file containing the path-task list. A sample excel file can be downloaded using the ‘Sample’ button present in the description.
selectivecreplication

ADX Tools in AEM: Selective Replication

Excel file contains the following fields:

  • Path – root path for operation
  • Include Children – option to include child nodes of content or not
  • Include DAM Assets – option to include DAM assets of content or not
  • Action Type – defining the type of action (Activate, Deactivate, Delete)2. The tool gives an option to select multiple replication agents from the available list.

 

  1. We can get detailed replication logs with the option to export it as an Excel file or pdf.

  1. Users also get the option to see the history of the operations performed by clicking on the history icon present on the top right corner of the tool along with the tool guide.

 

Each of the individual logs can be viewed by clicking on the respective Logs icon. This action will retrieve the history of that particular operation.

 

Key Highlights of the tool:

  • Option to selectively choose the root paths for replication
  • The advantage of choosing relevant replication agents
  • Simple path-task list input via Excel
  • Include or exclude child nodes/DAM assets
  • Detailed replication logs of each root path
  • History of replication actions performed via this tool

 

The video demonstration of the tool can be viewed at:

Related Blogs:

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

 

Advent of Add-on Advantages in AEM: ADX Tools

Adobe Experience Manager (AEM) provides a  multitude of OOTB features to comfort the lives of users in various fields, but enriching those features by providing user-friendly consoles for specific tasks would be like an icing on the cake!

During release activities, there are many scenarios where admins or editors wish for an easy to use console as experiencing a productive workday feels euphoric for everyone! Sometimes, the administrator also wishes for wizards to ease up their tasks for the maintenance of AEM.

As a popular saying goes,

‘Good things come in small packages’,

ADX Tools is an amalgamation of a myriad of features in AEM developed at Argil DX, that would garnish the OOTB AEM features giving users a friendly console and quick results to save time. It is a package providing various wizards to cater to the requirements of admins or authors to make some of their tasks easier.

Let’s take a sneak peek into the utility of the tools and problems that they resolve!

Packages in AEM can become obsolete after some time and admins will accept that they consume a lot of repository space. Sometimes, it is difficult to debug the problem of growing repository size. Package Purging Tool is a silver lining in the cloud for admin as it provides a console to deal with this issue and helps purge packages in bulk.

AEM Tree Activation can be enhanced by adding some easy-to-use features and providing answers to various queries of replication. Many questions revolve around selecting the replication paths or getting a console for bulk activation, deactivation or delete operations and choosing relevant replication agents. Selective Replication Tool is a one-stop solution for all the replication activities.

There are instances when AEM admins want to manage AEM users conveniently from a single console i.e. be able to disable the users who are no longer required to login into the system or delete the users who have left the organization or enable some users who have just switched the projects. Also, admins might want to look at the percentage of users logged into the system since a specified time. User Status Report will give a detailed list of active, inactive, disabled or system users based on their login time.

It is usually a tough task to create packages by adding a huge list of filters manually and managing the child nodes and DAM renditions. Selective Content Packaging automates this task and simplifies the burden of content authors to create packages from an excel file as input. It also gives detailed packaging logs and history of packages created.

During release procedures, admins require a list of pages that have been modified or reauthored since the last release to be able to package them. Or a list of pages that have been modified but not replicated yet. Content Report is an answer to all such reporting queries to make the lives of content authors simpler in terms of managing the project.

OOTB Live Usage Report shows the live usage of components on pages. Sometimes, due to heavy content on the site, the response is slow. Wouldn’t it be easier for authors to get live usage of multiple components belonging to multiple sites all in one single click? The New Components Usage Report is a console for providing multi-site, multi-component report with many more interesting features.

 

So, ADX AEM Tools is a consolidation of some additional features that enriches the OOTB features in AEM and can provide a real deal of ease for users.

Related Blogs:

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

AEM-DTM-Target Integration. Simplified! – Part1

Introduction:
Let’s start with the introduction of three gems of Adobe Experience Cloud crown:

  1. AEM – Adobe Experience Manager(AEM) is a web content management system with a lot of powerful features to manage, organise and deliver the content with best in class experience. AEM came to Adobe with the acquisition of Day Software in 2010, earlier it was known as Day CQ (Communique). For this article, we are using AEM 6.3 version.
  2. DTM – Dynamic Tag Management(DTM) is a tag management tool which offers tools to integrate Adobe Experience Cloud Solutions as well as solutions like Google Analytics etc.DTM used to be known as ‘Satellite’ before Adobe had acquired it in 2013.
  3. Target – Adobe Target is a personalization solution of Adobe Experience Cloud Suite, which delivers the personalisation of content based on different type rules. Target came to Adobe with the acquisition of Omniture in 2009. In this article, we are going to demonstrate the Target VEC capabilities.

Architecture:
AEM can be integrated with Target directly without using DTM. However, it’s recommended to use the DTM in between due to listed benefits:

  1. Efficiency –DTM allows you to optimise the loading time of multiple tools and marketing tags.
  2. Reduce Cost – Minimise the development cost as once Data Layer is in place multiple solution can leverage the same.
  3. Flexibility – DTMallows you to quickly test and optimise tags without being bound by release cycles.
  4. Multiple Sites – Using DTM you can manage multiple sites from the single console.

AEM is usually connected with DTM using AEM Cloud Services and Target is connected to DTM using Experience Cloud configuration. Here is the relevant diagram:

 

Request Flow:
How a request flows from AEM to Target via DTM:

  1. AEM starts rendering a site page.
  2. Site has a DTM script attached along with Data Layer. DTM script is associated with a relevant property. Data Layer discussed below.
  3. DTM Property has Target added to it, which raises a request to Target and share required data.
  4. Target pushes its response back to AEM instance using mbox js. Note: Now mbox.js has a newer and updated alternative which is known as at.js
  5. AEM page got Target response which gets rendered on the page.     

Data Layer:
As you might have noticed in request flow that AEM site has got the DTM Script and Data Layer associated. Data layer is a W3C standard to store values in javascript object. Data layer is created at AEM and consumed by DTM to get the required data from AEM instance and push to any solution like Analytics, Target etc. We are going to create a sample data layer below in DTM Rules section.

DTM Setup:
To get the access of DTM, one has to raise the request with Adobe Client Care with proper information. Once the access is granted, go to https://dtm.adobe.com and login with the credentials provisioned by Client Care.

To start with DTM, create a new property with the URL of the website. Thereafter add the required tools in the property like Adobe Analytics or Adobe Target. In AEM configuration, we are going to use same DTM Property in order to integrate the AEM with Analytics, Target, etc.

For this article we are going to add Adobe Target, for this we need Client Code which will be provided by the Client Care or alternatively you can try adding using Experience Cloud membership.

 

DTM Property

Adding Tool in DTM Property

Adding Target as a Tool in DTM Property

DTM Rules:
In above steps you have created a new DTM property, added Target as a tool in the same property. Now you need to know how to play with data, DTM uses data layer to get the data from AEM instance. For example, using Target you need to render homepage of website based on browser, location, devices etc or you can also get the user specific details like age, gender, interests etc. Hence you need to get all such information from AEM in data layer. For example, here the data layer:

Once the data-layer is all set, fetch the values from data layer and set it in DTM data elements. We use these data elements in different types of rules. DTM has got three type of rules:
1. Event Based Rule – Rules executed when visitor interacts with on-page elements.
2. Page Load Rule – Rules executed when visitor loads the page.
3. Direct Call Rule – Rules executed when you want to tell DTM to do something specifically.

 

 

DTM Rules

Creating a data element using data layer is quite straight forward. You can see the below screenshot, here we have created a new data element Page Title which is mapped with pageName field of data layer created above 

Data Elements

DTM Workflow:
Every property in DTM follows a standard workflow. Workflow has got three steps:

  1. Creation of property and rules.
  2. Approve the newly added and modified rules.
  3. Publish the property to make the changes live.

AEM-DTM Integration:
There are two ways to integrate DTM with AEM:

  1. Using Cloud Services
  2. Embed JS
  1. Using Cloud Services:

Using AEM admin console, go to Tools > Deployment > Cloud Services. Find ‘Dynamic Tag Management’ and click on ‘Configure now’. Provide a Title and Name of the configuration keeping Parent Configuration field intact. Enter the details as below:

Property Description
API Token The value of the API Token property of your Dynamic Tag Management user account. AEM uses this property to authenticate with Dynamic Tag Management.
Company The company with which your login ID is associated.
Property The name of the Web Property that you created for managing the tags for your AEM site.
Include Production Code on Author Select this option to cause the AEM author and publish instances to use the production version of the Dynamic Tag Management libraries.

When this option is not selected, the Staging Settings apply to the author instance, and the Production Settings apply to the publish instance.

There is an option to self-host the DTM libraries which means AEM will host the DTM libraries if this option is checked, if we want to use the libraries from the cloud then we should uncheck this option. Here we are using later one.

  1. Embed JS:

Go to the DTM Console using https://dtm.adobe.com and click on the relevant property.
Go to Embed tab, copy the Header and Footer staging script, go to the AEM author instance and copy the script in header and footer of the website respectively. Similarly, copy the header and footer production script and put in the AEM publish instance.

Let’s say you have integrated DTM with AEM using one of the above-mentioned method, assign the DTM config to the root of your site using AEM Sites console.

DTM-AEM Connection Test:
Now you need to test whether DTM script is getting loaded with your website. In browser, try to open any page of your website where you have assigned the DTM config and open browser console. If “_satellite” object exists then it means DTM script is getting loaded. You can also try retrieving the data elements that you have created in DTM using “_satellite.dataElements”. If you are able to find all the details, you are good to go.

If _satellite object doesn’t exist, it means page doesn’t have the DTM header/footer script. You can view the source of the page to confirm the same.

 

Satellite Object

 

Satellite Data Elements

 

 

DTM Debugging Tools:
In DTM we play with different types of scenarios and scripts, hence we might need to check if the scripts are working fine and order they are getting executed.
There are couple browser plugins are available which proved to be quite for debugging.

Launch Switch:
It enables the logging in console and as well as we can test the changes using staging script, before making the changes live.

There are two button available on the plugin console. Tweaking them will do the following:
Debug: It enables the logging of the rules, you can also add the logs using _satellite.notify(“info”).
Staging: It will enable the changes you have made in property which you have not published. This is used for testing the changes  before making them live.

Download URL for Chrome: https://chrome.google.com/webstore/detail/launch-and-dtm-switch/nlgdemkdapolikbjimjajpmonpbpmipk

 

Tagtician:
It shows the detailed information about all the DTM Rules. 
Download URL Chromehttps://chrome.google.com/webstore/detail/tagtician-for-adobe-dtm/hiaoiehpkillodoeillmodjcadmfmcbg  

Reference:
Adobe DTM Documentation: https://marketing.adobe.com/resources/help/en_US/dtm/

This is the first part 1 of “AEM-DTM-Target Integration. Simplified!” where you have learned how to setup DTM, create DTM property and data elements, integrate DTM with AEM and debug DTM. In Part 2, you will learn how to create different types of rules in DTM, use these rules to share the information to Target, Target activities, Target audience and how to use Target VEC (Visual Enhanced Composer) along with the Target debugging tweaks.

Migration of SCR Annotations to DS Annotations

Migration of SCR Annotations to DS Annotations
Change is a rule of life, and if you are not updating yourself on current trends then you are constantly falling behind on new updates that can be essential to your system. With Adobe, they release a new version of AEM  every year. Last year, they introduced SCR annotations, and now they are supporting DS annotations. From AEM 6.2 DS Annotations are supported, and it is highly recommended that you use these in the newer version of AEM.  

Let’s see brief introduction of SCR Annotations and DS Annotations.

SCR Annotations:
SCR stands for Service Component Runtime. The ”maven-scr-plugin” uses scr annotations from the corresponding subproject at Apache Felix. All annotations are in “org.apache.felix.scr.annotations” package. The Apache Felix SCR described by the OSGi Declarative Services Specification is implemented by the “org.apache.felix.scr” bundle.

SCR annotations do not support new feature from R6 and above. It is highly recommended to use OSGi annotations for Declarative Services instead.

DS Annotations:
DS annotation is an official implementation from OSGi R6 (release 6) specification. It is also known as OSGi Declarative Services Annotations.
Remember that declarative services are a compiled time process. For DS annotations to be effective, they must be handled during the build process.
The migration is fairly easy and both annotation styles will work side-by-side while you complete the switch-over.
So here will we discuss how to migrate from SCR annotation to DS annotations.

Plugin:
For DS annotations we have to use “maven-bundle-plugin” instead of “maven-scr-plugin”. Version 3.2.0 or greater.


Dependencies:
For DS annotations we need artifacts  “org.osgi.service.metatype.annotationsand org.osgi.service.component.annotations” instead org.osgi.core” and “org.osgi.compendium”.

Java Package:
In DS Annotation, package “org.apache.felix.scr.annotations.*” will be replaced with “org.osgi.service.component.annotations.*”  and “org,osgi.service.metatype.annotations.*”.

Migration of Component and Services:
We used to use @Component, @Service annotations in SCR Annotations while in DS annotation just have @Component annotation with the collaboration of all these annotations.

SCR annotation Implementation:


DS annotation Implementation:

Migration of Sling Servlet:
We used to use @Component, @Service @SlingServlet @Properties in SCR Annotations while DS annotation just has @Component with the collaboration of all these annotations.

SCR annotation Implementation


DS annotation Implementation:


Migration of Custom Workflow process:
SCR annotations Implementation:


DS annotation Implementation:
 


Migration of Custom OSGi Configuration:
Major changes came in custom OSGi configuration. OSGi annotations provided a flexibility to create configuration in a separate interface and we can use it in any place.

SCR annotations Implementation:


DS annotation Implementation:
Interface:


Actual Class:


Fig- OSGi Configuration in Felix Console


Migration of OSGi Config:
Migration of OSGi config is quite tricky. There are two scenarios for OSGi config.

  1. You have created new configuration according to DS annotations and you want a config of it for a default value.
  2. You are migrating old custom config to a new one (DS annotations) and you already have config file.

Scenario 1:
If you have created your own custom config. For e.g.

Interface:

So, your default configuration will be:


Scenario 2:
If you have already default configuration and you are migrating to DS annotation. For e.g.

Config file:


So, your interface will be:


Hope this blog will help you to migrate from SCR to DS annotation.

Thank you!! Happy Learning!!

 

TRIGGERING A WORKFLOW USING EVENT LISTENERS IN AEM

AEM Version: 6.2
Target Audience: AEM Developers

Introduction

In AEM 6.2 Workflows, we can trigger a workflow when a DAM Asset is created, modified, or deleted within a given path. In this article, we will explore triggering workflows from our code based on events in the JCR.

Suppose you have a workflow that creates custom renditions of assets in addition to the default AEM renditions, when the asset is under “/content/dam/ProjectName/images/”. You would have set up two launchers for triggering this workflow: one with event type as “Node Create” and one with “Node Modified”. We can also achieve the same functionality through our code, without touching the GUI.

Requirement

When assets are moved into a certain folder structure in DAM, trigger a workflow that creates a 100px X 100px thumbnail of our image.

No-rendition-outside-imgs

Fig 1: Before Moving the asset, no custom thumbnail. Fig 2: Desired result after moving the asset, the new thumbnail.

Analysis

The intuitive thought is that when an asset is moved, a new node is created in the new location and the old one is deleted. However, experience shows that AEM does not create a new node in the destination folder on Node Move. We know this because the ‘jcr:Created’ property does not change. AEM does not even change the last modified date.

Creation Timestamp Before Moving the Asset Creation Timestamp is the same after moving

Fig 3: Creation Timestamp Before Moving the Asset. Fig 4: Creation Timestamp is the same after moving

Modification Timestamp Before Moving the Asset. Modification Timestamp is the same after moving

Fig 5: Modification Timestamp Before Moving the Asset. Fig 6: Modification Timestamp is the same after moving.

What if we copy the asset?

On copying the asset, a new version of the same is created. This triggers the Node Creation launcher.

No versions before copying the asset Version created after copy-pasting the asset

Fig. 7: No versions before copying the asset. Fig. 8: Version created after copy-pasting the asset.

Approach

Event Listeners

AEM supports observation, which enables us to receive notifications of persistent changes to the workspace. A persisted change to the workspace is represented by a set of one or more events. Each event reports a single simple change to the structure of the persistent workspace in terms of an item added, changed, moved or removed. There are thus 7 possible events at the JCR level, viz:

  1. Node Added
  2. Node Moved
  3. Node Modified
  4. Node Removed
  5. Property Added
  6. Property Removed
  7. Property Changed

We connect with the observation mechanism by registering an event listener with the workspace. An event listener is a class implementing the EventListener interface, that responds to the stream of events to which it has been subscribed. An event listener is added to a workspace with:

(A detailed explanation of each parameter is given with the code example in the package as well as the at the end of this article) As defined by the EventListener interface, listener must provide an implementation of the onEvent method:

When an event occurs that falls within the scope of the listener, the repository calls the onEvent method invoking our logic which processes/responds to the event. In our case, we will register an event listener to listen for “Node Moved” events under “/content/dam/images” so that when an asset is moved to that folder, our workflow can be triggered.

Implementation

When the component is activated, the activate(…) method is called. It contains a call to ObservationManager.addEventListener(…) for registering the event listener. The deactivate(…) method contains logic for deregistering the event listener, and is triggered when the bundle is being stopped.

When the relevant event occurs, the onEvent(…) method is called, which contains logic for processing the event. In our case, we trigger a workflow.

The following is the relevant code from ThumbnailNodeMovedListener.java:

Download this code (including the workflow):

Build it using

N.B: Creating a workflow is not part of this tutorial, and therefore a ready workflow has been provided in the code package. However, if you want to learn to create workflows, here is an excellent resource: ->

/workflow-in-aem/

References

Adobe Consulting Services. (2018, March 20). acs-aem-samples/SampleJcrEventListener.java at master · Adobe-Consulting-Services/acs-aem-samples. Retrieved from Github: https://github.com/Adobe-Consulting-Services/acs-aem-samples/blob/master/bundle/src/main/java/com/adobe/acs/samples/events/impl/SampleJcrEventListener.java

Day Software AG. (2018, March 20). JCR 2.0: 12 Observation (Content Repository for Java Technology API v2.0). Retrieved from Adobe Docs: https://docs.adobe.com/docs/en/spec/jcr/2.0/12_Observation.html