Cannot edit DAM after Replication Workflow Step called from EventListener (AEM 6.4.1) / S7ConfigResolverImpl

253 views Asked by At

Cannot edit DAM after Replication Workflow Step called from EventListener (AEM 6.4.1) / S7ConfigResolverImpl

I have an EventListener that calls a Workflow in its onEvent() method. That workflow activate an asset, and after complete correctly (it's replicates the content towards publish instance) i'm not being able to edit the image from http://localhost:4502/damadmin#/content/dam. When double click or right click --> open, nothing happens and I see this in error.log:

GET /content/dam/templates.s7config.json HTTP/1.1] com.day.cq.dam.scene7.impl.S7ConfigResolverImpl Get S7Config null for resource /content/dam/someimage.jpg

Likewise, if I go trough http://localhost:4502/siteadmin#/content/dam and double click the asset, opens a dialog correctly (but not the one that appears on /damadmin#/conten/dam when asset works properly).

Piece of EventListener implementation in activate method:

session = repository.loginService("writeService",null);

session.getWorkspace().getObservationManager().addEventListener(this, Event.NODE_ADDED | Event.NODE_MOVED | Event.NODE_REMOVED | Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED, path, true, null, null, false);

session.refresh(true);

Piece of WorkflowProcess implementation in execute method:

Session session = wfSession.adaptTo(Session.class);
ReplicationOptions options = new ReplicationOptions();
options.setSuppressVersions(true);
options.setSynchronous(true);
options.setSuppressStatusUpdate(false);
replicator.replicate(session, ReplicationActionType.ACTIVATE, path, options);

Any thoughts?

0

There are 0 answers