use of org.flowable.spring.SpringProcessEngineConfiguration in project plumdo-work by wengwh.
the class FlowableEngineConfig method springProcessEngineConfiguration.
@Override
public SpringProcessEngineConfiguration springProcessEngineConfiguration(DataSource dataSource, PlatformTransactionManager platformTransactionManager, ObjectProvider<AsyncExecutor> asyncExecutorProvider) throws IOException {
SpringProcessEngineConfiguration conf = super.springProcessEngineConfiguration(dataSource, platformTransactionManager, asyncExecutorProvider);
String databaseSchema = conf.getDatabaseSchema();
conf.setDatabaseCatalog(databaseSchema);
conf.setDatabaseTablePrefix(databaseSchema + ".");
conf.setTablePrefixIsSchema(true);
conf.setActivityFontName("黑体");
conf.setLabelFontName("黑体");
conf.setAnnotationFontName("黑体");
return conf;
}
use of org.flowable.spring.SpringProcessEngineConfiguration in project syncope by apache.
the class DomainProcessEngineFactoryBean method getObject.
@Override
public DomainProcessEngine getObject() throws Exception {
if (engine == null) {
Map<String, ProcessEngine> engines = new HashMap<>();
ctx.getBeansOfType(DataSource.class).entrySet().stream().filter(entry -> (!entry.getKey().startsWith("local"))).forEachOrdered(entry -> {
String domain = StringUtils.substringBefore(entry.getKey(), DataSource.class.getSimpleName());
DataSource dataSource = entry.getValue();
PlatformTransactionManager transactionManager = ctx.getBean(domain + "TransactionManager", PlatformTransactionManager.class);
Object entityManagerFactory = ctx.getBean(domain + "EntityManagerFactory");
SpringProcessEngineConfiguration conf = ctx.getBean(SpringProcessEngineConfiguration.class);
conf.setDataSource(dataSource);
conf.setTransactionManager(transactionManager);
conf.setTransactionsExternallyManaged(true);
conf.setJpaEntityManagerFactory(entityManagerFactory);
if (conf.getBeans() == null) {
conf.setBeans(new SpringBeanFactoryProxyMap(ctx));
}
if (conf.getExpressionManager() == null) {
conf.setExpressionManager(new SpringExpressionManager(ctx, conf.getBeans()));
}
if (EngineServiceUtil.getIdmEngineConfiguration(conf) == null) {
conf.addEngineConfiguration(EngineConfigurationConstants.KEY_IDM_ENGINE_CONFIG, ctx.getBean(SpringIdmEngineConfiguration.class));
}
engines.put(domain, conf.buildProcessEngine());
});
engine = new DomainProcessEngine(engines);
}
return engine;
}
Aggregations