Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

EventHandlers not working in AEM6.0


Level 4

Hi Team,

We have created an event handlers which use to listen the events triggered while moving an Asset in DAM which a custom workflow.

But every time move asset button clicked the workflow gets triggered as per the configuration done in launcher.

Handler Code:

@Component(label = "Asset Moved Handler",
        description = "Provides further processing for moved assets.",
        metatype = true,
        immediate = true)
        @Property(label = "Event Topics",
                description = "[Required] Page Event Topics this event handler will to respond to.",
                name = EventConstants.EVENT_TOPIC,
                value = "com/adobe/cq/workflow/payload/move/job",
                propertyPrivate = true) })
public class AssetMovedHandler implements EventHandler {

    private static final Logger log = LoggerFactory.getLogger(AssetMovedHandler.class);

    @Property(name = "workflow.handler.asset-moved.workflow-model",
            label = "Workflow Model",
            value = "/etc/workflow/models/myproject/core-activation/jcr:content/model",
            description = "Workflow model to call after asset has been moved.")
    private String workflowModelId;

    @Property(name = "workflow.handler.asset-moved.asset-path",
            label = "Asset Path",
            value = "/content/dam/myproject/",
            description = "Path to apply handler to.")
    private String assetPath;

    private Replicator replicator;

    private ResourceResolverFactory resourceResolverFactory;

    private WorkflowService workflowService;

    public void handleEvent(Event event) {
        // sanity check.
        log.debug("Get the event topic : "+event.getTopic());
        if ("com/adobe/cq/workflow/payload/move/job".equals(event.getTopic())) {
            Object destPathObj = event.getProperty("payload.move.dest.path");
            log.info("Get the destination object : "+ destPathObj);
            if (destPathObj != null) {
                String destPath = (String) destPathObj;
                // verify asset.
                if (destPath.startsWith(assetPath)) {
                    log.info("Asset path verified");                  


I just wanted to know where to look if event handlers are not working . Even all the services are active and working as expected. 

Please do let me know if I am missing anything.

Thank you


1 Reply



why are you using "com/adobe/cq/workflow/payload/move/job

this is for workflow internal use, what do you intend to do