Details
Description
1) Create tables manually using the Activiti DDLs
2) Run Activiti in ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE mode -> exception is thrown because historyLevel property is not in DB
3) We overrode dbSchemaCheckVersion() to make this work (see below)
@Override
public void dbSchemaCheckVersion() {
if (isEngineTablePresent()) {
Integer configuredHistoryLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
PropertyEntity historyLevelProperty = selectById(PropertyEntity.class, "historyLevel");
if (historyLevelProperty == null) {
PropertyEntity property = new PropertyEntity("historyLevel", Integer.toString(configuredHistoryLevel));
insert(property);
}
}
super.dbSchemaCheckVersion();
}
We verified the error and the fix using Oracle DB and DDLs.
Issue Links
- duplicates
-
ACT-1333
Fix upgrade script
-
I see this on line 11 in the engine create scripts:
insert into ACT_GE_PROPERTY
values ('schema.history', 'create(5.11-SNAPSHOT)', 1);
I don't understand how the property is not found after you ran the activiti ddls manually. Please reopen and add more clues if we should look at this in more detail.