When IDMSync is turned on, activiti-app startup fails in some cases.
Observed while working on this example - https://github.com/cijujoseph/activiti-examples/tree/master/aps-email-listener-extension. As part of this extension project I have created a email poller. During the initialization of the custom bean named "mailMessageSource" which you can find in https://github.com/cijujoseph/activiti-examples/blob/master/aps-email-listener-extension/src/main/java/com/activiti/extension/bean/APSImapAdapter.java, the app startup fails with the following error. This happens only when the ldap property ldap.synchronization.full.enabled=true
From the error it is clear that there is a duplicate bean issue during the initialization of beans such as idmSyncResource, ldapSyncService etc. However I am surprised to see that it is popping up only when we try to add additional custom beans!
As a fix I tried adding a Qualifier to AbstractExternalIdmSourceSyncService.java as shown below to make sure that the correct taskExecutor is injected all the time! This fixed the issue and the activiti-app started fine!