20154 月27
Nutz 集成Activiti5.17.0 [01]初始化activiti
@SetupBy(value=StartSetup.class)
public class MainModule {
}
private void activitiInit(NutConfig config) { log.info("Activiti Init Start..."); ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration .createStandaloneProcessEngineConfiguration(); processEngineConfiguration.setDataSource(config.getIoc().get(DataSource.class)); processEngineConfiguration.setDatabaseSchemaUpdate("false"); processEngineConfiguration.setJobExecutorActivate(false); processEngineConfiguration.setActivityFontName("宋体"); processEngineConfiguration.setLabelFontName("宋体"); processEngineConfiguration.setXmlEncoding("utf-8"); ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine(); ((Ioc2) config.getIoc()).getIocContext().save("app", "processEngine", new ObjectProxy(processEngine)); ((Ioc2) config.getIoc()).getIocContext().save("app", "repositoryService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getRepositoryService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "runtimeService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getRuntimeService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "taskService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getTaskService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "formService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getFormService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "historyService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getHistoryService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "managementService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getManagementService())); ((Ioc2) config.getIoc()).getIocContext().save("app", "identityService", new ObjectProxy(processEngine.getProcessEngineConfiguration().getIdentityService())); log.info("Activiti Init End."); }
本文地址:https://wizzer.cn/archives/3125 , 转载请保留.