[jbpm-commits] JBoss JBPM SVN: r5767 - in jbpm4/trunk/modules: db/src/main/java/org/jbpm/db and 11 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Oct 21 12:26:54 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-10-21 12:26:54 -0400 (Wed, 21 Oct 2009)
New Revision: 5767
Added:
jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Create.java
jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/HibernateOperation.java
jbpm4/trunk/modules/distro/src/main/files/install/src/db/
jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/
jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.hsqldb.create.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.mysql.create.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.oracle.create.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.postgresql.create.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/
jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.hsqldb.drop.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.mysql.drop.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.oracle.drop.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.postgresql.drop.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql
Removed:
jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/CreateProperties.java
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql
jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql
Modified:
jbpm4/trunk/modules/db/pom.xml
jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/repository/JpdlDeployer.java
Log:
JBPM-2509 database upgrade work. linked install script with create and upgrade implementations.
Modified: jbpm4/trunk/modules/db/pom.xml
===================================================================
--- jbpm4/trunk/modules/db/pom.xml 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/pom.xml 2009-10-21 16:26:54 UTC (rev 5767)
@@ -115,7 +115,7 @@
</dependency>
</dependencies>
- <build>
+ <!-- build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -170,7 +170,8 @@
</systemProperties>
</configuration>
</plugin>
+
</plugins>
- </build>
+ </build -->
</project>
\ No newline at end of file
Copied: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Create.java (from rev 5765, jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/CreateProperties.java)
===================================================================
--- jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Create.java (rev 0)
+++ jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Create.java 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.db;
+
+import org.hibernate.classic.Session;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.id.PropertyImpl;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class Create extends HibernateOperation {
+
+ public static void main(String[] args) {
+ Create createOperation = new Create();
+ createOperation.setArgs(args);
+ executeInTransaction(createOperation);
+ }
+
+ public void execute(Session session) {
+ executeSqlUpdate("create/jbpm."+database+".create.sql", session);
+ PropertyImpl.createProperties(session);
+ }
+
+ public String toString() {
+ return "jBPM "+JpdlParser.CURRENT_VERSION_JBPM+" DB Create";
+ }
+}
Property changes on: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Create.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/CreateProperties.java
===================================================================
--- jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/CreateProperties.java 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/CreateProperties.java 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.db;
-
-import org.jbpm.api.ProcessEngine;
-import org.jbpm.db.internal.upgrade.CreatePropertiesCmd;
-import org.jbpm.pvm.internal.cfg.ProcessEngineImpl;
-
-/**
- * @author Alejandro Guizar
- */
-public class CreateProperties {
-
- public static void main(String[] args) {
- ProcessEngine processEngine = new ProcessEngineImpl()
- .skipDbCheck()
- .buildProcessEngine();
-
- // create properties
- processEngine.execute(new CreatePropertiesCmd());
- }
-}
Added: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/HibernateOperation.java
===================================================================
--- jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/HibernateOperation.java (rev 0)
+++ jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/HibernateOperation.java 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.db;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.classic.Session;
+import org.jbpm.api.JbpmException;
+import org.jbpm.internal.log.Jdk14LogFactory;
+import org.jbpm.pvm.internal.util.IoUtil;
+
+/**
+ * @author Tom Baeyens
+ */
+public abstract class HibernateOperation {
+
+ static{
+ Jdk14LogFactory.initializeJdk14Logging();
+ }
+
+ String database;
+ String delimiter;
+
+ public abstract void execute(Session session);
+
+ public void setArgs(String[] args) {
+ if (args==null || args.length==0) {
+ log("Syntax: java -cp ... "+getClass().getName()+" database [delimiter]");
+ log("where database is one of {oracle, postgresql, mysql, hsqldb}");
+ log("and delimiter is the db sql delimiter. default delimiter is ;");
+ return;
+ }
+
+ database = args[0];
+
+ delimiter = ";";
+ if (args.length>1) {
+ delimiter = args[1];
+ }
+ }
+
+ public static void executeInTransaction(HibernateOperation hibernateOperation) {
+ log("Starting "+hibernateOperation);
+ log(" database : "+hibernateOperation.database);
+ log(" delimiter: "+hibernateOperation.delimiter);
+
+ SessionFactory sessionFactory = new Configuration()
+ .configure("jbpm.hibernate.cfg.xml")
+ .buildSessionFactory();
+
+ Session session = sessionFactory.openSession();
+ Transaction transaction = null;
+ try {
+ transaction = session.beginTransaction();
+
+ hibernateOperation.execute(session);
+
+ transaction.commit();
+
+ log(hibernateOperation+" completed successfully.");
+
+ } catch (Exception e) {
+ if (transaction!=null){
+ transaction.rollback();
+ }
+ log("ERROR: "+hibernateOperation+" FAILED:");
+ e.printStackTrace();
+
+ } finally {
+ session.close();
+ }
+ }
+
+ public void executeSqlUpdate(String resource, Session session) {
+ InputStream stream = Upgrade.class.getClassLoader().getResourceAsStream(resource);
+ if (stream == null) {
+ throw new JbpmException("resource "+resource+" does not exist");
+ }
+
+ byte[] bytes = IoUtil.readBytes(stream);
+ String fileContents = new String(bytes);
+ List<String> commands = extractCommands(fileContents);
+
+ log("--- Executing DB Commands -------------------------");
+ for (String command: commands) {
+ log(command);
+ try {
+ int result = session.createSQLQuery(command).executeUpdate();
+ log("--- Result: "+result+" --------------------------");
+ } catch (Exception e) {
+ e.printStackTrace();
+ log("-----------------------------------------------");
+ }
+ }
+ }
+
+ public List<String> extractCommands(String fileContents) {
+ List<String> commands = new ArrayList<String>();
+ int i = 0;
+ while (i<fileContents.length()) {
+ int j = fileContents.indexOf(delimiter, i);
+ if (j==-1) {
+ j = fileContents.length();
+ } else {
+ j += delimiter.length();
+ }
+ String command = fileContents.substring(i, j).trim();
+ if (command.length()>0) {
+ commands.add(command);
+ }
+ i = j;
+ }
+ return commands;
+ }
+
+ public static void log(String msg) {
+ System.out.println(msg);
+ }
+}
Property changes on: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/HibernateOperation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java
===================================================================
--- jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java 2009-10-21 16:26:54 UTC (rev 5767)
@@ -21,34 +21,83 @@
*/
package org.jbpm.db;
-import org.jbpm.api.ProcessEngine;
-import org.jbpm.db.internal.upgrade.AddLangIdCmd;
-import org.jbpm.db.internal.upgrade.GetJbpmVersionCmd;
+import java.util.List;
+
+import org.hibernate.classic.Session;
+import org.jbpm.api.JbpmException;
import org.jbpm.db.internal.upgrade.JbpmVersion;
-import org.jbpm.db.internal.upgrade.UpdateSchemaCmd;
-import org.jbpm.db.internal.upgrade.UpgradePropertiesCmd;
-import org.jbpm.pvm.internal.cfg.ProcessEngineImpl;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.id.PropertyImpl;
+import org.jbpm.pvm.internal.repository.DeploymentImpl;
+import org.jbpm.pvm.internal.repository.DeploymentProperty;
/**
* @author Alejandro Guizar
*/
-public class Upgrade {
+public class Upgrade extends HibernateOperation {
public static void main(String[] args) {
- ProcessEngine processEngine = new ProcessEngineImpl()
- .skipDbCheck()
- .buildProcessEngine();
+ Upgrade upgradeOperation = new Upgrade();
+ upgradeOperation.setArgs(args);
+ HibernateOperation.executeInTransaction(upgradeOperation);
+ }
+
+ public String toString() {
+ return "DB Upgrade to jBPM "+JpdlParser.CURRENT_VERSION_JBPM;
+ }
+
+ public void execute(Session session) {
+ JbpmVersion jbpmVersion = getJbpmVersion(session);
+
+ if (jbpmVersion==JbpmVersion.V_4_2) {
+ throw new JbpmException("jBPM schema is already up to date");
+ }
+
+ if (jbpmVersion.isEarlier(JbpmVersion.V_4_1)) {
+ upgrade40To41(session);
+ }
+
+ if (jbpmVersion.isEarlier(JbpmVersion.V_4_2)) {
+ upgrade41To42(session);
+ }
+ }
- // update database schema
- processEngine.execute(new UpdateSchemaCmd());
+ private void upgrade40To41(Session session) {
+ executeSqlUpdate("upgrade-4.0-to-4.1/jbpm."+database+".upgrade.sql", session);
+ }
- // check whether database version predates engine version
- JbpmVersion currentVersion = processEngine.execute(new GetJbpmVersionCmd());
- if (currentVersion.isEarlier(JbpmVersion.V_4_2)) {
- // add property "langid" to each deployed process
- processEngine.execute(new AddLangIdCmd());
- // upgrade properties
- processEngine.execute(new UpgradePropertiesCmd());
+ private void upgrade41To42(Session session) {
+ executeSqlUpdate("upgrade-4.1-to-4.2/jbpm."+database+".upgrade.sql", session);
+ addLangId(session);
+ PropertyImpl.upgradeProperties(session);
+ }
+
+ private void addLangId(Session session) {
+ // find deployments without a langid property
+ List<DeploymentProperty> deploymentProperties = session.createQuery(
+ "from "+DeploymentProperty.class.getName()+ " deploymentProperty " +
+ "where deploymentProperty.key = '"+DeploymentImpl.KEY_PROCESS_DEFINITION_ID+"'"
+ ).list();
+
+ for (DeploymentProperty deploymentProperty: deploymentProperties) {
+ String objectName = deploymentProperty.getObjectName();
+ deploymentProperty.getDeployment().setProcessLanguageId(objectName, "jpdl-4.0");
}
}
+
+ private static JbpmVersion getJbpmVersion(Session session) {
+ if (!PropertyImpl.propertiesTableExists(session)) {
+ return JbpmVersion.V_4_0;
+ }
+
+ String dbVersion = PropertyImpl.getDbVersion(session);
+ if (dbVersion==null) {
+ // property table exists, but no db version property is present
+ // schema must have been updated moments ago
+ return JbpmVersion.V_4_0;
+ }
+
+ return JbpmVersion.getJbpmVersion(dbVersion);
+ }
+
}
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,3 +0,0 @@
-
- alter table JBPM4_VARIABLE
- add column CLASSNAME_ varchar(255);
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,3 +0,0 @@
-
- alter table JBPM4_VARIABLE
- add column CLASSNAME_ varchar(255);
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,3 +0,0 @@
-
- alter table JBPM4_VARIABLE
- add CLASSNAME_ varchar2(255 char);
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,3 +0,0 @@
-
- alter table JBPM4_VARIABLE
- add column CLASSNAME_ varchar(255);
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,7 +0,0 @@
-
- create table JBPM4_PROPERTY (
- KEY_ varchar(255) not null,
- VERSION_ integer not null,
- VALUE_ varchar(255),
- primary key (KEY_)
- );
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,7 +0,0 @@
-
- create table JBPM4_PROPERTY (
- KEY_ varchar(255) not null,
- VERSION_ integer not null,
- VALUE_ varchar(255),
- primary key (KEY_)
- ) type=InnoDB;
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,7 +0,0 @@
-
- create table JBPM4_PROPERTY (
- KEY_ varchar2(255 char) not null,
- VERSION_ number(10,0) not null,
- VALUE_ varchar2(255 char),
- primary key (KEY_)
- );
Deleted: jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -1,7 +0,0 @@
-
- create table JBPM4_PROPERTY (
- KEY_ varchar(255) not null,
- VERSION_ int4 not null,
- VALUE_ varchar(255),
- primary key (KEY_)
- );
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-10-21 16:26:54 UTC (rev 5767)
@@ -156,10 +156,15 @@
<artifactId>ant</artifactId>
</dependency>
<dependency>
- <groupId>izpack</groupId>
- <artifactId>standalone-compiler</artifactId>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+
<!-- Database Drivers -->
<dependency>
<groupId>mysql</groupId>
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-10-21 16:26:54 UTC (rev 5767)
@@ -582,20 +582,22 @@
<!-- ### CREATE JBPM SCHEMA ############################################# -->
<target name="create.jbpm.schema"
+ depends="create.cfg"
description="creates the jbpm tables in the database">
- <echo message="creating jbpm schema in db ${jdbc.url}" />
- <sql driver="${jdbc.driver}"
- url="${jdbc.url}"
- userid="${jdbc.username}"
- password="${jdbc.password}"
- onerror="continue"
- src="${jbpm.home}/install/src/db/jbpm.${database}.create.sql">
+ <echo message="creating jbpm schema..." />
+ <java classname="org.jbpm.db.Create">
+ <arg line="${database}" />
<classpath>
+ <pathelement location="${jbpm.home}/install/generated/cfg" />
+ <pathelement location="${jbpm.home}/install/src/db" />
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar"/>
+ </fileset>
<fileset dir="${jbpm.home}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
- </sql>
+ </java>
</target>
<!-- ### UPGRADE JBPM SCHEMA ############################################# -->
@@ -604,8 +606,10 @@
description="Upgrades the jBPM tables in the database to the current version">
<echo message="upgrading jbpm schema..." />
<java classname="org.jbpm.db.Upgrade">
+ <arg line="${database}" />
<classpath>
<pathelement location="${jbpm.home}/install/generated/cfg" />
+ <pathelement location="${jbpm.home}/install/src/db" />
<fileset dir="${jbpm.home}">
<include name="jbpm.jar"/>
</fileset>
@@ -625,7 +629,7 @@
userid="${jdbc.username}"
password="${jdbc.password}"
onerror="continue"
- src="${jbpm.home}/install/src/db/jbpm.${database}.drop.sql">
+ src="${jbpm.home}/install/src/db/drop/jbpm.${database}.drop.sql">
<classpath>
<fileset dir="${jbpm.home}/lib">
<include name="*.jar"/>
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.hsqldb.create.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.hsqldb.create.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.hsqldb.create.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,467 @@
+
+ create table JBPM4_DEPLOYMENT (
+ DBID_ bigint not null,
+ NAME_ longvarchar,
+ TIMESTAMP_ bigint,
+ STATE_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_DEPLOYPROP (
+ DBID_ bigint not null,
+ DEPLOYMENT_ bigint,
+ OBJNAME_ varchar(255),
+ KEY_ varchar(255),
+ STRINGVAL_ varchar(255),
+ LONGVAL_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_EXECUTION (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ ACTIVITYNAME_ varchar(255),
+ PROCDEFID_ varchar(255),
+ HASVARS_ bit,
+ NAME_ varchar(255),
+ KEY_ varchar(255),
+ ID_ varchar(255),
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ PRIORITY_ integer,
+ HISACTINST_ bigint,
+ PARENT_ bigint,
+ INSTANCE_ bigint,
+ SUPEREXEC_ bigint,
+ SUBPROCINST_ bigint,
+ PARENT_IDX_ integer,
+ primary key (DBID_),
+ unique (ID_)
+ );
+
+ create table JBPM4_HIST_ACTINST (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ HPROCI_ bigint,
+ TYPE_ varchar(255),
+ EXECUTION_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ bigint,
+ TRANSITION_ varchar(255),
+ NEXTIDX_ integer,
+ HTASK_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_DETAIL (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ USERID_ varchar(255),
+ TIME_ timestamp,
+ HPROCI_ bigint,
+ HPROCIIDX_ integer,
+ HACTI_ bigint,
+ HACTIIDX_ integer,
+ HTASK_ bigint,
+ HTASKIDX_ integer,
+ HVAR_ bigint,
+ HVARIDX_ integer,
+ MESSAGE_ longvarchar,
+ OLD_STR_ varchar(255),
+ NEW_STR_ varchar(255),
+ OLD_INT_ integer,
+ NEW_INT_ integer,
+ OLD_TIME_ timestamp,
+ NEW_TIME_ timestamp,
+ PARENT_ bigint,
+ PARENT_IDX_ integer,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_PROCINST (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ PROCDEFID_ varchar(255),
+ KEY_ varchar(255),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ bigint,
+ STATE_ varchar(255),
+ ENDACTIVITY_ varchar(255),
+ NEXTIDX_ integer,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_TASK (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ EXECUTION_ varchar(255),
+ OUTCOME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ PRIORITY_ integer,
+ STATE_ varchar(255),
+ CREATE_ timestamp,
+ END_ timestamp,
+ DURATION_ bigint,
+ NEXTIDX_ integer,
+ SUPERTASK_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_VAR (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ PROCINSTID_ varchar(255),
+ EXECUTIONID_ varchar(255),
+ VARNAME_ varchar(255),
+ VALUE_ varchar(255),
+ HPROCI_ bigint,
+ HTASK_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_GROUP (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ NAME_ varchar(255),
+ TYPE_ varchar(255),
+ PARENT_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_MEMBERSHIP (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ USER_ bigint,
+ GROUP_ bigint,
+ NAME_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_USER (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ PASSWORD_ varchar(255),
+ GIVENNAME_ varchar(255),
+ FAMILYNAME_ varchar(255),
+ BUSINESSEMAIL_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_JOB (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ DUEDATE_ timestamp,
+ STATE_ varchar(255),
+ ISEXCLUSIVE_ bit,
+ LOCKOWNER_ varchar(255),
+ LOCKEXPTIME_ timestamp,
+ EXCEPTION_ longvarchar,
+ RETRIES_ integer,
+ PROCESSINSTANCE_ bigint,
+ EXECUTION_ bigint,
+ CFG_ bigint,
+ SIGNAL_ varchar(255),
+ EVENT_ varchar(255),
+ REPEAT_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_LOB (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ BLOB_VALUE_ longvarbinary,
+ DEPLOYMENT_ bigint,
+ NAME_ longvarchar,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PARTICIPATION (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ GROUPID_ varchar(255),
+ USERID_ varchar(255),
+ TYPE_ varchar(255),
+ TASK_ bigint,
+ SWIMLANE_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+ );
+
+ create table JBPM4_SWIMLANE (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ NAME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ EXECUTION_ bigint,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_TASK (
+ DBID_ bigint not null,
+ CLASS_ char(1) not null,
+ DBVERSION_ integer not null,
+ NAME_ varchar(255),
+ DESCR_ longvarchar,
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ FORM_ varchar(255),
+ PRIORITY_ integer,
+ CREATE_ timestamp,
+ DUEDATE_ timestamp,
+ PROGRESS_ integer,
+ SIGNALLING_ bit,
+ EXECUTION_ID_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ HASVARS_ bit,
+ SUPERTASK_ bigint,
+ EXECUTION_ bigint,
+ PROCINST_ bigint,
+ SWIMLANE_ bigint,
+ TASKDEFNAME_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_VARIABLE (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ KEY_ varchar(255),
+ CONVERTER_ varchar(255),
+ HIST_ bit,
+ EXECUTION_ bigint,
+ TASK_ bigint,
+ LOB_ bigint,
+ DATE_VALUE_ timestamp,
+ DOUBLE_VALUE_ double,
+ CLASSNAME_ varchar(255),
+ LONG_VALUE_ bigint,
+ STRING_VALUE_ varchar(255),
+ TEXT_VALUE_ longvarchar,
+ EXESYS_ bigint,
+ primary key (DBID_)
+ );
+
+ create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);
+
+ alter table JBPM4_DEPLOYPROP
+ add constraint FK_DEPLPROP_DEPL
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_EXEC_SUPEREXEC on JBPM4_EXECUTION (SUPEREXEC_);
+
+ create index IDX_EXEC_INSTANCE on JBPM4_EXECUTION (INSTANCE_);
+
+ create index IDX_EXEC_SUBPI on JBPM4_EXECUTION (SUBPROCINST_);
+
+ create index IDX_EXEC_PARENT on JBPM4_EXECUTION (PARENT_);
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_PARENT
+ foreign key (PARENT_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUBPI
+ foreign key (SUBPROCINST_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_INSTANCE
+ foreign key (INSTANCE_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUPEREXEC
+ foreign key (SUPEREXEC_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_HACTI_HPROCI on JBPM4_HIST_ACTINST (HPROCI_);
+
+ create index IDX_HTI_HTASK on JBPM4_HIST_ACTINST (HTASK_);
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HACTI_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HTI_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HDET_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDET_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDETAIL_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDETAIL_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDETAIL_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ create index IDX_HDETAIL_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDET_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDET_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HACTI
+ foreign key (HACTI_)
+ references JBPM4_HIST_ACTINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HVAR
+ foreign key (HVAR_)
+ references JBPM4_HIST_VAR;
+
+ alter table JBPM4_HIST_TASK
+ add constraint FK_HSUPERT_SUB
+ foreign key (SUPERTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HVAR_HPROCI on JBPM4_HIST_VAR (HPROCI_);
+
+ create index IDX_HVAR_HTASK on JBPM4_HIST_VAR (HTASK_);
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);
+
+ alter table JBPM4_ID_GROUP
+ add constraint FK_GROUP_PARENT
+ foreign key (PARENT_)
+ references JBPM4_ID_GROUP;
+
+ create index IDX_MEM_USER on JBPM4_ID_MEMBERSHIP (USER_);
+
+ create index IDX_MEM_GROUP on JBPM4_ID_MEMBERSHIP (GROUP_);
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_GROUP
+ foreign key (GROUP_)
+ references JBPM4_ID_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_USER
+ foreign key (USER_)
+ references JBPM4_ID_USER;
+
+ create index IDX_JOBRETRIES on JBPM4_JOB (RETRIES_);
+
+ create index IDX_JOB_CFG on JBPM4_JOB (CFG_);
+
+ create index IDX_JOB_PRINST on JBPM4_JOB (PROCESSINSTANCE_);
+
+ create index IDX_JOB_EXE on JBPM4_JOB (EXECUTION_);
+
+ create index IDX_JOBLOCKEXP on JBPM4_JOB (LOCKEXPTIME_);
+
+ create index IDX_JOBDUEDATE on JBPM4_JOB (DUEDATE_);
+
+ alter table JBPM4_JOB
+ add constraint FK_JOB_CFG
+ foreign key (CFG_)
+ references JBPM4_LOB;
+
+ create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);
+
+ alter table JBPM4_LOB
+ add constraint FK_LOB_DEPLOYMENT
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_SWIMLANE
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
+
+ create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);
+
+ alter table JBPM4_SWIMLANE
+ add constraint FK_SWIMLANE_EXEC
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SWIML
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SUPERTASK
+ foreign key (SUPERTASK_)
+ references JBPM4_TASK;
+
+ create index IDX_VAR_EXESYS on JBPM4_VARIABLE (EXESYS_);
+
+ create index IDX_VAR_TASK on JBPM4_VARIABLE (TASK_);
+
+ create index IDX_VAR_EXECUTION on JBPM4_VARIABLE (EXECUTION_);
+
+ create index IDX_VAR_LOB on JBPM4_VARIABLE (LOB_);
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_LOB
+ foreign key (LOB_)
+ references JBPM4_LOB;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXECUTION
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXESYS
+ foreign key (EXESYS_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.mysql.create.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.mysql.create.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.mysql.create.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,494 @@
+
+ create table JBPM4_DEPLOYMENT (
+ DBID_ bigint not null,
+ NAME_ longtext,
+ TIMESTAMP_ bigint,
+ STATE_ varchar(255),
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_DEPLOYPROP (
+ DBID_ bigint not null,
+ DEPLOYMENT_ bigint,
+ OBJNAME_ varchar(255),
+ KEY_ varchar(255),
+ STRINGVAL_ varchar(255),
+ LONGVAL_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_EXECUTION (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ ACTIVITYNAME_ varchar(255),
+ PROCDEFID_ varchar(255),
+ HASVARS_ bit,
+ NAME_ varchar(255),
+ KEY_ varchar(255),
+ ID_ varchar(255) unique,
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ PRIORITY_ integer,
+ HISACTINST_ bigint,
+ PARENT_ bigint,
+ INSTANCE_ bigint,
+ SUPEREXEC_ bigint,
+ SUBPROCINST_ bigint,
+ PARENT_IDX_ integer,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_HIST_ACTINST (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ HPROCI_ bigint,
+ TYPE_ varchar(255),
+ EXECUTION_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ START_ datetime,
+ END_ datetime,
+ DURATION_ bigint,
+ TRANSITION_ varchar(255),
+ NEXTIDX_ integer,
+ HTASK_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_HIST_DETAIL (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ USERID_ varchar(255),
+ TIME_ datetime,
+ HPROCI_ bigint,
+ HPROCIIDX_ integer,
+ HACTI_ bigint,
+ HACTIIDX_ integer,
+ HTASK_ bigint,
+ HTASKIDX_ integer,
+ HVAR_ bigint,
+ HVARIDX_ integer,
+ MESSAGE_ longtext,
+ OLD_STR_ varchar(255),
+ NEW_STR_ varchar(255),
+ OLD_INT_ integer,
+ NEW_INT_ integer,
+ OLD_TIME_ datetime,
+ NEW_TIME_ datetime,
+ PARENT_ bigint,
+ PARENT_IDX_ integer,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_HIST_PROCINST (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ PROCDEFID_ varchar(255),
+ KEY_ varchar(255),
+ START_ datetime,
+ END_ datetime,
+ DURATION_ bigint,
+ STATE_ varchar(255),
+ ENDACTIVITY_ varchar(255),
+ NEXTIDX_ integer,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_HIST_TASK (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ EXECUTION_ varchar(255),
+ OUTCOME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ PRIORITY_ integer,
+ STATE_ varchar(255),
+ CREATE_ datetime,
+ END_ datetime,
+ DURATION_ bigint,
+ NEXTIDX_ integer,
+ SUPERTASK_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_HIST_VAR (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ PROCINSTID_ varchar(255),
+ EXECUTIONID_ varchar(255),
+ VARNAME_ varchar(255),
+ VALUE_ varchar(255),
+ HPROCI_ bigint,
+ HTASK_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_ID_GROUP (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ NAME_ varchar(255),
+ TYPE_ varchar(255),
+ PARENT_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_ID_MEMBERSHIP (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ USER_ bigint,
+ GROUP_ bigint,
+ NAME_ varchar(255),
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_ID_USER (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ ID_ varchar(255),
+ PASSWORD_ varchar(255),
+ GIVENNAME_ varchar(255),
+ FAMILYNAME_ varchar(255),
+ BUSINESSEMAIL_ varchar(255),
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_JOB (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ DUEDATE_ datetime,
+ STATE_ varchar(255),
+ ISEXCLUSIVE_ bit,
+ LOCKOWNER_ varchar(255),
+ LOCKEXPTIME_ datetime,
+ EXCEPTION_ longtext,
+ RETRIES_ integer,
+ PROCESSINSTANCE_ bigint,
+ EXECUTION_ bigint,
+ CFG_ bigint,
+ SIGNAL_ varchar(255),
+ EVENT_ varchar(255),
+ REPEAT_ varchar(255),
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_LOB (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ BLOB_VALUE_ longblob,
+ DEPLOYMENT_ bigint,
+ NAME_ longtext,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_PARTICIPATION (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ GROUPID_ varchar(255),
+ USERID_ varchar(255),
+ TYPE_ varchar(255),
+ TASK_ bigint,
+ SWIMLANE_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+ ) type=InnoDB;
+
+ create table JBPM4_SWIMLANE (
+ DBID_ bigint not null,
+ DBVERSION_ integer not null,
+ NAME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ EXECUTION_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_TASK (
+ DBID_ bigint not null,
+ CLASS_ char(1) not null,
+ DBVERSION_ integer not null,
+ NAME_ varchar(255),
+ DESCR_ longtext,
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ FORM_ varchar(255),
+ PRIORITY_ integer,
+ CREATE_ datetime,
+ DUEDATE_ datetime,
+ PROGRESS_ integer,
+ SIGNALLING_ bit,
+ EXECUTION_ID_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ HASVARS_ bit,
+ SUPERTASK_ bigint,
+ EXECUTION_ bigint,
+ PROCINST_ bigint,
+ SWIMLANE_ bigint,
+ TASKDEFNAME_ varchar(255),
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create table JBPM4_VARIABLE (
+ DBID_ bigint not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ integer not null,
+ KEY_ varchar(255),
+ CONVERTER_ varchar(255),
+ HIST_ bit,
+ EXECUTION_ bigint,
+ TASK_ bigint,
+ LOB_ bigint,
+ DATE_VALUE_ datetime,
+ DOUBLE_VALUE_ double precision,
+ CLASSNAME_ varchar(255),
+ LONG_VALUE_ bigint,
+ STRING_VALUE_ varchar(255),
+ TEXT_VALUE_ longtext,
+ EXESYS_ bigint,
+ primary key (DBID_)
+ ) type=InnoDB;
+
+ create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);
+
+ alter table JBPM4_DEPLOYPROP
+ add index FK_DEPLPROP_DEPL (DEPLOYMENT_),
+ add constraint FK_DEPLPROP_DEPL
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT (DBID_);
+
+ create index IDX_EXEC_SUPEREXEC on JBPM4_EXECUTION (SUPEREXEC_);
+
+ create index IDX_EXEC_INSTANCE on JBPM4_EXECUTION (INSTANCE_);
+
+ create index IDX_EXEC_SUBPI on JBPM4_EXECUTION (SUBPROCINST_);
+
+ create index IDX_EXEC_PARENT on JBPM4_EXECUTION (PARENT_);
+
+ alter table JBPM4_EXECUTION
+ add index FK_EXEC_PARENT (PARENT_),
+ add constraint FK_EXEC_PARENT
+ foreign key (PARENT_)
+ references JBPM4_EXECUTION (DBID_);
+
+ alter table JBPM4_EXECUTION
+ add index FK_EXEC_SUBPI (SUBPROCINST_),
+ add constraint FK_EXEC_SUBPI
+ foreign key (SUBPROCINST_)
+ references JBPM4_EXECUTION (DBID_);
+
+ alter table JBPM4_EXECUTION
+ add index FK_EXEC_INSTANCE (INSTANCE_),
+ add constraint FK_EXEC_INSTANCE
+ foreign key (INSTANCE_)
+ references JBPM4_EXECUTION (DBID_);
+
+ alter table JBPM4_EXECUTION
+ add index FK_EXEC_SUPEREXEC (SUPEREXEC_),
+ add constraint FK_EXEC_SUPEREXEC
+ foreign key (SUPEREXEC_)
+ references JBPM4_EXECUTION (DBID_);
+
+ create index IDX_HACTI_HPROCI on JBPM4_HIST_ACTINST (HPROCI_);
+
+ create index IDX_HTI_HTASK on JBPM4_HIST_ACTINST (HTASK_);
+
+ alter table JBPM4_HIST_ACTINST
+ add index FK_HACTI_HPROCI (HPROCI_),
+ add constraint FK_HACTI_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST (DBID_);
+
+ alter table JBPM4_HIST_ACTINST
+ add index FK_HTI_HTASK (HTASK_),
+ add constraint FK_HTI_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK (DBID_);
+
+ create index IDX_HDET_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDET_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDETAIL_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDETAIL_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDETAIL_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ create index IDX_HDETAIL_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDET_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDET_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ alter table JBPM4_HIST_DETAIL
+ add index FK_HDETAIL_HPROCI (HPROCI_),
+ add constraint FK_HDETAIL_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST (DBID_);
+
+ alter table JBPM4_HIST_DETAIL
+ add index FK_HDETAIL_HACTI (HACTI_),
+ add constraint FK_HDETAIL_HACTI
+ foreign key (HACTI_)
+ references JBPM4_HIST_ACTINST (DBID_);
+
+ alter table JBPM4_HIST_DETAIL
+ add index FK_HDETAIL_HTASK (HTASK_),
+ add constraint FK_HDETAIL_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK (DBID_);
+
+ alter table JBPM4_HIST_DETAIL
+ add index FK_HDETAIL_HVAR (HVAR_),
+ add constraint FK_HDETAIL_HVAR
+ foreign key (HVAR_)
+ references JBPM4_HIST_VAR (DBID_);
+
+ alter table JBPM4_HIST_TASK
+ add index FK_HSUPERT_SUB (SUPERTASK_),
+ add constraint FK_HSUPERT_SUB
+ foreign key (SUPERTASK_)
+ references JBPM4_HIST_TASK (DBID_);
+
+ create index IDX_HVAR_HPROCI on JBPM4_HIST_VAR (HPROCI_);
+
+ create index IDX_HVAR_HTASK on JBPM4_HIST_VAR (HTASK_);
+
+ alter table JBPM4_HIST_VAR
+ add index FK_HVAR_HPROCI (HPROCI_),
+ add constraint FK_HVAR_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST (DBID_);
+
+ alter table JBPM4_HIST_VAR
+ add index FK_HVAR_HTASK (HTASK_),
+ add constraint FK_HVAR_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK (DBID_);
+
+ create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);
+
+ alter table JBPM4_ID_GROUP
+ add index FK_GROUP_PARENT (PARENT_),
+ add constraint FK_GROUP_PARENT
+ foreign key (PARENT_)
+ references JBPM4_ID_GROUP (DBID_);
+
+ create index IDX_MEM_USER on JBPM4_ID_MEMBERSHIP (USER_);
+
+ create index IDX_MEM_GROUP on JBPM4_ID_MEMBERSHIP (GROUP_);
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add index FK_MEM_GROUP (GROUP_),
+ add constraint FK_MEM_GROUP
+ foreign key (GROUP_)
+ references JBPM4_ID_GROUP (DBID_);
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add index FK_MEM_USER (USER_),
+ add constraint FK_MEM_USER
+ foreign key (USER_)
+ references JBPM4_ID_USER (DBID_);
+
+ create index IDX_JOBRETRIES on JBPM4_JOB (RETRIES_);
+
+ create index IDX_JOB_CFG on JBPM4_JOB (CFG_);
+
+ create index IDX_JOB_PRINST on JBPM4_JOB (PROCESSINSTANCE_);
+
+ create index IDX_JOB_EXE on JBPM4_JOB (EXECUTION_);
+
+ create index IDX_JOBLOCKEXP on JBPM4_JOB (LOCKEXPTIME_);
+
+ create index IDX_JOBDUEDATE on JBPM4_JOB (DUEDATE_);
+
+ alter table JBPM4_JOB
+ add index FK_JOB_CFG (CFG_),
+ add constraint FK_JOB_CFG
+ foreign key (CFG_)
+ references JBPM4_LOB (DBID_);
+
+ create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);
+
+ alter table JBPM4_LOB
+ add index FK_LOB_DEPLOYMENT (DEPLOYMENT_),
+ add constraint FK_LOB_DEPLOYMENT
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT (DBID_);
+
+ create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);
+
+ alter table JBPM4_PARTICIPATION
+ add index FK_PART_SWIMLANE (SWIMLANE_),
+ add constraint FK_PART_SWIMLANE
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE (DBID_);
+
+ alter table JBPM4_PARTICIPATION
+ add index FK_PART_TASK (TASK_),
+ add constraint FK_PART_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK (DBID_);
+
+ create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);
+
+ alter table JBPM4_SWIMLANE
+ add index FK_SWIMLANE_EXEC (EXECUTION_),
+ add constraint FK_SWIMLANE_EXEC
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION (DBID_);
+
+ create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);
+
+ alter table JBPM4_TASK
+ add index FK_TASK_SWIML (SWIMLANE_),
+ add constraint FK_TASK_SWIML
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE (DBID_);
+
+ alter table JBPM4_TASK
+ add index FK_TASK_SUPERTASK (SUPERTASK_),
+ add constraint FK_TASK_SUPERTASK
+ foreign key (SUPERTASK_)
+ references JBPM4_TASK (DBID_);
+
+ create index IDX_VAR_EXESYS on JBPM4_VARIABLE (EXESYS_);
+
+ create index IDX_VAR_TASK on JBPM4_VARIABLE (TASK_);
+
+ create index IDX_VAR_EXECUTION on JBPM4_VARIABLE (EXECUTION_);
+
+ create index IDX_VAR_LOB on JBPM4_VARIABLE (LOB_);
+
+ alter table JBPM4_VARIABLE
+ add index FK_VAR_LOB (LOB_),
+ add constraint FK_VAR_LOB
+ foreign key (LOB_)
+ references JBPM4_LOB (DBID_);
+
+ alter table JBPM4_VARIABLE
+ add index FK_VAR_EXECUTION (EXECUTION_),
+ add constraint FK_VAR_EXECUTION
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION (DBID_);
+
+ alter table JBPM4_VARIABLE
+ add index FK_VAR_EXESYS (EXESYS_),
+ add constraint FK_VAR_EXESYS
+ foreign key (EXESYS_)
+ references JBPM4_EXECUTION (DBID_);
+
+ alter table JBPM4_VARIABLE
+ add index FK_VAR_TASK (TASK_),
+ add constraint FK_VAR_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK (DBID_);
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.oracle.create.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.oracle.create.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.oracle.create.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,466 @@
+
+ create table JBPM4_DEPLOYMENT (
+ DBID_ number(19,0) not null,
+ NAME_ clob,
+ TIMESTAMP_ number(19,0),
+ STATE_ varchar2(255 char),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_DEPLOYPROP (
+ DBID_ number(19,0) not null,
+ DEPLOYMENT_ number(19,0),
+ OBJNAME_ varchar2(255 char),
+ KEY_ varchar2(255 char),
+ STRINGVAL_ varchar2(255 char),
+ LONGVAL_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_EXECUTION (
+ DBID_ number(19,0) not null,
+ CLASS_ varchar2(255 char) not null,
+ DBVERSION_ number(10,0) not null,
+ ACTIVITYNAME_ varchar2(255 char),
+ PROCDEFID_ varchar2(255 char),
+ HASVARS_ number(1,0),
+ NAME_ varchar2(255 char),
+ KEY_ varchar2(255 char),
+ ID_ varchar2(255 char) unique,
+ STATE_ varchar2(255 char),
+ SUSPHISTSTATE_ varchar2(255 char),
+ PRIORITY_ number(10,0),
+ HISACTINST_ number(19,0),
+ PARENT_ number(19,0),
+ INSTANCE_ number(19,0),
+ SUPEREXEC_ number(19,0),
+ SUBPROCINST_ number(19,0),
+ PARENT_IDX_ number(10,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_ACTINST (
+ DBID_ number(19,0) not null,
+ CLASS_ varchar2(255 char) not null,
+ DBVERSION_ number(10,0) not null,
+ HPROCI_ number(19,0),
+ TYPE_ varchar2(255 char),
+ EXECUTION_ varchar2(255 char),
+ ACTIVITY_NAME_ varchar2(255 char),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ number(19,0),
+ TRANSITION_ varchar2(255 char),
+ NEXTIDX_ number(10,0),
+ HTASK_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_DETAIL (
+ DBID_ number(19,0) not null,
+ CLASS_ varchar2(255 char) not null,
+ DBVERSION_ number(10,0) not null,
+ USERID_ varchar2(255 char),
+ TIME_ timestamp,
+ HPROCI_ number(19,0),
+ HPROCIIDX_ number(10,0),
+ HACTI_ number(19,0),
+ HACTIIDX_ number(10,0),
+ HTASK_ number(19,0),
+ HTASKIDX_ number(10,0),
+ HVAR_ number(19,0),
+ HVARIDX_ number(10,0),
+ MESSAGE_ clob,
+ OLD_STR_ varchar2(255 char),
+ NEW_STR_ varchar2(255 char),
+ OLD_INT_ number(10,0),
+ NEW_INT_ number(10,0),
+ OLD_TIME_ timestamp,
+ NEW_TIME_ timestamp,
+ PARENT_ number(19,0),
+ PARENT_IDX_ number(10,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_PROCINST (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ ID_ varchar2(255 char),
+ PROCDEFID_ varchar2(255 char),
+ KEY_ varchar2(255 char),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ number(19,0),
+ STATE_ varchar2(255 char),
+ ENDACTIVITY_ varchar2(255 char),
+ NEXTIDX_ number(10,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_TASK (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ EXECUTION_ varchar2(255 char),
+ OUTCOME_ varchar2(255 char),
+ ASSIGNEE_ varchar2(255 char),
+ PRIORITY_ number(10,0),
+ STATE_ varchar2(255 char),
+ CREATE_ timestamp,
+ END_ timestamp,
+ DURATION_ number(19,0),
+ NEXTIDX_ number(10,0),
+ SUPERTASK_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_VAR (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ PROCINSTID_ varchar2(255 char),
+ EXECUTIONID_ varchar2(255 char),
+ VARNAME_ varchar2(255 char),
+ VALUE_ varchar2(255 char),
+ HPROCI_ number(19,0),
+ HTASK_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_GROUP (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ ID_ varchar2(255 char),
+ NAME_ varchar2(255 char),
+ TYPE_ varchar2(255 char),
+ PARENT_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_MEMBERSHIP (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ USER_ number(19,0),
+ GROUP_ number(19,0),
+ NAME_ varchar2(255 char),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_USER (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ ID_ varchar2(255 char),
+ PASSWORD_ varchar2(255 char),
+ GIVENNAME_ varchar2(255 char),
+ FAMILYNAME_ varchar2(255 char),
+ BUSINESSEMAIL_ varchar2(255 char),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_JOB (
+ DBID_ number(19,0) not null,
+ CLASS_ varchar2(255 char) not null,
+ DBVERSION_ number(10,0) not null,
+ DUEDATE_ timestamp,
+ STATE_ varchar2(255 char),
+ ISEXCLUSIVE_ number(1,0),
+ LOCKOWNER_ varchar2(255 char),
+ LOCKEXPTIME_ timestamp,
+ EXCEPTION_ clob,
+ RETRIES_ number(10,0),
+ PROCESSINSTANCE_ number(19,0),
+ EXECUTION_ number(19,0),
+ CFG_ number(19,0),
+ SIGNAL_ varchar2(255 char),
+ EVENT_ varchar2(255 char),
+ REPEAT_ varchar2(255 char),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_LOB (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ BLOB_VALUE_ blob,
+ DEPLOYMENT_ number(19,0),
+ NAME_ clob,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PARTICIPATION (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ GROUPID_ varchar2(255 char),
+ USERID_ varchar2(255 char),
+ TYPE_ varchar2(255 char),
+ TASK_ number(19,0),
+ SWIMLANE_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar2(255 char) not null,
+ VERSION_ number(10,0) not null,
+ VALUE_ varchar2(255 char),
+ primary key (KEY_)
+ );
+
+ create table JBPM4_SWIMLANE (
+ DBID_ number(19,0) not null,
+ DBVERSION_ number(10,0) not null,
+ NAME_ varchar2(255 char),
+ ASSIGNEE_ varchar2(255 char),
+ EXECUTION_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_TASK (
+ DBID_ number(19,0) not null,
+ CLASS_ char(1 char) not null,
+ DBVERSION_ number(10,0) not null,
+ NAME_ varchar2(255 char),
+ DESCR_ clob,
+ STATE_ varchar2(255 char),
+ SUSPHISTSTATE_ varchar2(255 char),
+ ASSIGNEE_ varchar2(255 char),
+ FORM_ varchar2(255 char),
+ PRIORITY_ number(10,0),
+ CREATE_ timestamp,
+ DUEDATE_ timestamp,
+ PROGRESS_ number(10,0),
+ SIGNALLING_ number(1,0),
+ EXECUTION_ID_ varchar2(255 char),
+ ACTIVITY_NAME_ varchar2(255 char),
+ HASVARS_ number(1,0),
+ SUPERTASK_ number(19,0),
+ EXECUTION_ number(19,0),
+ PROCINST_ number(19,0),
+ SWIMLANE_ number(19,0),
+ TASKDEFNAME_ varchar2(255 char),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_VARIABLE (
+ DBID_ number(19,0) not null,
+ CLASS_ varchar2(255 char) not null,
+ DBVERSION_ number(10,0) not null,
+ KEY_ varchar2(255 char),
+ CONVERTER_ varchar2(255 char),
+ HIST_ number(1,0),
+ EXECUTION_ number(19,0),
+ TASK_ number(19,0),
+ LOB_ number(19,0),
+ DATE_VALUE_ timestamp,
+ DOUBLE_VALUE_ double precision,
+ CLASSNAME_ varchar2(255 char),
+ LONG_VALUE_ number(19,0),
+ STRING_VALUE_ varchar2(255 char),
+ TEXT_VALUE_ clob,
+ EXESYS_ number(19,0),
+ primary key (DBID_)
+ );
+
+ create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);
+
+ alter table JBPM4_DEPLOYPROP
+ add constraint FK_DEPLPROP_DEPL
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_EXEC_SUPEREXEC on JBPM4_EXECUTION (SUPEREXEC_);
+
+ create index IDX_EXEC_INSTANCE on JBPM4_EXECUTION (INSTANCE_);
+
+ create index IDX_EXEC_SUBPI on JBPM4_EXECUTION (SUBPROCINST_);
+
+ create index IDX_EXEC_PARENT on JBPM4_EXECUTION (PARENT_);
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_PARENT
+ foreign key (PARENT_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUBPI
+ foreign key (SUBPROCINST_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_INSTANCE
+ foreign key (INSTANCE_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUPEREXEC
+ foreign key (SUPEREXEC_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_HACTI_HPROCI on JBPM4_HIST_ACTINST (HPROCI_);
+
+ create index IDX_HTI_HTASK on JBPM4_HIST_ACTINST (HTASK_);
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HACTI_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HTI_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HDET_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDET_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDETAIL_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDETAIL_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDETAIL_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ create index IDX_HDETAIL_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDET_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDET_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HACTI
+ foreign key (HACTI_)
+ references JBPM4_HIST_ACTINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HVAR
+ foreign key (HVAR_)
+ references JBPM4_HIST_VAR;
+
+ alter table JBPM4_HIST_TASK
+ add constraint FK_HSUPERT_SUB
+ foreign key (SUPERTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HVAR_HPROCI on JBPM4_HIST_VAR (HPROCI_);
+
+ create index IDX_HVAR_HTASK on JBPM4_HIST_VAR (HTASK_);
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);
+
+ alter table JBPM4_ID_GROUP
+ add constraint FK_GROUP_PARENT
+ foreign key (PARENT_)
+ references JBPM4_ID_GROUP;
+
+ create index IDX_MEM_USER on JBPM4_ID_MEMBERSHIP (USER_);
+
+ create index IDX_MEM_GROUP on JBPM4_ID_MEMBERSHIP (GROUP_);
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_GROUP
+ foreign key (GROUP_)
+ references JBPM4_ID_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_USER
+ foreign key (USER_)
+ references JBPM4_ID_USER;
+
+ create index IDX_JOBRETRIES on JBPM4_JOB (RETRIES_);
+
+ create index IDX_JOB_CFG on JBPM4_JOB (CFG_);
+
+ create index IDX_JOB_PRINST on JBPM4_JOB (PROCESSINSTANCE_);
+
+ create index IDX_JOB_EXE on JBPM4_JOB (EXECUTION_);
+
+ create index IDX_JOBLOCKEXP on JBPM4_JOB (LOCKEXPTIME_);
+
+ create index IDX_JOBDUEDATE on JBPM4_JOB (DUEDATE_);
+
+ alter table JBPM4_JOB
+ add constraint FK_JOB_CFG
+ foreign key (CFG_)
+ references JBPM4_LOB;
+
+ create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);
+
+ alter table JBPM4_LOB
+ add constraint FK_LOB_DEPLOYMENT
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_SWIMLANE
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
+
+ create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);
+
+ alter table JBPM4_SWIMLANE
+ add constraint FK_SWIMLANE_EXEC
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SWIML
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SUPERTASK
+ foreign key (SUPERTASK_)
+ references JBPM4_TASK;
+
+ create index IDX_VAR_EXESYS on JBPM4_VARIABLE (EXESYS_);
+
+ create index IDX_VAR_TASK on JBPM4_VARIABLE (TASK_);
+
+ create index IDX_VAR_EXECUTION on JBPM4_VARIABLE (EXECUTION_);
+
+ create index IDX_VAR_LOB on JBPM4_VARIABLE (LOB_);
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_LOB
+ foreign key (LOB_)
+ references JBPM4_LOB;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXECUTION
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXESYS
+ foreign key (EXESYS_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.postgresql.create.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.postgresql.create.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/create/jbpm.postgresql.create.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,466 @@
+
+ create table JBPM4_DEPLOYMENT (
+ DBID_ int8 not null,
+ NAME_ text,
+ TIMESTAMP_ int8,
+ STATE_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_DEPLOYPROP (
+ DBID_ int8 not null,
+ DEPLOYMENT_ int8,
+ OBJNAME_ varchar(255),
+ KEY_ varchar(255),
+ STRINGVAL_ varchar(255),
+ LONGVAL_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_EXECUTION (
+ DBID_ int8 not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ int4 not null,
+ ACTIVITYNAME_ varchar(255),
+ PROCDEFID_ varchar(255),
+ HASVARS_ bool,
+ NAME_ varchar(255),
+ KEY_ varchar(255),
+ ID_ varchar(255) unique,
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ PRIORITY_ int4,
+ HISACTINST_ int8,
+ PARENT_ int8,
+ INSTANCE_ int8,
+ SUPEREXEC_ int8,
+ SUBPROCINST_ int8,
+ PARENT_IDX_ int4,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_ACTINST (
+ DBID_ int8 not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ int4 not null,
+ HPROCI_ int8,
+ TYPE_ varchar(255),
+ EXECUTION_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ int8,
+ TRANSITION_ varchar(255),
+ NEXTIDX_ int4,
+ HTASK_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_DETAIL (
+ DBID_ int8 not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ int4 not null,
+ USERID_ varchar(255),
+ TIME_ timestamp,
+ HPROCI_ int8,
+ HPROCIIDX_ int4,
+ HACTI_ int8,
+ HACTIIDX_ int4,
+ HTASK_ int8,
+ HTASKIDX_ int4,
+ HVAR_ int8,
+ HVARIDX_ int4,
+ MESSAGE_ text,
+ OLD_STR_ varchar(255),
+ NEW_STR_ varchar(255),
+ OLD_INT_ int4,
+ NEW_INT_ int4,
+ OLD_TIME_ timestamp,
+ NEW_TIME_ timestamp,
+ PARENT_ int8,
+ PARENT_IDX_ int4,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_PROCINST (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ ID_ varchar(255),
+ PROCDEFID_ varchar(255),
+ KEY_ varchar(255),
+ START_ timestamp,
+ END_ timestamp,
+ DURATION_ int8,
+ STATE_ varchar(255),
+ ENDACTIVITY_ varchar(255),
+ NEXTIDX_ int4,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_TASK (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ EXECUTION_ varchar(255),
+ OUTCOME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ PRIORITY_ int4,
+ STATE_ varchar(255),
+ CREATE_ timestamp,
+ END_ timestamp,
+ DURATION_ int8,
+ NEXTIDX_ int4,
+ SUPERTASK_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_HIST_VAR (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ PROCINSTID_ varchar(255),
+ EXECUTIONID_ varchar(255),
+ VARNAME_ varchar(255),
+ VALUE_ varchar(255),
+ HPROCI_ int8,
+ HTASK_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_GROUP (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ ID_ varchar(255),
+ NAME_ varchar(255),
+ TYPE_ varchar(255),
+ PARENT_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_MEMBERSHIP (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ USER_ int8,
+ GROUP_ int8,
+ NAME_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_ID_USER (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ ID_ varchar(255),
+ PASSWORD_ varchar(255),
+ GIVENNAME_ varchar(255),
+ FAMILYNAME_ varchar(255),
+ BUSINESSEMAIL_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_JOB (
+ DBID_ int8 not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ int4 not null,
+ DUEDATE_ timestamp,
+ STATE_ varchar(255),
+ ISEXCLUSIVE_ bool,
+ LOCKOWNER_ varchar(255),
+ LOCKEXPTIME_ timestamp,
+ EXCEPTION_ text,
+ RETRIES_ int4,
+ PROCESSINSTANCE_ int8,
+ EXECUTION_ int8,
+ CFG_ int8,
+ SIGNAL_ varchar(255),
+ EVENT_ varchar(255),
+ REPEAT_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_LOB (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ BLOB_VALUE_ oid,
+ DEPLOYMENT_ int8,
+ NAME_ text,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PARTICIPATION (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ GROUPID_ varchar(255),
+ USERID_ varchar(255),
+ TYPE_ varchar(255),
+ TASK_ int8,
+ SWIMLANE_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ int4 not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+ );
+
+ create table JBPM4_SWIMLANE (
+ DBID_ int8 not null,
+ DBVERSION_ int4 not null,
+ NAME_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ EXECUTION_ int8,
+ primary key (DBID_)
+ );
+
+ create table JBPM4_TASK (
+ DBID_ int8 not null,
+ CLASS_ char(1) not null,
+ DBVERSION_ int4 not null,
+ NAME_ varchar(255),
+ DESCR_ text,
+ STATE_ varchar(255),
+ SUSPHISTSTATE_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ FORM_ varchar(255),
+ PRIORITY_ int4,
+ CREATE_ timestamp,
+ DUEDATE_ timestamp,
+ PROGRESS_ int4,
+ SIGNALLING_ bool,
+ EXECUTION_ID_ varchar(255),
+ ACTIVITY_NAME_ varchar(255),
+ HASVARS_ bool,
+ SUPERTASK_ int8,
+ EXECUTION_ int8,
+ PROCINST_ int8,
+ SWIMLANE_ int8,
+ TASKDEFNAME_ varchar(255),
+ primary key (DBID_)
+ );
+
+ create table JBPM4_VARIABLE (
+ DBID_ int8 not null,
+ CLASS_ varchar(255) not null,
+ DBVERSION_ int4 not null,
+ KEY_ varchar(255),
+ CONVERTER_ varchar(255),
+ HIST_ bool,
+ EXECUTION_ int8,
+ TASK_ int8,
+ LOB_ int8,
+ DATE_VALUE_ timestamp,
+ DOUBLE_VALUE_ float8,
+ CLASSNAME_ varchar(255),
+ LONG_VALUE_ int8,
+ STRING_VALUE_ varchar(255),
+ TEXT_VALUE_ text,
+ EXESYS_ int8,
+ primary key (DBID_)
+ );
+
+ create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);
+
+ alter table JBPM4_DEPLOYPROP
+ add constraint FK_DEPLPROP_DEPL
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_EXEC_SUPEREXEC on JBPM4_EXECUTION (SUPEREXEC_);
+
+ create index IDX_EXEC_INSTANCE on JBPM4_EXECUTION (INSTANCE_);
+
+ create index IDX_EXEC_SUBPI on JBPM4_EXECUTION (SUBPROCINST_);
+
+ create index IDX_EXEC_PARENT on JBPM4_EXECUTION (PARENT_);
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_PARENT
+ foreign key (PARENT_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUBPI
+ foreign key (SUBPROCINST_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_INSTANCE
+ foreign key (INSTANCE_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_EXECUTION
+ add constraint FK_EXEC_SUPEREXEC
+ foreign key (SUPEREXEC_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_HACTI_HPROCI on JBPM4_HIST_ACTINST (HPROCI_);
+
+ create index IDX_HTI_HTASK on JBPM4_HIST_ACTINST (HTASK_);
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HACTI_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_ACTINST
+ add constraint FK_HTI_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HDET_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDET_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDETAIL_HACTI on JBPM4_HIST_DETAIL (HACTI_);
+
+ create index IDX_HDETAIL_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDETAIL_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ create index IDX_HDETAIL_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);
+
+ create index IDX_HDET_HVAR on JBPM4_HIST_DETAIL (HVAR_);
+
+ create index IDX_HDET_HTASK on JBPM4_HIST_DETAIL (HTASK_);
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HACTI
+ foreign key (HACTI_)
+ references JBPM4_HIST_ACTINST;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ alter table JBPM4_HIST_DETAIL
+ add constraint FK_HDETAIL_HVAR
+ foreign key (HVAR_)
+ references JBPM4_HIST_VAR;
+
+ alter table JBPM4_HIST_TASK
+ add constraint FK_HSUPERT_SUB
+ foreign key (SUPERTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_HVAR_HPROCI on JBPM4_HIST_VAR (HPROCI_);
+
+ create index IDX_HVAR_HTASK on JBPM4_HIST_VAR (HTASK_);
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HPROCI
+ foreign key (HPROCI_)
+ references JBPM4_HIST_PROCINST;
+
+ alter table JBPM4_HIST_VAR
+ add constraint FK_HVAR_HTASK
+ foreign key (HTASK_)
+ references JBPM4_HIST_TASK;
+
+ create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);
+
+ alter table JBPM4_ID_GROUP
+ add constraint FK_GROUP_PARENT
+ foreign key (PARENT_)
+ references JBPM4_ID_GROUP;
+
+ create index IDX_MEM_USER on JBPM4_ID_MEMBERSHIP (USER_);
+
+ create index IDX_MEM_GROUP on JBPM4_ID_MEMBERSHIP (GROUP_);
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_GROUP
+ foreign key (GROUP_)
+ references JBPM4_ID_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ add constraint FK_MEM_USER
+ foreign key (USER_)
+ references JBPM4_ID_USER;
+
+ create index IDX_JOBRETRIES on JBPM4_JOB (RETRIES_);
+
+ create index IDX_JOB_CFG on JBPM4_JOB (CFG_);
+
+ create index IDX_JOB_PRINST on JBPM4_JOB (PROCESSINSTANCE_);
+
+ create index IDX_JOB_EXE on JBPM4_JOB (EXECUTION_);
+
+ create index IDX_JOBLOCKEXP on JBPM4_JOB (LOCKEXPTIME_);
+
+ create index IDX_JOBDUEDATE on JBPM4_JOB (DUEDATE_);
+
+ alter table JBPM4_JOB
+ add constraint FK_JOB_CFG
+ foreign key (CFG_)
+ references JBPM4_LOB;
+
+ create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);
+
+ alter table JBPM4_LOB
+ add constraint FK_LOB_DEPLOYMENT
+ foreign key (DEPLOYMENT_)
+ references JBPM4_DEPLOYMENT;
+
+ create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_SWIMLANE
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ add constraint FK_PART_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
+
+ create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);
+
+ alter table JBPM4_SWIMLANE
+ add constraint FK_SWIMLANE_EXEC
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SWIML
+ foreign key (SWIMLANE_)
+ references JBPM4_SWIMLANE;
+
+ alter table JBPM4_TASK
+ add constraint FK_TASK_SUPERTASK
+ foreign key (SUPERTASK_)
+ references JBPM4_TASK;
+
+ create index IDX_VAR_EXESYS on JBPM4_VARIABLE (EXESYS_);
+
+ create index IDX_VAR_TASK on JBPM4_VARIABLE (TASK_);
+
+ create index IDX_VAR_EXECUTION on JBPM4_VARIABLE (EXECUTION_);
+
+ create index IDX_VAR_LOB on JBPM4_VARIABLE (LOB_);
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_LOB
+ foreign key (LOB_)
+ references JBPM4_LOB;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXECUTION
+ foreign key (EXECUTION_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_EXESYS
+ foreign key (EXESYS_)
+ references JBPM4_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ add constraint FK_VAR_TASK
+ foreign key (TASK_)
+ references JBPM4_TASK;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.hsqldb.drop.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.hsqldb.drop.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.hsqldb.drop.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,120 @@
+
+ alter table JBPM4_DEPLOYPROP
+ drop constraint FK_DEPLPROP_DEPL;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_PARENT;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_SUBPI;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_INSTANCE;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_SUPEREXEC;
+
+ alter table JBPM4_HIST_ACTINST
+ drop constraint FK_HACTI_HPROCI;
+
+ alter table JBPM4_HIST_ACTINST
+ drop constraint FK_HTI_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HPROCI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HACTI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HVAR;
+
+ alter table JBPM4_HIST_TASK
+ drop constraint FK_HSUPERT_SUB;
+
+ alter table JBPM4_HIST_VAR
+ drop constraint FK_HVAR_HPROCI;
+
+ alter table JBPM4_HIST_VAR
+ drop constraint FK_HVAR_HTASK;
+
+ alter table JBPM4_ID_GROUP
+ drop constraint FK_GROUP_PARENT;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop constraint FK_MEM_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop constraint FK_MEM_USER;
+
+ alter table JBPM4_JOB
+ drop constraint FK_JOB_CFG;
+
+ alter table JBPM4_LOB
+ drop constraint FK_LOB_DEPLOYMENT;
+
+ alter table JBPM4_PARTICIPATION
+ drop constraint FK_PART_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ drop constraint FK_PART_TASK;
+
+ alter table JBPM4_SWIMLANE
+ drop constraint FK_SWIMLANE_EXEC;
+
+ alter table JBPM4_TASK
+ drop constraint FK_TASK_SWIML;
+
+ alter table JBPM4_TASK
+ drop constraint FK_TASK_SUPERTASK;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_LOB;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_EXESYS;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_TASK;
+
+ drop table JBPM4_DEPLOYMENT if exists;
+
+ drop table JBPM4_DEPLOYPROP if exists;
+
+ drop table JBPM4_EXECUTION if exists;
+
+ drop table JBPM4_HIST_ACTINST if exists;
+
+ drop table JBPM4_HIST_DETAIL if exists;
+
+ drop table JBPM4_HIST_PROCINST if exists;
+
+ drop table JBPM4_HIST_TASK if exists;
+
+ drop table JBPM4_HIST_VAR if exists;
+
+ drop table JBPM4_ID_GROUP if exists;
+
+ drop table JBPM4_ID_MEMBERSHIP if exists;
+
+ drop table JBPM4_ID_USER if exists;
+
+ drop table JBPM4_JOB if exists;
+
+ drop table JBPM4_LOB if exists;
+
+ drop table JBPM4_PARTICIPATION if exists;
+
+ drop table JBPM4_PROPERTY if exists;
+
+ drop table JBPM4_SWIMLANE if exists;
+
+ drop table JBPM4_TASK if exists;
+
+ drop table JBPM4_VARIABLE if exists;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.mysql.drop.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.mysql.drop.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.mysql.drop.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,148 @@
+
+ alter table JBPM4_DEPLOYPROP
+ drop
+ foreign key FK_DEPLPROP_DEPL;
+
+ alter table JBPM4_EXECUTION
+ drop
+ foreign key FK_EXEC_PARENT;
+
+ alter table JBPM4_EXECUTION
+ drop
+ foreign key FK_EXEC_SUBPI;
+
+ alter table JBPM4_EXECUTION
+ drop
+ foreign key FK_EXEC_INSTANCE;
+
+ alter table JBPM4_EXECUTION
+ drop
+ foreign key FK_EXEC_SUPEREXEC;
+
+ alter table JBPM4_HIST_ACTINST
+ drop
+ foreign key FK_HACTI_HPROCI;
+
+ alter table JBPM4_HIST_ACTINST
+ drop
+ foreign key FK_HTI_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop
+ foreign key FK_HDETAIL_HPROCI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop
+ foreign key FK_HDETAIL_HACTI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop
+ foreign key FK_HDETAIL_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop
+ foreign key FK_HDETAIL_HVAR;
+
+ alter table JBPM4_HIST_TASK
+ drop
+ foreign key FK_HSUPERT_SUB;
+
+ alter table JBPM4_HIST_VAR
+ drop
+ foreign key FK_HVAR_HPROCI;
+
+ alter table JBPM4_HIST_VAR
+ drop
+ foreign key FK_HVAR_HTASK;
+
+ alter table JBPM4_ID_GROUP
+ drop
+ foreign key FK_GROUP_PARENT;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop
+ foreign key FK_MEM_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop
+ foreign key FK_MEM_USER;
+
+ alter table JBPM4_JOB
+ drop
+ foreign key FK_JOB_CFG;
+
+ alter table JBPM4_LOB
+ drop
+ foreign key FK_LOB_DEPLOYMENT;
+
+ alter table JBPM4_PARTICIPATION
+ drop
+ foreign key FK_PART_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ drop
+ foreign key FK_PART_TASK;
+
+ alter table JBPM4_SWIMLANE
+ drop
+ foreign key FK_SWIMLANE_EXEC;
+
+ alter table JBPM4_TASK
+ drop
+ foreign key FK_TASK_SWIML;
+
+ alter table JBPM4_TASK
+ drop
+ foreign key FK_TASK_SUPERTASK;
+
+ alter table JBPM4_VARIABLE
+ drop
+ foreign key FK_VAR_LOB;
+
+ alter table JBPM4_VARIABLE
+ drop
+ foreign key FK_VAR_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ drop
+ foreign key FK_VAR_EXESYS;
+
+ alter table JBPM4_VARIABLE
+ drop
+ foreign key FK_VAR_TASK;
+
+ drop table if exists JBPM4_DEPLOYMENT;
+
+ drop table if exists JBPM4_DEPLOYPROP;
+
+ drop table if exists JBPM4_EXECUTION;
+
+ drop table if exists JBPM4_HIST_ACTINST;
+
+ drop table if exists JBPM4_HIST_DETAIL;
+
+ drop table if exists JBPM4_HIST_PROCINST;
+
+ drop table if exists JBPM4_HIST_TASK;
+
+ drop table if exists JBPM4_HIST_VAR;
+
+ drop table if exists JBPM4_ID_GROUP;
+
+ drop table if exists JBPM4_ID_MEMBERSHIP;
+
+ drop table if exists JBPM4_ID_USER;
+
+ drop table if exists JBPM4_JOB;
+
+ drop table if exists JBPM4_LOB;
+
+ drop table if exists JBPM4_PARTICIPATION;
+
+ drop table if exists JBPM4_PROPERTY;
+
+ drop table if exists JBPM4_SWIMLANE;
+
+ drop table if exists JBPM4_TASK;
+
+ drop table if exists JBPM4_VARIABLE;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.oracle.drop.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.oracle.drop.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.oracle.drop.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,36 @@
+
+ drop table JBPM4_DEPLOYMENT cascade constraints;
+
+ drop table JBPM4_DEPLOYPROP cascade constraints;
+
+ drop table JBPM4_EXECUTION cascade constraints;
+
+ drop table JBPM4_HIST_ACTINST cascade constraints;
+
+ drop table JBPM4_HIST_DETAIL cascade constraints;
+
+ drop table JBPM4_HIST_PROCINST cascade constraints;
+
+ drop table JBPM4_HIST_TASK cascade constraints;
+
+ drop table JBPM4_HIST_VAR cascade constraints;
+
+ drop table JBPM4_ID_GROUP cascade constraints;
+
+ drop table JBPM4_ID_MEMBERSHIP cascade constraints;
+
+ drop table JBPM4_ID_USER cascade constraints;
+
+ drop table JBPM4_JOB cascade constraints;
+
+ drop table JBPM4_LOB cascade constraints;
+
+ drop table JBPM4_PARTICIPATION cascade constraints;
+
+ drop table JBPM4_PROPERTY cascade constraints;
+
+ drop table JBPM4_SWIMLANE cascade constraints;
+
+ drop table JBPM4_TASK cascade constraints;
+
+ drop table JBPM4_VARIABLE cascade constraints;
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.postgresql.drop.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.postgresql.drop.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/drop/jbpm.postgresql.drop.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,120 @@
+
+ alter table JBPM4_DEPLOYPROP
+ drop constraint FK_DEPLPROP_DEPL;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_PARENT;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_SUBPI;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_INSTANCE;
+
+ alter table JBPM4_EXECUTION
+ drop constraint FK_EXEC_SUPEREXEC;
+
+ alter table JBPM4_HIST_ACTINST
+ drop constraint FK_HACTI_HPROCI;
+
+ alter table JBPM4_HIST_ACTINST
+ drop constraint FK_HTI_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HPROCI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HACTI;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HTASK;
+
+ alter table JBPM4_HIST_DETAIL
+ drop constraint FK_HDETAIL_HVAR;
+
+ alter table JBPM4_HIST_TASK
+ drop constraint FK_HSUPERT_SUB;
+
+ alter table JBPM4_HIST_VAR
+ drop constraint FK_HVAR_HPROCI;
+
+ alter table JBPM4_HIST_VAR
+ drop constraint FK_HVAR_HTASK;
+
+ alter table JBPM4_ID_GROUP
+ drop constraint FK_GROUP_PARENT;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop constraint FK_MEM_GROUP;
+
+ alter table JBPM4_ID_MEMBERSHIP
+ drop constraint FK_MEM_USER;
+
+ alter table JBPM4_JOB
+ drop constraint FK_JOB_CFG;
+
+ alter table JBPM4_LOB
+ drop constraint FK_LOB_DEPLOYMENT;
+
+ alter table JBPM4_PARTICIPATION
+ drop constraint FK_PART_SWIMLANE;
+
+ alter table JBPM4_PARTICIPATION
+ drop constraint FK_PART_TASK;
+
+ alter table JBPM4_SWIMLANE
+ drop constraint FK_SWIMLANE_EXEC;
+
+ alter table JBPM4_TASK
+ drop constraint FK_TASK_SWIML;
+
+ alter table JBPM4_TASK
+ drop constraint FK_TASK_SUPERTASK;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_LOB;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_EXECUTION;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_EXESYS;
+
+ alter table JBPM4_VARIABLE
+ drop constraint FK_VAR_TASK;
+
+ drop table JBPM4_DEPLOYMENT;
+
+ drop table JBPM4_DEPLOYPROP;
+
+ drop table JBPM4_EXECUTION;
+
+ drop table JBPM4_HIST_ACTINST;
+
+ drop table JBPM4_HIST_DETAIL;
+
+ drop table JBPM4_HIST_PROCINST;
+
+ drop table JBPM4_HIST_TASK;
+
+ drop table JBPM4_HIST_VAR;
+
+ drop table JBPM4_ID_GROUP;
+
+ drop table JBPM4_ID_MEMBERSHIP;
+
+ drop table JBPM4_ID_USER;
+
+ drop table JBPM4_JOB;
+
+ drop table JBPM4_LOB;
+
+ drop table JBPM4_PARTICIPATION;
+
+ drop table JBPM4_PROPERTY;
+
+ drop table JBPM4_SWIMLANE;
+
+ drop table JBPM4_TASK;
+
+ drop table JBPM4_VARIABLE;
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.hsqldb.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,3 @@
+
+ alter table JBPM4_VARIABLE
+ add column CLASSNAME_ varchar(255);
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.mysql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,3 @@
+
+ alter table JBPM4_VARIABLE
+ add column CLASSNAME_ varchar(255);
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.oracle.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,3 @@
+
+ alter table JBPM4_VARIABLE
+ add CLASSNAME_ varchar2(255 char);
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.0-to-4.1/jbpm.postgresql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,3 @@
+
+ alter table JBPM4_VARIABLE
+ add column CLASSNAME_ varchar(255);
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.hsqldb.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,6 @@
+create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+);
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.mysql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,7 @@
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ integer not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+ ) type=InnoDB;
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.oracle.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,7 @@
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar2(255 char) not null,
+ VERSION_ number(10,0) not null,
+ VALUE_ varchar2(255 char),
+ primary key (KEY_)
+ );
Copied: jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql (from rev 5766, jbpm4/trunk/modules/db/src/main/resources/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql)
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/db/upgrade-4.1-to-4.2/jbpm.postgresql.upgrade.sql 2009-10-21 16:26:54 UTC (rev 5767)
@@ -0,0 +1,7 @@
+
+ create table JBPM4_PROPERTY (
+ KEY_ varchar(255) not null,
+ VERSION_ int4 not null,
+ VALUE_ varchar(255),
+ primary key (KEY_)
+ );
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/repository/JpdlDeployer.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/repository/JpdlDeployer.java 2009-10-21 11:13:32 UTC (rev 5766)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/repository/JpdlDeployer.java 2009-10-21 16:26:54 UTC (rev 5767)
@@ -23,10 +23,7 @@
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -45,7 +42,6 @@
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/**
@@ -63,6 +59,10 @@
super(jpdlExtension, jpdlParser);
}
+ protected String getProcessLanguageId() {
+ return "";
+ }
+
public void updateResource(DeploymentImpl deployment, String resourceName, byte[] bytes) {
if (resourceName.endsWith(".jpdl.xml")) {
Document document = parser
More information about the jbpm-commits
mailing list