Removed Liquibase from the App, CMMN, DMN and event registry engines and changed it to manual SQL files like it was already done for the BPMN, Common and IDM engines.
does it mean, there is no liquibase support, how to do schema upgrades ?
Hi @gsudheer , @filiphr ,
We are using the flowable in our spring boot application of version 7.1.0 and using liquibase to create custom tables and manage it.
To use the repository tables provided by flowable engine, we are keeping the flowable schema update as true and to create custom tables we enabled the liquibase.
Everything working fine if use this setup in single instance but we are facing issues if we use this in multiple instance setup environment. Any suggestion to avoid the conflicts of DB operations in multiple instances?
I’m not sure that I am following @Kishore-M_ghub. Flowable 7.1.0 is not using Liquibase, if you want to use Liquibase for your own custom tables you can use it.
What kind of problems are you having in a multi instance setup? What kind of conflicts of Flowable DB operations are you seeing?
Hi @filiphr ,
We are deploying the application image with 2 instances at that time the instance1 is created the flowable tables and instance2 is also trying to create the indexes, causing an issue of duplicate or already exists
OK, I see what you mean. Have a look at the flowable.use-lock-for-database-schema-update property. With this Flowable is going to use a Flowable specific lock to achieve what you are looking for.
Thanks @filiphr let me try that,
FYI… below is the error observing in the environment, will the property you suggested help resolving this error?
“message”:“exception for engine cmmn during async job acquisition: \n### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job\n### The error may exist in org/flowable/job/service/db/mapping/entity/Job.xml\n### The error may involve org.flowable.job.service.impl.persistence.entity.JobEntityImpl.selectJobsToExecute-Inline\n### The error occurred while setting parameters\n### SQL: SELECT RES.* from ACT_RU_JOB RES WHERE SCOPE_TYPE_ = ? and LOCK_EXP_TIME_ is null order by RES.ID_ asc LIMIT ? OFFSET ?\n### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job”,“ecs.version”: “1.2.0”,“service.name”:“Flowable”,“event.dataset”:“Flowable”,“process.thread.name”:“flowable-cmmn-acquire-async-jobs”,“log.logger”:“org.flowable.job.service.impl.asyncexecutor.AcquireAsyncJobsDueRunnable”,“error.type”:“org.apache.ibatis.exceptions.PersistenceException”,“error.message”:“\n### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job\n### The error may exist in org/flowable/job/service/db/mapping/entity/Job.xml\n### The error may involve org.flowable.job.service.impl.persistence.entity.JobEntityImpl.selectJobsToExecute-Inline\n### The error occurred while setting parameters\n### SQL: SELECT RES.* from ACT_RU_JOB RES WHERE SCOPE_TYPE_ = ? and LOCK_EXP_TIME_ is null order by RES.ID_ asc LIMIT ? OFFSET ?\n### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job”,“error.stack_trace”:“org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job\n### The error may exist in org/flowable/job/service/db/mapping/entity/Job.xml\n### The error may involve org.flowable.job.service.impl.persistence.entity.JobEntityImpl.selectJobsToExecute-Inline\n### The error occurred while setting parameters\n### SQL: SELECT RES.* from ACT_RU_JOB RES WHERE SCOPE_TYPE_ = ? and LOCK_EXP_TIME_ is null order by RES.ID_ asc LIMIT ? OFFSET ?\n### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job\n\tat org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)\n\tat org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:156)\n\tat org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\n\tat org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)\n\tat org.flowable.common.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:284)\n\tat org.flowable.common.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:247)\n\tat org.flowable.common.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:171)\n\tat org.flowable.common.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:186)\n\tat org.flowable.common.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:162)\n\tat org.flowable.job.service.impl.persistence.entity.data.impl.MybatisJobDataManager.findJobsToExecute(MybatisJobDataManager.java:69)\n\tat org.flowable.job.service.impl.persistence.entity.JobInfoEntityManagerImpl.findJobsToExecute(JobInfoEntityManagerImpl.java:38)\n\tat org.flowable.job.service.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:52)\n\tat org.flowable.job.service.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:32)\n\tat org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.lambda$execute$0(CmmnCommandInvoker.java:62)\n\tat org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.executeOperation(CmmnCommandInvoker.java:136)\n\tat org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.executeOperations(CmmnCommandInvoker.java:80)\n\tat org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.execute(CmmnCommandInvoker.java:64)\n\tat org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)\n\tat org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:105)\n\tat org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57)\n\tat org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)\n\tat org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57)\n\tat org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)\n\tat org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)\n\tat org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)\n\tat org.flowable.job.service.impl.asyncexecutor.AcquireAsyncJobsDueRunnable.acquireAndExecuteJobs(AcquireAsyncJobsDueRunnable.java:182)\n\tat org.flowable.job.service.impl.asyncexecutor.AcquireAsyncJobsDueRunnable.executeAcquireCycle(AcquireAsyncJobsDueRunnable.java:156)\n\tat org.flowable.job.service.impl.asyncexecutor.AcquireAsyncJobsDueRunnable.run(AcquireAsyncJobsDueRunnable.java:134)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: org.postgresql.util.PSQLException: ERROR: permission denied for table act_ru_job\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2734)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2421)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:518)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:435)\n\tat org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:196)\n\tat org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:182)\n\tat com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)\n\tat com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)\n\tat org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)\n\tat org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)\n\tat org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65)\n\tat org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)\n\tat org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)\n\tat org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)\n\tat org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:90)\n\tat org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)\n\t… 27 more\n”