-
Enhancement
-
Resolution: Done
-
Blocker
-
6.1.0
-
Release Notes
-
-
-
-
-
CR1
Description of problem:
Migration from 6.x to 6.y would include database schema changes. Schema update is processed by Hibernate. But if a column is newly added to a table, the value will be 'null' when migrated.
Community installer includes upgrade-scripts to populate such columns.
https://github.com/droolsjbpm/jbpm/tree/master/jbpm-installer/db/upgrade-scripts
I think we need to include the scripts in our distribution (e.g. supplementary-tools) and let them involved in our QA migration test.
Steps to Reproduce:
1. Start a process instance with PerProcessInstanceRuntimeManager in BPMS 6.0.3. The process instance waits at a User Task.
2. Migrate the database to BPMS 6.1.0. (hibernate.hbm2ddl.auto=update)
3. Look at ContextMappingInfo table
4. Resume the process instance in BPMS 6.1.0
Actual results:
ContextMappingInfo.OWNER_ID is NULL.
mysql> select * from ContextMappingInfo;
-----------------------------------------------
mappingId | CONTEXT_ID | KSESSION_ID | OPTLOCK | OWNER_ID |
-----------------------------------------------
1 | 1 | 2 | 0 | NULL |
-----------------------------------------------
Get SessionNotFoundException when calling RuntimeEngine.getKieSession()
2015-06-22 09:56:25,738 ERROR [http-8080-7]
org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 1
at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager$PerProcessInstanceInitializer.initKieSession(PerProcessInstanceRuntimeManager.java:442)
at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:70)
Expected results:
A user run the update script after the step 2. Now OWNER_ID (and other columns) are populated.
RuntimeEngine.getKieSession() doesn't throw an Exception.
- blocks
-
RHBPMS-780 DB upgrade script "jbpm-6.1-to-6.2.sql" does not contain alter statement for ContextMappingInfo.owner_id column
- Verified
-
RHBPMS-1955 Postgres upgrade script (bpms-6.0-to-6.1.sql): null value in column "id" violates not-null constraint
- Verified
-
RHBPMS-1446 SQL upgrade scripts - changing SessionInfo primary key column data type fails
- Verified