protected abstract void updateBulk(DbBulkOperation operation);
protected abstract String getDbVersion();
public void dbSchemaCreate() {
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
int configuredHistoryLevel = processEngineConfiguration.getHistoryLevel();
if ( (!processEngineConfiguration.isDbHistoryUsed())
&& (configuredHistoryLevel>ProcessEngineConfigurationImpl.HISTORYLEVEL_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();
}
}