Spring Boot Multi databases UI using the wrong database schema


I have just started on my flowable journey this year, I initially tried using Flowable Tomcat war deployment strategy, but I needed access to my own libraries and JPA entities so I decided to use the Flowable spring boot starters to roll my own executable spring boot app.

I required my database tables and flowables to be kept in separate schemas in a postgres database, and I achieved this thanks to this excellent post Spring Boot Integration with a different database, I have the public schema for my own tables and a separate schema for the flowable ones.

This largely works great, with the Process Engine and IDM using the correct flowable schema. However try as I might I can’t get the UI modeler to use the flowable schema. It insists on creating the following tables in my public schema:


And of course the UI is not picking up my existing model and forms etc contained in my flowable schema.

I have spent a lot of time flailing around in the dark trying to find a configuration which changes this, I guess Modeler is just picking up the @Primary datasource. Is there a way I can change this? As in the post mentioned above I am setting the engine datasource successfully using the following code is there a way for me to configure the Modeler datasource in code:

    public EngineConfigurationConfigurer<SpringAppEngineConfiguration> engineConfigurer()
        return configuration ->
            configuration.setTransactionManager(transactionManager);          configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);

I guess the alternative is that I move the UI into a different spring boot app, or run it in docker or something, but I like the idea of having everything in the same place, unless you can advise me that that is the wrong strategy.

Thanks in advance for any help you can offer, and thank you for this resource, it has been invaluable!