I'm creating an event handler which will run a workflow when an asset is created/uploaded in AEM. I implemented the below filter but multiple events are getting triggered for multiple resource types (original asset and renditions). Is there a way to add a resource type filter so that it is only triggered when resource type is "dam:Asset"?
@Component(service = EventHandler.class, immediate = true, property = {
Constants.SERVICE_DESCRIPTION + "=DAM Asset Events ",
EventConstants.EVENT_TOPIC + "=org/apache/sling/api/resource/Resource/ADDED",
EventConstants.EVENT_FILTER + "= (path=/content/dam/*)" })