flowable-engine
flowable-engine copied to clipboard
Cannot be disabled in latest version
Describe the bug
In version 6.4.2
and before the startup of Flowable modules could be disabled with the following Spring Boot configuration:
flowable:
app:
enabled: false
deploy-resources: false
servlet:
load-on-startup: 0
cmmn:
enabled: false
deploy-resources: false
servlet:
load-on-startup: 0
async:
executor:
auto-activate: false
content:
enabled: false
servlet:
load-on-startup: 0
database-schema-update: false
dmn:
enabled: false
deploy-resources: false
resource-location: classpath*:/flowable/dmn/
servlet:
load-on-startup: 0
history-enabled: false
form:
enabled: false
deploy-resources: false
servlet:
load-on-startup: 0
idm:
enabled: false
servlet:
load-on-startup: 0
process-definition-location-prefix: classpath*:/flowable/processes/
process:
enabled: false
servlet:
load-on-startup: 0
async-history:
executor:
auto-activate: false
jpa-enabled: false
async-executor-activate: false
This does not work anymore with the latest upgrade to minor 6.7.2
. No additional parameters have been added between both versions. Now a Spring Boot app is with this configuration fails because Flowable still wants to initiate beans. The error message ist:
2021-01-01 23:04:16.776 ERROR [68159/1] - o.f.c.e.impl.interceptor.CommandContext : Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "FLW_CHANNEL_DEFINITION" not found; SQL statement:
SELECT RES.*
from FLW_CHANNEL_DEFINITION RES
WHERE RES.VERSION_ = (select max(VERSION_) from FLW_CHANNEL_DEFINITION where KEY_ = RES.KEY_
and ( (TENANT_ID_ IS NOT NULL and TENANT_ID_ = RES.TENANT_ID_) or (TENANT_ID_ IS NULL and RES.TENANT_ID_ IS NULL) )
)
order by RES.ID_ asc [42102-200]
### The error may exist in org/flowable/eventregistry/db/mapping/entity/ChannelDefinition.xml
### The error may involve org.flowable.eventregistry.impl.persistence.entity.ChannelDefinitionEntityImpl.selectChannelDefinitionsByQueryCriteria
### The error occurred while executing a query
### SQL: SELECT RES.* from FLW_CHANNEL_DEFINITION RES WHERE RES.VERSION_ = (select max(VERSION_) from FLW_CHANNEL_DEFINITION where KEY_ = RES.KEY_ and ( (TENANT_ID_ IS NOT NULL and TENANT_ID_ = RES.TENANT_ID_) or (TENANT_ID_ IS NULL and RES.TENANT_ID_ IS NULL) ) ) order by RES.ID_ asc
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "FLW_CHANNEL_DEFINITION" not found; SQL statement:
SELECT RES.*
from FLW_CHANNEL_DEFINITION RES
Expected behavior
Only an upgrade of a minor version shall not impact the internal behavior of Flowable startup. The configuration parameters have not changed, so I expect the same behavior as before, that Flowable could be disabled and only activated via Spring profile. At best there should be one and only one configuration parameter to enable/disable the whole Flowable suite at all, like flowable.enabled=true|false
Code see above.
Maven dependencies:
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-dmn</artifactId>
<version>${flowable.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
Additional context
SpringBoot 2.6.2 Flowable upgrade from 6.4.2 -> 6.7.2
From my line by line debug experience:
- you have to set
flowable.eventregistry.enabled=false
inapplication.properties
- you have to set
configuration.setDisableIdmEngine(true);
in@Bean public SpringProcessEngineConfiguration processEngineConfiguration
because there is no property for it. And it's a known feature or bug that not all code refer toflowable.eventregistry.enabled=false
And some experience might be related:
- using
@Bean processEngineConfiguration
let theflowable.database-schema-update=true
take no effect. You have toconfiguration.setDatabaseSchemaUpdate("true");