protected abstract void updateBulk(DbBulkOperation operation);
protected abstract String getDbVersion();
public void dbSchemaCreate() {
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
HistoryLevel configuredHistoryLevel = processEngineConfiguration.getHistoryLevel();
if ( (!processEngineConfiguration.isDbHistoryUsed())
&& (!configuredHistoryLevel.equals(HistoryLevel.HISTORY_LEVEL_NONE))
) {
throw new ProcessEngineException("historyLevel config is higher then 'none' and dbHistoryUsed is set to false");
}
if (isEngineTablePresent()) {
String dbVersion = getDbVersion();
if (!ProcessEngine.VERSION.equals(dbVersion)) {
throw new WrongDbException(ProcessEngine.VERSION, dbVersion);
}
} else {
dbSchemaCreateEngine();
}
if (processEngineConfiguration.isDbHistoryUsed()) {
dbSchemaCreateHistory();
}
if (processEngineConfiguration.isDbIdentityUsed()) {
dbSchemaCreateIdentity();
}
if (processEngineConfiguration.isCmmnEnabled()) {
dbSchemaCreateCmmn();
}
if (processEngineConfiguration.isCmmnEnabled() && processEngineConfiguration.isDbHistoryUsed()) {
dbSchemaCreateCmmnHistory();
}
}