Bug 1238295 - [ENG] (6.1.z) When migrate BPMS from 6.0.1 to 6.1.0 , existing deployments are not transfered
Summary: [ENG] (6.1.z) When migrate BPMS from 6.0.1 to 6.1.0 , existing deployments ar...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: CR1
: 6.1.0
Assignee: Alessandro Lazarotti
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On: 1231002
Blocks: 1230825
TreeView+ depends on / blocked
 
Reported: 2015-07-01 14:28 UTC by Alessandro Lazarotti
Modified: 2020-03-27 20:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1231002
Environment:
Last Closed: 2020-03-27 20:02:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alessandro Lazarotti 2015-07-01 14:28:06 UTC
+++ This bug was initially created as a clone of Bug #1231002 +++

Description of problem:

when upgrade to BPMS 6.1 GA ,our old process was gone.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. use old server backup  data, include 
   database
   maven repo(kie.maven.settings.custom): .m2
   bpms repo (org.uberfire.metadata.index.dir) :repo
   git server data(org.uberfire.nio.git.dir).niogit
   and .index 
2. start server
3. run sql script 
  update Task t set name = (select shorttext from I18NText where task_names_id = t.id);
update Task t set subject = (select shorttext from I18NText where task_subjects_id = t.id);
update Task t set description = (select shorttext from I18NText where task_descriptions_id = t.id);
INSERT INTO AuditTaskImpl (activationTime, actualOwner, createdBy, createdOn, deploymentId, description, dueDate, name, parentId, priority, processId, processInstanceId, processSessionId, status, taskId)
SELECT activationTime, actualOwner_id, createdBy_id, createdOn, deploymentId, description, expirationTime, name, parentId, priority,processId, processInstanceId, processSessionId, status, id 
FROM Task;


Actual results:
i find tables DeploymentStore just have org.guvnor:guvnor-asset-mgmt-project:6.2.0.Final-redhat-4 , do not have any old process deployment information and i find master branch of system.git don't have any old process deployment information.
If i restart bpms6.1 server , i can not get any process definition of old process and  process instance of old process and deployment unit of old process. 

Expected results:
All old process can be work.

Additional info:
Last month , i get successful migration for BPMS 6.0.1 to  BPMS 6.1.ER4 .
I debug this issue , i find some code change from 6.1.CR4 to 6.1 GA in here
https://github.com/droolsjbpm/jbpm/blob/master/jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/store/DeploymentStore.java#L152.
In 6.1.CR4 , don't have this code.
Our old process don't have Attributes.so there will throw runtimeexception.

Please refer to whole log  in the attachment.

--- Additional comment from JBoss Product and Program Management on 2015-06-11 21:50:07 EDT ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Maciej Swiderski on 2015-06-30 04:17:23 EDT ---

this has been fixed by merging pull request and is available on master

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/977e1ad1937cb4e0d5462a764c0b15d76fa19215

in case in shall be back ported to 6.2.x please assign it back to me

Comment 2 Maciej Swiderski 2015-07-01 15:03:44 UTC
backported to 6.2.x

jbpm
6.2.x:
https://github.com/droolsjbpm/jbpm/commit/2d4c3e1cdddb16488d74c4fcbc241250722eacf1

Comment 3 Ivo Bek 2015-07-09 09:30:22 UTC
Verified in BPMS 6.1.2.CR1

Reproduced in BPMSuite 6.1.0

11:17:00,755 ERROR [org.jbpm.kie.services.impl.store.DeploymentSynchronizer] (MSC service thread 1-2) Unable to store deployment org.jboss:integration:2.0.0-SNAPSHOT [strategy=SINGLETON] in deployment store due to null

select * from DeploymentStore;
 id | attributes |                       deployment_id                       | deploymentunit | state |       updatedate        
----+------------+-----------------------------------------------------------+----------------+-------+-------------------------
  1 | sync=false | org.guvnor:guvnor-asset-mgmt-project:6.2.0.Final-redhat-4 | 18449          |     1 | 2015-07-09 11:16:57.384
(1 row)


Fixed in BPMSuite 6.1.2

11:28:13,639 INFO  [org.jbpm.kie.services.impl.store.DeploymentSynchronizer] (MSC service thread 1-6) Deployment unit org.jboss:integration:2.0.0-SNAPSHOT stored successfully

select * from DeploymentStore;
 id | attributes |                       deployment_id                       | deploymentunit | state |       updatedate        
----+------------+-----------------------------------------------------------+----------------+-------+-------------------------
  1 | sync=false | org.guvnor:guvnor-asset-mgmt-project:6.2.0.Final-redhat-4 | 18449          |     1 | 2015-07-09 11:16:57.384
  2 |            | org.jboss:integration:2.0.0-SNAPSHOT                      | 18452          |     1 | 2015-07-09 11:28:13.626
  3 | sync=false | org.guvnor:guvnor-asset-mgmt-project:6.2.0.Final-redhat-7 | 18455          |     1 | 2015-07-09 11:28:15.96
(3 rows)


Note You need to log in before you can comment on or make changes to this bug.