@Bean public SpringProcessEngineConfiguration activitiProcessEngineConfiguration(AsyncExecutor activitiAsyncExecutor){
  SpringProcessEngineConfiguration configuration=new SpringProcessEngineConfiguration();
  configuration.setDataSource(herdDataSource);
  configuration.setTransactionManager(herdTransactionManager);
  configuration.setDatabaseSchemaUpdate(getActivitiDbSchemaUpdateParamBeanName());
  configuration.setAsyncExecutorActivate(true);
  configuration.setAsyncExecutorEnabled(true);
  configuration.setAsyncExecutor(activitiAsyncExecutor);
  configuration.setBeans(new HashMap<>());
  configuration.setDelegateInterceptor(herdDelegateInterceptor);
  configuration.setCommandInvoker(herdCommandInvoker);
  initScriptingEngines(configuration);
  configuration.setMailServerDefaultFrom(configurationHelper.getProperty(ConfigurationValue.ACTIVITI_DEFAULT_MAIL_FROM));
  List<ProcessEngineConfigurator> herdConfigurators=new ArrayList<>();
  herdConfigurators.add(herdProcessEngineConfigurator);
  configuration.setConfigurators(herdConfigurators);
  return configuration;
}

@ Bean public SpringProcessEngineConfiguration activitiProcessEngineConfiguration ( AsyncExecutor activitiAsyncExecutor ) { SpringProcessEngineConfiguration configuration = new SpringProcessEngineConfiguration ( ) ; configuration . setDataSource ( herdDataSource ) ; configuration . setTransactionManager ( herdTransactionManager ) ; configuration . setDatabaseSchemaUpdate ( getActivitiDbSchemaUpdateParamBeanName ( ) ) ; configuration . setAsyncExecutorActivate ( true ) ; configuration . setAsyncExecutorEnabled ( true ) ; configuration . setAsyncExecutor ( activitiAsyncExecutor ) ; configuration . setBeans ( new HashMap < > ( ) ) ; configuration . setDelegateInterceptor ( herdDelegateInterceptor ) ; configuration . setCommandInvoker ( herdCommandInvoker ) ; initScriptingEngines ( configuration ) ; configuration . setMailServerDefaultFrom ( configurationHelper . getProperty ( ConfigurationValue . ACTIVITI_DEFAULT_MAIL_FROM ) ) ; List < ProcessEngineConfigurator > herdConfigurators = new ArrayList < > ( ) ; herdConfigurators . add ( herdProcessEngineConfigurator ) ; configuration . setConfigurators ( herdConfigurators ) ; return configuration ; }
gets the activiti process engine configuration .
