Hi guys,
We are using preprecosser interface to handle one event. It is using below method.
public void preprocess(final ReplicationAction replicationAction, final ReplicationOptions replicationOptions)
May i know how to get agentid for above method ? Below code i tried but it was throwing null for agent id. Same code works with event handler interface.
Event event = replicationAction.toEvent();
final List<String> agentIdList = (List) event.getProperty("agentIds");
LOG.info("preprocess agentIdList {}", agentIdList);
final boolean isPreview = CollectionUtils.isNotEmpty(agentIdList) &&
agentIdList.stream().anyMatch(id -> id.contains("preview"));
if (isPreview)
{
return;
}
I want to figure out if the request is for Preview environment or for Publish env using agent ids. Please let me know if any one has inputs for this.