Upgrade fail 6.7.2 on task service

Trying to call method: taskService.createTaskQuery().includeProcessVariables().list();
I can pass in more options, they don’t seem to make a difference.
Using maven artifact flowable-task-service version 6.7.1 this works fine.
Updating the whole artifact flowable-engine and all it’s dependencies to 6.7.2 or 6.8.0 except for flowable-task-service works fine.
Updating flowable-task-service to 6.7.2, this method throws an error:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00904: “RES”.“SCOPE_TYPE_”: invalid identifier

The error may exist in org/flowable/task/service/db/mapping/entity/Task.xml

The error may involve org.flowable.task.service.impl.persistence.entity.TaskEntityImpl.selectTasksWithRelatedEntitiesByQueryCriteria-Inline

The error occurred while setting parameters

I checked the source and I see scopeType was added to Task.xml on line 367, but I’m not sure how to fix this error.

using latest tomcat 9 with oracle 12.1.0.1

Hey @edcray,

This is something that we do not suggest doing. You have to use the same versions for all of the Flowable artifacts.

The error you are getting seems strange. Are you sure that you have applied all of the DB Changes for Flowable?

Cheers,
Filip

Obviously I want to use the latest version 6 for every artifact but that’s not possible.
Version 7 is not an option at this time as we are stuck using Java 8.
We have multiple Flowable DB schemas with an xml file for each.
I have run every Oracle script for every version for every schema from flowable-engine/distro/sql/upgrade/all at main · flowable/flowable-engine · GitHub
I verified the RES table is valid and the SCOPE_TYPE_ column is valid in every schema.
I checked source code changes for flowable-task-service.jar.
The error message I get trying to upgrade this one artifact from 6.7.1 to 6.7.2 makes no sense.

This is very much possible, all of our customers use it in such a way. If you use different versions things might not work as expected. It is not meant to be used with different versions.

I would change whether the column is in upper case or lower case for you. However, on Oracle this shouldn’t have a problem. It is strange that you are seeing this, since we have tests for this that run on Oracle and are green.

Cheers,
Filip

Obviously the latest version 6 for all artifacts is not possible on our system because it starts up without error on 6.7.1 but throws errors with flowable-task-service from 6.7.2 or 6.8.0. I expect it isn’t meant to be mismatched but it doesn’t work otherwise. If the newer version adds a feature we’re not using, the mismatch may be irrelevant.

All columns appear to be upper case in the database as they are in the scripts. The column in the code is in the flowable-task-service.jar, so I’m not sure what you’re asking me to change. I literally change nothing but that jar and it breaks. How do I run the tests for that? They’re apparently incomplete.

So, after much tedious testing, we figured out the problem based on the error message with didn’t really link to the problem.
The error was saying a column (SCOPE_TYPE_) was invalid on the VAR (ACT_RU_VARIABLE) table.
The script (flowable-engine/flowable.oracle.upgradestep.6.1.2.to.6.2.0.all.sql at main · flowable/flowable-engine · GitHub) added SCOPE_TYPE_ to ACT_RU_VARIABLE, but none of the scripts in that folder ever updated the views.
The SQL it spit out from the mybatis referenced tables but somehow the problem was the views.
We ran the create or replace view on V_ACT_RU_VARIABLE as select * from the ACT_RU_VARIABLE, and I was able to start the application without error.
Best guess is there’s view updates buried somewhere in the Flowable API based on the config flag “databaseSchemaUpdate” with value=“true”. We have value=“none”. I tried value=“true” and it spit out just a lot of errors on startup, from “insufficient privileges” to “table or view does not exist”.
So unless I’m missing a script somewhere, I just need to manually write a script that updates all views.