[jbpm-commits] JBoss JBPM SVN: r5715 - in jbpm4/trunk/modules/pvm/src/main: resources and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Oct 7 18:48:36 EDT 2009


Author: koen.aers at jboss.com
Date: 2009-10-07 18:48:36 -0400 (Wed, 07 Oct 2009)
New Revision: 5715

Modified:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceMigrationImpl.java
   jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml
Log:
keep track of the definition id instead of the version while migrating

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceMigrationImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceMigrationImpl.java	2009-10-07 20:16:32 UTC (rev 5714)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceMigrationImpl.java	2009-10-07 22:48:36 UTC (rev 5715)
@@ -29,21 +29,21 @@
 
   private static final long serialVersionUID = 1L;
   
-  protected int oldVersion;
-  protected int newVersion;
+  protected String oldProcessDefinitionId;
+  protected String newProcessDefinitionId;
 
   public HistoryProcessInstanceMigrationImpl() {
   }
   
-  public HistoryProcessInstanceMigrationImpl(int oldVersion, int newVersion) {
+  public HistoryProcessInstanceMigrationImpl(String oldProcessDefinitionId, String newProcessDefinitionId) {
     // superclass has dummy string constructor to differentiate from  
     // the default constructor which is used by hibernate 
     super(null);
-    this.oldVersion = oldVersion;
-    this.newVersion = newVersion;
+    this.oldProcessDefinitionId = oldProcessDefinitionId;
+    this.newProcessDefinitionId = newProcessDefinitionId;
   }
   
   public String toString() {
-    return "migrated process instance " + this.historyProcessInstance.getProcessInstanceId() + " from " + oldVersion + " to " + newVersion;
+    return "migrated process instance " + this.historyProcessInstance.getProcessInstanceId() + " from " + oldProcessDefinitionId + " to " + newProcessDefinitionId;
   }
 }

Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml	2009-10-07 20:16:32 UTC (rev 5714)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.history.hbm.xml	2009-10-07 22:48:36 UTC (rev 5715)
@@ -217,8 +217,8 @@
     </subclass>
 
     <subclass name="HistoryProcessInstanceMigrationImpl" discriminator-value="instance-migration">
-      <property name="oldVersion" column="OLD_INT_" />
-      <property name="newVersion" column="NEW_INT_" />
+      <property name="oldProcessDefinitionId" column="OLD_STR_" />
+      <property name="newProcessDefinitionId" column="NEW_STR_" />
     </subclass>
     
     <subclass name="HistoryPriorityUpdateImpl" discriminator-value="priority-update">



More information about the jbpm-commits mailing list