Skip to content

IdmDbSchemaManager does not honor the databaseTablePrefix / tablePrefixIsSchema settings #4044

@jtokarski

Description

@jtokarski

Given
Flowable setup like this:

final SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setEngineName("processEngine");
config.setApplicationContext(applicationContext);
config.setDataSource(dataSource);
config.setTransactionManager(transactionManager);
config.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE);
config.setDatabaseTablePrefix("defendev_bpm.");
config.setTablePrefixIsSchema(true);
return config.buildEngine();

(the DDL scripts for PostgreSQL are managed by external tool, not by Flowable)

When ProcessEngine is starting
the following error ocurrs:

Caused by: org.flowable.common.engine.api.FlowableWrongDbException: version mismatch: library version is '7.1.0.2', db version is 5.99.0.0 Hint: Set <property name="databaseSchemaUpdate" to value="true" or value="create-drop" (use create-drop for testing only!) in bean processEngineConfiguration in flowable.cfg.xml for automatic schema creation
	at app//org.flowable.idm.engine.impl.db.IdmDbSchemaManager.schemaCheckVersion(IdmDbSchemaManager.java:75)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
	at app//org.flowable.common.engine.impl.db.SchemaOperationsEngineBuild.executeSchemaUpdate(SchemaOperationsEngineBuild.java:95)
	at app//org.flowable.common.engine.impl.db.SchemaOperationsEngineBuild.execute(SchemaOperationsEngineBuild.java:68)
	at app//org.flowable.common.engine.impl.db.SchemaOperationsEngineBuild.execute(SchemaOperationsEngineBuild.java:30)

It looks like there are 4 SchemaManagers:

  • CommonDbSchemaManager - success
  • ProcessDbSchemaManager - success
  • IdmDbSchemaManager - fails because it is always looking for table without schema prefix, in this case select VALUE_ from ACT_ID_PROPERTY where NAME_ = ? instead of select VALUE_ from defendev_bpm.ACT_ID_PROPERTY where NAME_ = ?
  • EventDbSchemaManager - skipped

The ProcessEngine starts successfully when I set ?currentSchema=defendev_bpm in JDBC connection URL, but I need to avoid this and trying to achieve it by using databaseTablePrefix/tablePrefixIsSchema settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions