[jboss-svn-commits] JBL Code SVN: r27129 - in labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm: src/main/resources and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jun 25 10:31:51 EDT 2009


Author: kevin.conner at jboss.com
Date: 2009-06-25 10:31:51 -0400 (Thu, 25 Jun 2009)
New Revision: 27129

Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/lib/ext/jbpm-identity.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/lib/ext/jbpm-jpdl.jar
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/META-INF/deployment.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/hibernate.cfg.xml
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-console.war
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/test/resources/hibernate.cfg.xml
Log:
upgraded to jBPM 3.2.5SP5: JBESB-2637

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/lib/ext/jbpm-identity.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/lib/ext/jbpm-jpdl.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/META-INF/deployment.xml	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/META-INF/deployment.xml	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <jbossesb-deployment>
   <depends>jboss.esb:deployment=jbossesb.esb</depends>
-  <depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
-  <depends>jboss.esb:service=JBPMDatabaseInitializer</depends>
+  <depends>jboss.esb:service=JbpmService</depends>
 </jbossesb-deployment>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/hibernate.cfg.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/hibernate.cfg.xml	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/hibernate.cfg.xml	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,8 +1,7 @@
 <?xml version='1.0' encoding='utf-8'?>
-
 <!DOCTYPE hibernate-configuration PUBLIC
-          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
-          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 
 <hibernate-configuration>
   <session-factory>
@@ -10,78 +9,74 @@
     <!-- hibernate dialect -->
     <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
 
-    <!-- JDBC connection properties (begin) 
+    <!-- JDBC connection properties (begin) ===
     <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
     <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
     <property name="hibernate.connection.username">sa</property>
     <property name="hibernate.connection.password"></property>
-     JDBC connection properties (end) -->
-    
-    
-    <!-- JDBC connection properties (end) -->
-    
-    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-    
-    <!-- DataSource properties (begin) === -->
+    ==== JDBC connection properties (end) -->
+
+
+    <!-- DataSource properties (begin) -->
     <property name="hibernate.connection.datasource">java:/JbpmDS</property>
-    <!--  ==== DataSource properties (end) -->
-    
-    <!-- JTA transaction properties (begin) ===
-    ==== JTA transaction properties (end) -->
+    <!-- DataSource properties (end) -->
+
+    <!-- JTA transaction properties (begin) -->
+    <property name="jta.UserTransaction">UserTransaction</property>
+    <property name="hibernate.current_session_context_class">jta</property>
     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
-    
+    <!-- JTA transaction properties (end) -->
+
     <!-- CMT transaction properties (begin) ===
     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
-	==== CMT transaction properties (end) -->
-	
-    <!-- logging properties (begin) ===
-    <property name="hibernate.show_sql">true</property>
+    ==== CMT transaction properties (end) -->
+
+    <!-- ################################### -->
+    <!-- # common settings                 # -->
+    <!-- ################################### -->
+
+    <!-- Automatic schema creation (begin) ===
+    <property name="hibernate.hbm2ddl.auto">create</property>
+    ==== Automatic schema creation (end) -->
+    
+    <!-- Simple memory-only cache -->
+    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+
+    <!-- SQL rendering properties (begin) ===
     <property name="hibernate.format_sql">true</property>
     <property name="hibernate.use_sql_comments">true</property>
-    ==== logging properties (end) -->
-    
+    ==== SQL rendering properties (end) -->
+
     <!-- ############################################ -->
     <!-- # mapping files with external dependencies # -->
     <!-- ############################################ -->
 
-    <!-- following mapping file has a dependendy on   -->
-    <!-- 'bsh-{version}.jar'.                         -->
-    <!-- uncomment this if you don't have bsh on your -->
-    <!-- classpath.  you won't be able to use the     -->
-    <!-- script element in process definition files   -->
-    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
-    <!-- following mapping files have a dependendy on  -->
-    <!-- 'jbpm-identity.jar', mapping files            -->
-    <!-- of the pluggable jbpm identity component.     -->
-    <!-- Uncomment the following 3 lines if you        -->
-    <!-- want to use the jBPM identity mgmgt           -->
-    <!-- component.                                    -->
-    <!-- identity mappings (begin) -->
-    <mapping resource="org/jbpm/identity/User.hbm.xml"/>
-    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
-    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
-    <!-- identity mappings (end) -->
+    <!-- Additional mappings defined per module go here -->
+    <mapping resource="hibernate.extra.hbm.xml" />
+    <mapping resource="hibernate.identity.hbm.xml" />
     
-    <!-- following mapping files have a dependendy on  -->
-    <!-- the JCR API                                   -->
-    <!-- jcr mappings (begin) ===
-    <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
-    ==== jcr mappings (end) -->
-
-
     <!-- ###################### -->
     <!-- # jbpm mapping files # -->
     <!-- ###################### -->
 
-    <!-- hql queries and type defs -->
+    <!-- hql queries -->
     <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
 
+    <!-- hql queries used in simulation for querying historical data.
+         uncomment if you want to use the GetSimulationInputCommand
+         or you want to use the queries directly.
+         beware: the queries need the stddev function to be enabled in your dialect.
+         for more information, visit: 
+         http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.html -->
+    <!--
+    <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
+    -->
+
     <!-- graph.action mapping files -->
     <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
-    
+
     <!-- graph.def mapping files -->
     <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
     <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
@@ -92,6 +87,15 @@
     <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
     <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
 
+    <!-- ########################################### -->
+    <!-- # mapping file with external dependencies # -->
+    <!-- ########################################### -->
+    <!-- the following mapping file has a dependency on 'bsh-{version}.jar'.
+         uncomment this if bsh is not in your classpath.
+         the script element will not be available in process definition files.
+         note: this mapping must appear below org/jbpm/graph/def/Action.hbm.xml -->
+    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
     <!-- graph.node mapping files -->
     <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
@@ -107,21 +111,21 @@
     <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
     <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
 
-    <!-- taskmgmt.def mapping files -->
-    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+    <!-- bytes mapping files -->
+    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
 
     <!-- module.def mapping files -->
     <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
 
-    <!-- bytes mapping files -->
-    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
     <!-- file.def mapping files -->
     <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
 
+    <!-- taskmgmt.def mapping files -->
+    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
     <!-- scheduler.def mapping files -->
     <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
     <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
@@ -134,7 +138,7 @@
 
     <!-- module.exe mapping files -->
     <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-        
+
     <!-- context.exe mapping files -->
     <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
     <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
@@ -153,6 +157,7 @@
     <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
     <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
     <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
+    <mapping resource="org/jbpm/job/CleanUpProcessJob.hbm.xml"/>
 
     <!-- taskmgmt.exe mapping files -->
     <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
@@ -191,6 +196,66 @@
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-    
+
+    <!-- ################## -->
+    <!-- # cache settings # -->
+    <!-- ##################-->
+
+    <!-- strategy="nonstrict-read-write" can be used with HashtableCacheProvider -->
+
+    <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
   </session-factory>
-</hibernate-configuration>
+</hibernate-configuration>
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-console.war
===================================================================
(Binary files differ)

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/import.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -3,21 +3,21 @@
 insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values (3,'U','admin','admin at sample.domain','admin');
 insert into JBPM_ID_USER (ID_,CLASS_,NAME_,EMAIL_,PASSWORD_) values( 4,'U','shipper','shipper at sample.domain','shipper');
 
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (1,'G','sales','organisation');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (2,'G','admin','security-role');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (3,'G','user','security-role');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (4,'G','hr','organisation');
-insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_) values (5,'G','manager','security-role');
+insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_,PARENT_) values (1,'G','sales','organisation',NULL);
+insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_,PARENT_) values (2,'G','admin','security-role',NULL);
+insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_,PARENT_) values (3,'G','user','security-role',NULL);
+insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_,PARENT_) values (4,'G','hr','organisation',NULL);
+insert into JBPM_ID_GROUP (ID_,CLASS_,NAME_,TYPE_,PARENT_) values (5,'G','manager','security-role',NULL);
 
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (1,'M',2,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (2,'M',3,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (3,'M',4,4);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (4,'M',4,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (5,'M',1,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (6,'M',2,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (7,'M',3,3);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (8,'M',3,2);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (9,'M',2,2);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (10,'M',2,5);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (11,'M',2,1);
-insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,USER_,GROUP_) values (12,'M',1,1);
\ No newline at end of file
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (1,'M',NULL,NULL,2,4);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (2,'M',NULL,NULL,3,4);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (3,'M',NULL,NULL,4,4);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (4,'M',NULL,NULL,4,3);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (5,'M',NULL,NULL,1,3);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (6,'M',NULL,NULL,2,3);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (7,'M',NULL,NULL,3,3);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (8,'M',NULL,NULL,3,2);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (9,'M',NULL,NULL,2,2);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (10,'M',NULL,NULL,2,5);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (11,'M',NULL,NULL,2,1);
+insert into JBPM_ID_MEMBERSHIP (ID_,CLASS_,NAME_,ROLE_,USER_,GROUP_) values (12,'M',NULL,NULL,1,1);

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,167 +1,197 @@
-create table JBPM_ACTION (ID_ bigint generated by default as identity, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ bigint generated by default as identity, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ bigint generated by default as identity, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_));
-create table JBPM_EVENT (ID_ bigint generated by default as identity, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ bigint generated by default as identity, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_));
-create table JBPM_LOG (ID_ bigint generated by default as identity, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, pr!
 imary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ bigint generated by default as identity, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ bigint, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ bigint generated by default as identity, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ bigint generated by default as identity, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ bigint generated by default as identity, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ bigint generated by default as identity, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TASK (ID_ bigint generated by default as identity, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ bigint generated by default as identity, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKEN (ID_ bigint generated by default as identity, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TRANSITION (ID_ bigint generated by default as identity, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
+create table JBPM_ACTION (ID_ bigint generated by default as identity, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ bigint generated by default as identity, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ bigint generated by default as identity, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_))
+create table JBPM_EVENT (ID_ bigint generated by default as identity, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ bigint generated by default as identity, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_))
+create table JBPM_LOG (ID_ bigint generated by default as identity, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, pr!
 imary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ bigint generated by default as identity, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ bigint generated by default as identity, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ bigint, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ bigint generated by default as identity, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ bigint generated by default as identity, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ bigint generated by default as identity, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ bigint generated by default as identity, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TASK (ID_ bigint generated by default as identity, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ bigint generated by default as identity, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKEN (ID_ bigint generated by default as identity, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TRANSITION (ID_ bigint generated by default as identity, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,169 +1,199 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_));
-create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_));
-create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ bigint, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create table hibernate_unique_key ( next_hi integer );
-insert into hibernate_unique_key values ( 0 );
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_))
+create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_))
+create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ bigint, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create table hibernate_unique_key ( next_hi integer )
+insert into hibernate_unique_key values ( 0 )

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,168 +1,198 @@
-create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(18,0) not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ numeric(18,0) not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_EVENT (ID_ numeric(18,0) not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ numeric(18,0) not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), GRAPHELEMENTINDEX_ integer, NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_GROUP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ numeric(18,0), GROUP_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(18,0) not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ numeric(18,0), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ numeric(18,0), GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ numeric(18,0), NODE_ numeric(18,0), primary key (ID_));
-create table JBPM_LOG (ID_ numeric(18,0) not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ numeric(18,0), PARENT_ numeric(18,0), MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ numeric(18,0), NODE_ numeric(18,0), ENTER_ timestamp, LEAVE_ timestamp, DURATION_ numeric(18,0), NEWLONGVALUE_ numeric(18,0), TRANSITION_ numeric(18,0), CHILD_ numeric(18,0), SOURCENODE_ numeric(18,0), DESTINATIONNODE_ numeric(18,0), VARIABLEINSTANCE_ numeric(18,0), OLDBYTEARRAY_ numeric(18,0), NEWBYTEARRAY_ numeric(18,0), OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double precision, NEWDOUBLEVALUE_ double precision, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ numeric(18,0), NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ numeric(18,0), OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ numeric(18,0), OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar!
 (4000), TASKINSTANCE_ numeric(18,0), TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), STARTTASK_ numeric(18,0), primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ numeric(18,0), SUPERSTATE_ numeric(18,0), SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ numeric(18,0), DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION numeric(18,0), SCRIPT_ numeric(18,0), SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ numeric(18,0), primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ numeric(18,0), ROOTTOKEN_ numeric(18,0), SUPERPROCESSTOKEN_ numeric(18,0), primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ numeric(18,0) not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), ACTION_ numeric(18,0), PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ numeric(18,0) not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TASK (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ numeric(18,0), TASKNODE_ numeric(18,0), STARTSTATE_ numeric(18,0), ASSIGNMENTDELEGATION_ numeric(18,0), SWIMLANE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(18,0) not null, POOLEDACTOR_ numeric(18,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ numeric(18,0) not null, TASKCONTROLLERDELEGATION_ numeric(18,0), primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ numeric(18,0), TOKEN_ numeric(18,0), PROCINST_ numeric(18,0), SWIMLANINSTANCE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create generator hibernate_sequence;
+create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(18,0) not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ numeric(18,0) not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_EVENT (ID_ numeric(18,0) not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ numeric(18,0) not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), GRAPHELEMENTINDEX_ integer, NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_GROUP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ numeric(18,0), GROUP_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(18,0) not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ numeric(18,0), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ numeric(18,0), GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ numeric(18,0), NODE_ numeric(18,0), primary key (ID_))
+create table JBPM_LOG (ID_ numeric(18,0) not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ numeric(18,0), PARENT_ numeric(18,0), MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ numeric(18,0), NODE_ numeric(18,0), ENTER_ timestamp, LEAVE_ timestamp, DURATION_ numeric(18,0), NEWLONGVALUE_ numeric(18,0), TRANSITION_ numeric(18,0), CHILD_ numeric(18,0), SOURCENODE_ numeric(18,0), DESTINATIONNODE_ numeric(18,0), VARIABLEINSTANCE_ numeric(18,0), OLDBYTEARRAY_ numeric(18,0), NEWBYTEARRAY_ numeric(18,0), OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double precision, NEWDOUBLEVALUE_ double precision, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ numeric(18,0), NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ numeric(18,0), OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ numeric(18,0), OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar!
 (4000), TASKINSTANCE_ numeric(18,0), TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), STARTTASK_ numeric(18,0), primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ numeric(18,0), SUPERSTATE_ numeric(18,0), SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ numeric(18,0), DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION numeric(18,0), SCRIPT_ numeric(18,0), SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ numeric(18,0), primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ numeric(18,0), ROOTTOKEN_ numeric(18,0), SUPERPROCESSTOKEN_ numeric(18,0), primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ numeric(18,0) not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), ACTION_ numeric(18,0), PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ numeric(18,0) not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TASK (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ numeric(18,0), TASKNODE_ numeric(18,0), STARTSTATE_ numeric(18,0), ASSIGNMENTDELEGATION_ numeric(18,0), SWIMLANE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(18,0) not null, POOLEDACTOR_ numeric(18,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ numeric(18,0) not null, TASKCONTROLLERDELEGATION_ numeric(18,0), primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ numeric(18,0), TOKEN_ numeric(18,0), PROCINST_ numeric(18,0), SWIMLANINSTANCE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create generator hibernate_sequence

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,167 +1,197 @@
-create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary(1024), INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ bigint generated by default as identity (start with 1), CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_));
-create table JBPM_EVENT (ID_ bigint generated by default as identity (start with 1), EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ bigint generated by default as identity (start with 1), EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ bit, ISEXCLUSIVE_ bit, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_));
-create table JBPM_LOG (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTA!
 NCE_ bigint, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ bit, ISASYNCEXCL_ bit, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ bit, ENDTASKS_ bit, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ bit, STARTSTATE_ bigint, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ bit, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TASK (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ bit, ISSIGNALLING_ bit, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ bigint generated by default as identity (start with 1), TASKCONTROLLERDELEGATION_ bigint, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ bit, ISSUSPENDED_ bit, ISOPEN_ bit, ISSIGNALLING_ bit, ISBLOCKING_ bit, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKEN (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TRANSITION (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity (start with 1), VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
+create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary(1024), INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ bigint generated by default as identity (start with 1), CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_))
+create table JBPM_EVENT (ID_ bigint generated by default as identity (start with 1), EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ bigint generated by default as identity (start with 1), EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ bit, ISEXCLUSIVE_ bit, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_))
+create table JBPM_LOG (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTA!
 NCE_ bigint, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ bit, ISASYNCEXCL_ bit, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ bit, ENDTASKS_ bit, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ bit, STARTSTATE_ bigint, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ bit, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TASK (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ bit, ISSIGNALLING_ bit, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ bigint generated by default as identity (start with 1), TASKCONTROLLERDELEGATION_ bigint, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ bit, ISSUSPENDED_ bit, ISOPEN_ bit, ISSIGNALLING_ bit, ISBLOCKING_ bit, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKEN (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TRANSITION (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity (start with 1), VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,168 +1,198 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255) with null, ISPROPAGATIONALLOWED_ tinyint with null, ACTIONEXPRESSION_ varchar(255) with null, ISASYNC_ tinyint with null, REFERENCEDACTION_ bigint with null, ACTIONDELEGATION_ bigint with null, EVENT_ bigint with null, PROCESSDEFINITION_ bigint with null, EXPRESSION_ varchar(4000) with null, TIMERNAME_ varchar(255) with null, DUEDATE_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, TIMERACTION_ bigint with null, EVENTINDEX_ integer with null, EXCEPTIONHANDLER_ bigint with null, EXCEPTIONHANDLERINDEX_ integer with null, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255) with null, FILEDEFINITION_ bigint with null, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbyte(1024) with null, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255) with null, TIME_ date with null, MESSAGE_ varchar(4000) with null, TOKEN_ bigint with null, TASKINSTANCE_ bigint with null, TOKENINDEX_ integer with null, TASKINSTANCEINDEX_ integer with null, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255) with null, EXPRESSION_ varchar(255) with null, INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000) with null, CONFIGURATION_ varchar(4000) with null, CONFIGTYPE_ varchar(255) with null, PROCESSDEFINITION_ bigint with null, primary key (ID_));
-create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSDEFINITION_ bigint with null, NODE_ bigint with null, TRANSITION_ bigint with null, TASK_ bigint with null, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSDEFINITION_ bigint with null, GRAPHELEMENTINDEX_ integer with null, NODE_ bigint with null, TRANSITION_ bigint with null, TASK_ bigint with null, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, TYPE_ varchar(255) with null, PARENT_ bigint with null, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, ROLE_ varchar(255) with null, USER_ bigint with null, GROUP_ bigint with null, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255) with null, NAME_ varchar(255) with null, ACTION_ varchar(255) with null);
-create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, EMAIL_ varchar(255) with null, PASSWORD_ varchar(255) with null, primary key (ID_));
-create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ date with null, PROCESSINSTANCE_ bigint with null, TOKEN_ bigint with null, TASKINSTANCE_ bigint with null, ISSUSPENDED_ tinyint with null, ISEXCLUSIVE_ tinyint with null, LOCKOWNER_ varchar(255) with null, LOCKTIME_ date with null, EXCEPTION_ varchar(4000) with null, RETRIES_ integer with null, NAME_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, ACTION_ bigint with null, GRAPHELEMENTTYPE_ varchar(255) with null, GRAPHELEMENT_ bigint with null, NODE_ bigint with null, primary key (ID_));
-create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer with null, DATE_ date with null, TOKEN_ bigint with null, PARENT_ bigint with null, MESSAGE_ varchar(4000) with null, EXCEPTION_ varchar(4000) with null, ACTION_ bigint with null, NODE_ bigint with null, ENTER_ date with null, LEAVE_ date with null, DURATION_ bigint with null, NEWLONGVALUE_ bigint with null, TRANSITION_ bigint with null, CHILD_ bigint with null, SOURCENODE_ bigint with null, DESTINATIONNODE_ bigint with null, VARIABLEINSTANCE_ bigint with null, OLDBYTEARRAY_ bigint with null, NEWBYTEARRAY_ bigint with null, OLDDATEVALUE_ date with null, NEWDATEVALUE_ date with null, OLDDOUBLEVALUE_ float with null, NEWDOUBLEVALUE_ float with null, OLDLONGIDCLASS_ varchar(255) with null, OLDLONGIDVALUE_ bigint with null, NEWLONGIDCLASS_ varchar(255) with null, NEWLONGIDVALUE_ bigint with null, OLDSTRINGIDCLASS_ varchar(255) with null, OLDSTRINGIDVALUE_ varchar(255) with null, NEWSTRINGIDCLASS!
 _ varchar(255) with null, NEWSTRINGIDVALUE_ varchar(255) with null, OLDLONGVALUE_ bigint with null, OLDSTRINGVALUE_ varchar(4000) with null, NEWSTRINGVALUE_ varchar(4000) with null, TASKINSTANCE_ bigint with null, TASKACTORID_ varchar(255) with null, TASKOLDACTORID_ varchar(255) with null, SWIMLANEINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, STARTTASK_ bigint with null, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint with null, TASKMGMTDEFINITION_ bigint with null, NAME_ varchar(255) with null, primary key (ID_));
-create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, ISASYNC_ tinyint with null, ISASYNCEXCL_ tinyint with null, ACTION_ bigint with null, SUPERSTATE_ bigint with null, SUBPROCNAME_ varchar(255) with null, SUBPROCESSDEFINITION_ bigint with null, DECISIONEXPRESSION_ varchar(255) with null, DECISIONDELEGATION bigint with null, SCRIPT_ bigint with null, SIGNAL_ integer with null, CREATETASKS_ tinyint with null, ENDTASKS_ tinyint with null, NODECOLLECTIONINDEX_ integer with null, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255) with null, SWIMLANEINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, VERSION_ integer with null, ISTERMINATIONIMPLICIT_ tinyint with null, STARTSTATE_ bigint with null, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255) with null, START_ date with null, END_ date with null, ISSUSPENDED_ tinyint with null, PROCESSDEFINITION_ bigint with null, ROOTTOKEN_ bigint with null, SUPERPROCESSTOKEN_ bigint with null, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSINSTANCE_ bigint with null, ACTION_ bigint with null, PROCESSINSTANCEINDEX_ integer with null, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255) with null, ACTORIDEXPRESSION_ varchar(255) with null, POOLEDACTORSEXPRESSION_ varchar(255) with null, ASSIGNMENTDELEGATION_ bigint with null, TASKMGMTDEFINITION_ bigint with null, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255) with null, ACTORID_ varchar(255) with null, SWIMLANE_ bigint with null, TASKMGMTINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, ISBLOCKING_ tinyint with null, ISSIGNALLING_ tinyint with null, CONDITION_ varchar(255) with null, DUEDATE_ varchar(255) with null, PRIORITY_ integer with null, ACTORIDEXPRESSION_ varchar(255) with null, POOLEDACTORSEXPRESSION_ varchar(255) with null, TASKMGMTDEFINITION_ bigint with null, TASKNODE_ bigint with null, STARTSTATE_ bigint with null, ASSIGNMENTDELEGATION_ bigint with null, SWIMLANE_ bigint with null, TASKCONTROLLER_ bigint with null, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint with null, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, ACTORID_ varchar(255) with null, CREATE_ date with null, START_ date with null, END_ date with null, DUEDATE_ date with null, PRIORITY_ integer with null, ISCANCELLED_ tinyint with null, ISSUSPENDED_ tinyint with null, ISOPEN_ tinyint with null, ISSIGNALLING_ tinyint with null, ISBLOCKING_ tinyint with null, TASK_ bigint with null, TOKEN_ bigint with null, PROCINST_ bigint with null, SWIMLANINSTANCE_ bigint with null, TASKMGMTINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255) with null, START_ date with null, END_ date with null, NODEENTER_ date with null, NEXTLOGINDEX_ integer with null, ISABLETOREACTIVATEPARENT_ tinyint with null, ISTERMINATIONIMPLICIT_ tinyint with null, ISSUSPENDED_ tinyint with null, LOCK_ varchar(255) with null, NODE_ bigint with null, PROCESSINSTANCE_ bigint with null, PARENT_ bigint with null, SUBPROCESSINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint with null, CONTEXTINSTANCE_ bigint with null, primary key (ID_));
-create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, FROM_ bigint with null, TO_ bigint with null, CONDITION_ varchar(255) with null, FROMINDEX_ integer with null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255) with null, ACCESS_ varchar(255) with null, MAPPEDNAME_ varchar(255) with null, SCRIPT_ bigint with null, PROCESSSTATE_ bigint with null, TASKCONTROLLER_ bigint with null, INDEX_ integer with null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, CONVERTER_ char(1) with null, TOKEN_ bigint with null, TOKENVARIABLEMAP_ bigint with null, PROCESSINSTANCE_ bigint with null, BYTEARRAYVALUE_ bigint with null, DATEVALUE_ date with null, DOUBLEVALUE_ float with null, LONGIDCLASS_ varchar(255) with null, LONGVALUE_ bigint with null, STRINGIDCLASS_ varchar(255) with null, STRINGVALUE_ varchar(4000) with null, TASKINSTANCE_ bigint with null, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create sequence hibernate_sequence;
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255) with null, ISPROPAGATIONALLOWED_ tinyint with null, ACTIONEXPRESSION_ varchar(255) with null, ISASYNC_ tinyint with null, REFERENCEDACTION_ bigint with null, ACTIONDELEGATION_ bigint with null, EVENT_ bigint with null, PROCESSDEFINITION_ bigint with null, EXPRESSION_ varchar(4000) with null, TIMERNAME_ varchar(255) with null, DUEDATE_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, TIMERACTION_ bigint with null, EVENTINDEX_ integer with null, EXCEPTIONHANDLER_ bigint with null, EXCEPTIONHANDLERINDEX_ integer with null, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255) with null, FILEDEFINITION_ bigint with null, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbyte(1024) with null, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255) with null, TIME_ timestamp with time zone with null, MESSAGE_ varchar(4000) with null, TOKEN_ bigint with null, TASKINSTANCE_ bigint with null, TOKENINDEX_ integer with null, TASKINSTANCEINDEX_ integer with null, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255) with null, EXPRESSION_ varchar(255) with null, INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000) with null, CONFIGURATION_ varchar(4000) with null, CONFIGTYPE_ varchar(255) with null, PROCESSDEFINITION_ bigint with null, primary key (ID_))
+create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSDEFINITION_ bigint with null, NODE_ bigint with null, TRANSITION_ bigint with null, TASK_ bigint with null, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSDEFINITION_ bigint with null, GRAPHELEMENTINDEX_ integer with null, NODE_ bigint with null, TRANSITION_ bigint with null, TASK_ bigint with null, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, TYPE_ varchar(255) with null, PARENT_ bigint with null, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, ROLE_ varchar(255) with null, USER_ bigint with null, GROUP_ bigint with null, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255) with null, NAME_ varchar(255) with null, ACTION_ varchar(255) with null)
+create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, EMAIL_ varchar(255) with null, PASSWORD_ varchar(255) with null, primary key (ID_))
+create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp with time zone with null, PROCESSINSTANCE_ bigint with null, TOKEN_ bigint with null, TASKINSTANCE_ bigint with null, ISSUSPENDED_ tinyint with null, ISEXCLUSIVE_ tinyint with null, LOCKOWNER_ varchar(255) with null, LOCKTIME_ timestamp with time zone with null, EXCEPTION_ varchar(4000) with null, RETRIES_ integer with null, NAME_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, ACTION_ bigint with null, GRAPHELEMENTTYPE_ varchar(255) with null, GRAPHELEMENT_ bigint with null, NODE_ bigint with null, primary key (ID_))
+create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer with null, DATE_ timestamp with time zone with null, TOKEN_ bigint with null, PARENT_ bigint with null, MESSAGE_ varchar(4000) with null, EXCEPTION_ varchar(4000) with null, ACTION_ bigint with null, NODE_ bigint with null, ENTER_ timestamp with time zone with null, LEAVE_ timestamp with time zone with null, DURATION_ bigint with null, NEWLONGVALUE_ bigint with null, TRANSITION_ bigint with null, CHILD_ bigint with null, SOURCENODE_ bigint with null, DESTINATIONNODE_ bigint with null, VARIABLEINSTANCE_ bigint with null, OLDBYTEARRAY_ bigint with null, NEWBYTEARRAY_ bigint with null, OLDDATEVALUE_ timestamp with time zone with null, NEWDATEVALUE_ timestamp with time zone with null, OLDDOUBLEVALUE_ float with null, NEWDOUBLEVALUE_ float with null, OLDLONGIDCLASS_ varchar(255) with null, OLDLONGIDVALUE_ bigint with null, NEWLONGIDCLASS_ varchar(255) with null, NEWLONGIDVALUE_ bigint with null, !
 OLDSTRINGIDCLASS_ varchar(255) with null, OLDSTRINGIDVALUE_ varchar(255) with null, NEWSTRINGIDCLASS_ varchar(255) with null, NEWSTRINGIDVALUE_ varchar(255) with null, OLDLONGVALUE_ bigint with null, OLDSTRINGVALUE_ varchar(4000) with null, NEWSTRINGVALUE_ varchar(4000) with null, TASKINSTANCE_ bigint with null, TASKACTORID_ varchar(255) with null, TASKOLDACTORID_ varchar(255) with null, SWIMLANEINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, STARTTASK_ bigint with null, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint with null, TASKMGMTDEFINITION_ bigint with null, NAME_ varchar(255) with null, primary key (ID_))
+create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, ISASYNC_ tinyint with null, ISASYNCEXCL_ tinyint with null, ACTION_ bigint with null, SUPERSTATE_ bigint with null, SUBPROCNAME_ varchar(255) with null, SUBPROCESSDEFINITION_ bigint with null, DECISIONEXPRESSION_ varchar(255) with null, DECISIONDELEGATION bigint with null, SCRIPT_ bigint with null, SIGNAL_ integer with null, CREATETASKS_ tinyint with null, ENDTASKS_ tinyint with null, NODECOLLECTIONINDEX_ integer with null, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255) with null, SWIMLANEINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, VERSION_ integer with null, ISTERMINATIONIMPLICIT_ tinyint with null, STARTSTATE_ bigint with null, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255) with null, START_ timestamp with time zone with null, END_ timestamp with time zone with null, ISSUSPENDED_ tinyint with null, PROCESSDEFINITION_ bigint with null, ROOTTOKEN_ bigint with null, SUPERPROCESSTOKEN_ bigint with null, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255) with null, TYPE_ char(1) with null, GRAPHELEMENT_ bigint with null, PROCESSINSTANCE_ bigint with null, ACTION_ bigint with null, PROCESSINSTANCEINDEX_ integer with null, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255) with null, ACTORIDEXPRESSION_ varchar(255) with null, POOLEDACTORSEXPRESSION_ varchar(255) with null, ASSIGNMENTDELEGATION_ bigint with null, TASKMGMTDEFINITION_ bigint with null, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255) with null, ACTORID_ varchar(255) with null, SWIMLANE_ bigint with null, TASKMGMTINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, ISBLOCKING_ tinyint with null, ISSIGNALLING_ tinyint with null, CONDITION_ varchar(255) with null, DUEDATE_ varchar(255) with null, PRIORITY_ integer with null, ACTORIDEXPRESSION_ varchar(255) with null, POOLEDACTORSEXPRESSION_ varchar(255) with null, TASKMGMTDEFINITION_ bigint with null, TASKNODE_ bigint with null, STARTSTATE_ bigint with null, ASSIGNMENTDELEGATION_ bigint with null, SWIMLANE_ bigint with null, TASKCONTROLLER_ bigint with null, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint with null, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, ACTORID_ varchar(255) with null, CREATE_ timestamp with time zone with null, START_ timestamp with time zone with null, END_ timestamp with time zone with null, DUEDATE_ timestamp with time zone with null, PRIORITY_ integer with null, ISCANCELLED_ tinyint with null, ISSUSPENDED_ tinyint with null, ISOPEN_ tinyint with null, ISSIGNALLING_ tinyint with null, ISBLOCKING_ tinyint with null, TASK_ bigint with null, TOKEN_ bigint with null, PROCINST_ bigint with null, SWIMLANINSTANCE_ bigint with null, TASKMGMTINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255) with null, START_ timestamp with time zone with null, END_ timestamp with time zone with null, NODEENTER_ timestamp with time zone with null, NEXTLOGINDEX_ integer with null, ISABLETOREACTIVATEPARENT_ tinyint with null, ISTERMINATIONIMPLICIT_ tinyint with null, ISSUSPENDED_ tinyint with null, LOCK_ varchar(255) with null, NODE_ bigint with null, PROCESSINSTANCE_ bigint with null, PARENT_ bigint with null, SUBPROCESSINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint with null, CONTEXTINSTANCE_ bigint with null, primary key (ID_))
+create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, FROM_ bigint with null, TO_ bigint with null, CONDITION_ varchar(255) with null, FROMINDEX_ integer with null, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255) with null, ACCESS_ varchar(255) with null, MAPPEDNAME_ varchar(255) with null, SCRIPT_ bigint with null, PROCESSSTATE_ bigint with null, TASKCONTROLLER_ bigint with null, INDEX_ integer with null, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, CONVERTER_ char(1) with null, TOKEN_ bigint with null, TOKENVARIABLEMAP_ bigint with null, PROCESSINSTANCE_ bigint with null, BYTEARRAYVALUE_ bigint with null, DATEVALUE_ timestamp with time zone with null, DOUBLEVALUE_ float with null, LONGIDCLASS_ varchar(255) with null, LONGVALUE_ bigint with null, STRINGIDCLASS_ varchar(255) with null, STRINGVALUE_ varchar(4000) with null, TASKINSTANCE_ bigint with null, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create sequence hibernate_sequence

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,169 +1,198 @@
-delete from RDB$GENERATORS where RDB$GENERATOR_NAME = 'HIBERNATE_SEQUENCE';
-create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(18,0) not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ numeric(18,0) not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_EVENT (ID_ numeric(18,0) not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ numeric(18,0) not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), GRAPHELEMENTINDEX_ integer, NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_GROUP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ numeric(18,0), GROUP_ numeric(18,0), primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(18,0) not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ numeric(18,0), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ numeric(18,0), GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ numeric(18,0), NODE_ numeric(18,0), primary key (ID_));
-create table JBPM_LOG (ID_ numeric(18,0) not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ numeric(18,0), PARENT_ numeric(18,0), MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ numeric(18,0), NODE_ numeric(18,0), ENTER_ timestamp, LEAVE_ timestamp, DURATION_ numeric(18,0), NEWLONGVALUE_ numeric(18,0), TRANSITION_ numeric(18,0), CHILD_ numeric(18,0), SOURCENODE_ numeric(18,0), DESTINATIONNODE_ numeric(18,0), VARIABLEINSTANCE_ numeric(18,0), OLDBYTEARRAY_ numeric(18,0), NEWBYTEARRAY_ numeric(18,0), OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double precision, NEWDOUBLEVALUE_ double precision, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ numeric(18,0), NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ numeric(18,0), OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ numeric(18,0), OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar!
 (4000), TASKINSTANCE_ numeric(18,0), TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), STARTTASK_ numeric(18,0), primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ numeric(18,0), SUPERSTATE_ numeric(18,0), SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ numeric(18,0), DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION numeric(18,0), SCRIPT_ numeric(18,0), SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ numeric(18,0), primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ numeric(18,0), ROOTTOKEN_ numeric(18,0), SUPERPROCESSTOKEN_ numeric(18,0), primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ numeric(18,0) not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), ACTION_ numeric(18,0), PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ numeric(18,0) not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TASK (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ numeric(18,0), TASKNODE_ numeric(18,0), STARTSTATE_ numeric(18,0), ASSIGNMENTDELEGATION_ numeric(18,0), SWIMLANE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(18,0) not null, POOLEDACTOR_ numeric(18,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ numeric(18,0) not null, TASKCONTROLLERDELEGATION_ numeric(18,0), primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ numeric(18,0), TOKEN_ numeric(18,0), PROCINST_ numeric(18,0), SWIMLANINSTANCE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_));
-create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create generator hibernate_sequence;
+create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(18,0) not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ numeric(18,0) not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_EVENT (ID_ numeric(18,0) not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ numeric(18,0) not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), GRAPHELEMENTINDEX_ integer, NODE_ numeric(18,0), TRANSITION_ numeric(18,0), TASK_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_GROUP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ numeric(18,0), GROUP_ numeric(18,0), primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(18,0) not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ numeric(18,0), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), ISSUSPENDED_ smallint, ISEXCLUSIVE_ smallint, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ numeric(18,0), GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ numeric(18,0), NODE_ numeric(18,0), primary key (ID_))
+create table JBPM_LOG (ID_ numeric(18,0) not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ numeric(18,0), PARENT_ numeric(18,0), MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ numeric(18,0), NODE_ numeric(18,0), ENTER_ timestamp, LEAVE_ timestamp, DURATION_ numeric(18,0), NEWLONGVALUE_ numeric(18,0), TRANSITION_ numeric(18,0), CHILD_ numeric(18,0), SOURCENODE_ numeric(18,0), DESTINATIONNODE_ numeric(18,0), VARIABLEINSTANCE_ numeric(18,0), OLDBYTEARRAY_ numeric(18,0), NEWBYTEARRAY_ numeric(18,0), OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double precision, NEWDOUBLEVALUE_ double precision, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ numeric(18,0), NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ numeric(18,0), OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ numeric(18,0), OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar!
 (4000), TASKINSTANCE_ numeric(18,0), TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), STARTTASK_ numeric(18,0), primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISASYNC_ smallint, ISASYNCEXCL_ smallint, ACTION_ numeric(18,0), SUPERSTATE_ numeric(18,0), SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ numeric(18,0), DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION numeric(18,0), SCRIPT_ numeric(18,0), SIGNAL_ integer, CREATETASKS_ smallint, ENDTASKS_ smallint, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ numeric(18,0) not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ smallint, STARTSTATE_ numeric(18,0), primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ smallint, PROCESSDEFINITION_ numeric(18,0), ROOTTOKEN_ numeric(18,0), SUPERPROCESSTOKEN_ numeric(18,0), primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ numeric(18,0) not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), ACTION_ numeric(18,0), PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ numeric(18,0) not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ numeric(18,0), TASKMGMTDEFINITION_ numeric(18,0), primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TASK (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), ISBLOCKING_ smallint, ISSIGNALLING_ smallint, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ numeric(18,0), TASKNODE_ numeric(18,0), STARTSTATE_ numeric(18,0), ASSIGNMENTDELEGATION_ numeric(18,0), SWIMLANE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(18,0) not null, POOLEDACTOR_ numeric(18,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ numeric(18,0) not null, TASKCONTROLLERDELEGATION_ numeric(18,0), primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ smallint, ISSUSPENDED_ smallint, ISOPEN_ smallint, ISSIGNALLING_ smallint, ISBLOCKING_ smallint, TASK_ numeric(18,0), TOKEN_ numeric(18,0), PROCINST_ numeric(18,0), SWIMLANINSTANCE_ numeric(18,0), TASKMGMTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_))
+create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create generator hibernate_sequence

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,168 +1,198 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_));
-create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255));
-create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_));
-create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ bit, ISEXCLUSIVE_ bit, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_));
-create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_));
-create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ bit, ISASYNCEXCL_ bit, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ bit, ENDTASKS_ bit, NODECOLLECTIONINDEX_ integer, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ bit, STARTSTATE_ bigint, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ bit, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ bit, ISSIGNALLING_ bit, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ bit, ISSUSPENDED_ bit, ISOPEN_ bit, ISSIGNALLING_ bit, ISBLOCKING_ bit, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
-create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create sequence hibernate_sequence;
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ bigint not null, TRANSITIONNAME_ varchar(255), EXPRESSION_ varchar(255), INDEX_ integer not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ bigint not null, CLASSNAME_ varchar(4000), CONFIGURATION_ varchar(4000), CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_))
+create table JBPM_EVENT (ID_ bigint not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ bigint not null, EXCEPTIONCLASSNAME_ varchar(4000), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), TYPE_ varchar(255), PARENT_ bigint, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), ROLE_ varchar(255), USER_ bigint, GROUP_ bigint, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ bigint not null, CLASS_ varchar(255), NAME_ varchar(255), ACTION_ varchar(255))
+create table JBPM_ID_USER (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), EMAIL_ varchar(255), PASSWORD_ varchar(255), primary key (ID_))
+create table JBPM_JOB (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ timestamp, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ bit, ISEXCLUSIVE_ bit, LOCKOWNER_ varchar(255), LOCKTIME_ timestamp, EXCEPTION_ varchar(4000), RETRIES_ integer, NAME_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), ACTION_ bigint, GRAPHELEMENTTYPE_ varchar(255), GRAPHELEMENT_ bigint, NODE_ bigint, primary key (ID_))
+create table JBPM_LOG (ID_ bigint not null, CLASS_ char(1) not null, INDEX_ integer, DATE_ timestamp, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ varchar(4000), EXCEPTION_ varchar(4000), ACTION_ bigint, NODE_ bigint, ENTER_ timestamp, LEAVE_ timestamp, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ timestamp, NEWDATEVALUE_ timestamp, OLDDOUBLEVALUE_ double, NEWDOUBLEVALUE_ double, OLDLONGIDCLASS_ varchar(255), OLDLONGIDVALUE_ bigint, NEWLONGIDCLASS_ varchar(255), NEWLONGIDVALUE_ bigint, OLDSTRINGIDCLASS_ varchar(255), OLDSTRINGIDVALUE_ varchar(255), NEWSTRINGIDCLASS_ varchar(255), NEWSTRINGIDVALUE_ varchar(255), OLDLONGVALUE_ bigint, OLDSTRINGVALUE_ varchar(4000), NEWSTRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(4000), PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, PROCESSINSTANCE_ bigint, TASKMGMTDEFINITION_ bigint, NAME_ varchar(255), primary key (ID_))
+create table JBPM_NODE (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISASYNC_ bit, ISASYNCEXCL_ bit, ACTION_ bigint, SUPERSTATE_ bigint, SUBPROCNAME_ varchar(255), SUBPROCESSDEFINITION_ bigint, DECISIONEXPRESSION_ varchar(255), DECISIONDELEGATION bigint, SCRIPT_ bigint, SIGNAL_ integer, CREATETASKS_ bit, ENDTASKS_ bit, NODECOLLECTIONINDEX_ integer, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ bigint not null, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), VERSION_ integer, ISTERMINATIONIMPLICIT_ bit, STARTSTATE_ bigint, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ bigint not null, VERSION_ integer not null, KEY_ varchar(255), START_ timestamp, END_ timestamp, ISSUSPENDED_ bit, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ bigint not null, VERSION_ integer not null, EVENTTYPE_ varchar(255), TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSINSTANCE_ bigint, ACTION_ bigint, PROCESSINSTANCEINDEX_ integer, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ bigint not null, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), ACTORID_ varchar(255), SWIMLANE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TASK (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, ISBLOCKING_ bit, ISSIGNALLING_ bit, CONDITION_ varchar(255), DUEDATE_ varchar(255), PRIORITY_ integer, ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), TASKMGMTDEFINITION_ bigint, TASKNODE_ bigint, STARTSTATE_ bigint, ASSIGNMENTDELEGATION_ bigint, SWIMLANE_ bigint, TASKCONTROLLER_ bigint, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ bigint not null, POOLEDACTOR_ bigint not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ bigint not null, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), ACTORID_ varchar(255), CREATE_ timestamp, START_ timestamp, END_ timestamp, DUEDATE_ timestamp, PRIORITY_ integer, ISCANCELLED_ bit, ISSUSPENDED_ bit, ISOPEN_ bit, ISSIGNALLING_ bit, ISBLOCKING_ bit, TASK_ bigint, TOKEN_ bigint, PROCINST_ bigint, SWIMLANINSTANCE_ bigint, TASKMGMTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_))
+create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create sequence hibernate_sequence

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,167 +1,197 @@
-create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ numeric(19,0) identity not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_EVENT (ID_ numeric(19,0) identity not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ numeric(19,0) identity not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ numeric(19,0) null, GROUP_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null);
-create table JBPM_ID_USER (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_));
-create table JBPM_JOB (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ datetime null, PROCESSINSTANCE_ numeric(19,0) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, ISSUSPENDED_ tinyint null, ISEXCLUSIVE_ tinyint null, LOCKOWNER_ varchar(255) null, LOCKTIME_ datetime null, EXCEPTION_ varchar(4000) null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ numeric(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ numeric(19,0) null, NODE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_LOG (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ datetime null, TOKEN_ numeric(19,0) null, PARENT_ numeric(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ numeric(19,0) null, NODE_ numeric(19,0) null, ENTER_ datetime null, LEAVE_ datetime null, DURATION_ numeric(19,0) null, NEWLONGVALUE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, CHILD_ numeric(19,0) null, SOURCENODE_ numeric(19,0) null, DESTINATIONNODE_ numeric(19,0) null, VARIABLEINSTANCE_ numeric(19,0) null, OLDBYTEARRAY_ numeric(19,0) null, NEWBYTEARRAY_ numeric(19,0) null, OLDDATEVALUE_ datetime null, NEWDATEVALUE_ datetime null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ numeric(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ numeric(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NE!
 WSTRINGIDCLASS_ varchar(255) null, NEWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ numeric(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, STARTTASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, NAME_ varchar(255) null, primary key (ID_));
-create table JBPM_NODE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISASYNC_ tinyint null, ISASYNCEXCL_ tinyint null, ACTION_ numeric(19,0) null, SUPERSTATE_ numeric(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ numeric(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION numeric(19,0) null, SCRIPT_ numeric(19,0) null, SIGNAL_ int null, CREATETASKS_ tinyint null, ENDTASKS_ tinyint null, NODECOLLECTIONINDEX_ int null, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ tinyint null, STARTSTATE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, KEY_ varchar(255) null, START_ datetime null, END_ datetime null, ISSUSPENDED_ tinyint null, PROCESSDEFINITION_ numeric(19,0) null, ROOTTOKEN_ numeric(19,0) null, SUPERPROCESSTOKEN_ numeric(19,0) null, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ numeric(19,0) identity not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, ACTION_ numeric(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASK (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISBLOCKING_ tinyint null, ISSIGNALLING_ tinyint null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ numeric(19,0) null, TASKNODE_ numeric(19,0) null, STARTSTATE_ numeric(19,0) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, SWIMLANE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(19,0) not null, POOLEDACTOR_ numeric(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ numeric(19,0) identity not null, TASKCONTROLLERDELEGATION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ datetime null, START_ datetime null, END_ datetime null, DUEDATE_ datetime null, PRIORITY_ int null, ISCANCELLED_ tinyint null, ISSUSPENDED_ tinyint null, ISOPEN_ tinyint null, ISSIGNALLING_ tinyint null, ISBLOCKING_ tinyint null, TASK_ numeric(19,0) null, TOKEN_ numeric(19,0) null, PROCINST_ numeric(19,0) null, SWIMLANINSTANCE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
+create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ numeric(19,0) identity not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_EVENT (ID_ numeric(19,0) identity not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ numeric(19,0) identity not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ numeric(19,0) null, GROUP_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null)
+create table JBPM_ID_USER (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_))
+create table JBPM_JOB (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ datetime null, PROCESSINSTANCE_ numeric(19,0) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, ISSUSPENDED_ tinyint null, ISEXCLUSIVE_ tinyint null, LOCKOWNER_ varchar(255) null, LOCKTIME_ datetime null, EXCEPTION_ varchar(4000) null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ numeric(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ numeric(19,0) null, NODE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_LOG (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ datetime null, TOKEN_ numeric(19,0) null, PARENT_ numeric(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ numeric(19,0) null, NODE_ numeric(19,0) null, ENTER_ datetime null, LEAVE_ datetime null, DURATION_ numeric(19,0) null, NEWLONGVALUE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, CHILD_ numeric(19,0) null, SOURCENODE_ numeric(19,0) null, DESTINATIONNODE_ numeric(19,0) null, VARIABLEINSTANCE_ numeric(19,0) null, OLDBYTEARRAY_ numeric(19,0) null, NEWBYTEARRAY_ numeric(19,0) null, OLDDATEVALUE_ datetime null, NEWDATEVALUE_ datetime null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ numeric(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ numeric(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NE!
 WSTRINGIDCLASS_ varchar(255) null, NEWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ numeric(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, STARTTASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, NAME_ varchar(255) null, primary key (ID_))
+create table JBPM_NODE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISASYNC_ tinyint null, ISASYNCEXCL_ tinyint null, ACTION_ numeric(19,0) null, SUPERSTATE_ numeric(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ numeric(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION numeric(19,0) null, SCRIPT_ numeric(19,0) null, SIGNAL_ int null, CREATETASKS_ tinyint null, ENDTASKS_ tinyint null, NODECOLLECTIONINDEX_ int null, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ tinyint null, STARTSTATE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, KEY_ varchar(255) null, START_ datetime null, END_ datetime null, ISSUSPENDED_ tinyint null, PROCESSDEFINITION_ numeric(19,0) null, ROOTTOKEN_ numeric(19,0) null, SUPERPROCESSTOKEN_ numeric(19,0) null, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ numeric(19,0) identity not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, ACTION_ numeric(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASK (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISBLOCKING_ tinyint null, ISSIGNALLING_ tinyint null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ numeric(19,0) null, TASKNODE_ numeric(19,0) null, STARTSTATE_ numeric(19,0) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, SWIMLANE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(19,0) not null, POOLEDACTOR_ numeric(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ numeric(19,0) identity not null, TASKCONTROLLERDELEGATION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ datetime null, START_ datetime null, END_ datetime null, DUEDATE_ datetime null, PRIORITY_ int null, ISCANCELLED_ tinyint null, ISSUSPENDED_ tinyint null, ISOPEN_ tinyint null, ISSIGNALLING_ tinyint null, ISBLOCKING_ tinyint null, TASK_ numeric(19,0) null, TOKEN_ numeric(19,0) null, PROCINST_ numeric(19,0) null, SWIMLANINSTANCE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -30,9 +30,11 @@
 create table JBPM_TRANSITION (ID_ bigint not null auto_increment, NAME_ varchar(255), DESCRIPTION_ text, PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_)) type=InnoDB;
 create table JBPM_VARIABLEACCESS (ID_ bigint not null auto_increment, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_)) type=InnoDB;
 create table JBPM_VARIABLEINSTANCE (ID_ bigint not null auto_increment, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ datetime, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ text, TASKINSTANCE_ bigint, primary key (ID_)) type=InnoDB;
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_);
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_);
 alter table JBPM_ACTION add index FK_ACTION_EVENT (EVENT_), add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT (ID_);
 alter table JBPM_ACTION add index FK_ACTION_EXPTHDL (EXCEPTIONHANDLER_), add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER (ID_);
 alter table JBPM_ACTION add index FK_ACTION_PROCDEF (PROCESSDEFINITION_), add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_);
@@ -55,6 +57,8 @@
 alter table JBPM_ID_GROUP add index FK_ID_GRP_PARENT (PARENT_), add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP (ID_);
 alter table JBPM_ID_MEMBERSHIP add index FK_ID_MEMSHIP_GRP (GROUP_), add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP (ID_);
 alter table JBPM_ID_MEMBERSHIP add index FK_ID_MEMSHIP_USR (USER_), add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER (ID_);
+create index IDX_JOB_NODE on JBPM_JOB (NODE_);
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_);
 create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
 create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
 create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
@@ -63,6 +67,19 @@
 alter table JBPM_JOB add index FK_JOB_PRINST (PROCESSINSTANCE_), add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_);
 alter table JBPM_JOB add index FK_JOB_ACTION (ACTION_), add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION (ID_);
 alter table JBPM_JOB add index FK_JOB_TSKINST (TASKINSTANCE_), add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE (ID_);
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_);
+create index IDX_LOG_NODE on JBPM_LOG (NODE_);
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_);
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_);
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_);
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_);
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_);
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_);
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_);
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_);
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_);
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_);
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_);
 alter table JBPM_LOG add index FK_LOG_SOURCENODE (SOURCENODE_), add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE (ID_);
 alter table JBPM_LOG add index FK_LOG_TOKEN (TOKEN_), add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN (ID_);
 alter table JBPM_LOG add index FK_LOG_OLDBYTES (OLDBYTEARRAY_), add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY (ID_);
@@ -76,15 +93,19 @@
 alter table JBPM_LOG add index FK_LOG_ACTION (ACTION_), add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION (ID_);
 alter table JBPM_LOG add index FK_LOG_VARINST (VARIABLEINSTANCE_), add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE (ID_);
 alter table JBPM_LOG add index FK_LOG_TRANSITION (TRANSITION_), add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION (ID_);
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_);
 create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
 alter table JBPM_MODULEDEFINITION add index FK_TSKDEF_START (STARTTASK_), add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK (ID_);
 alter table JBPM_MODULEDEFINITION add index FK_MODDEF_PROCDEF (PROCESSDEFINITION_), add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_);
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_);
 create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
 alter table JBPM_MODULEINSTANCE add index FK_TASKMGTINST_TMD (TASKMGMTDEFINITION_), add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION (ID_);
 alter table JBPM_MODULEINSTANCE add index FK_MODINST_PRCINST (PROCESSINSTANCE_), add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_);
 create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_);
 create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
 create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION);
 create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
 alter table JBPM_NODE add index FK_PROCST_SBPRCDEF (SUBPROCESSDEFINITION_), add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_);
 alter table JBPM_NODE add index FK_NODE_PROCDEF (PROCESSDEFINITION_), add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_);
@@ -108,11 +129,18 @@
 create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
 alter table JBPM_RUNTIMEACTION add index FK_RTACTN_PROCINST (PROCESSINSTANCE_), add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_);
 alter table JBPM_RUNTIMEACTION add index FK_RTACTN_ACTION (ACTION_), add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION (ID_);
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_);
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_);
 alter table JBPM_SWIMLANE add index FK_SWL_ASSDEL (ASSIGNMENTDELEGATION_), add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION (ID_);
 alter table JBPM_SWIMLANE add index FK_SWL_TSKMGMTDEF (TASKMGMTDEFINITION_), add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION (ID_);
 create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_);
 alter table JBPM_SWIMLANEINSTANCE add index FK_SWIMLANEINST_TM (TASKMGMTINSTANCE_), add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE (ID_);
 alter table JBPM_SWIMLANEINSTANCE add index FK_SWIMLANEINST_SL (SWIMLANE_), add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE (ID_);
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_);
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_);
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_);
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_);
 create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
 create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
 create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
@@ -125,6 +153,7 @@
 alter table JBPM_TASK add index FK_TASK_SWIMLANE (SWIMLANE_), add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE (ID_);
 alter table JBPM_TASKACTORPOOL add index FK_TSKACTPOL_PLACT (POOLEDACTOR_), add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR (ID_);
 alter table JBPM_TASKACTORPOOL add index FK_TASKACTPL_TSKI (TASKINSTANCE_), add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE (ID_);
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_);
 alter table JBPM_TASKCONTROLLER add index FK_TSKCTRL_DELEG (TASKCONTROLLERDELEGATION_), add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION (ID_);
 create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
 create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
@@ -159,6 +188,7 @@
 alter table JBPM_VARIABLEACCESS add index FK_VARACC_PROCST (PROCESSSTATE_), add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE (ID_);
 create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
 create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_);
 create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
 alter table JBPM_VARIABLEINSTANCE add index FK_VARINST_TK (TOKEN_), add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN (ID_);
 alter table JBPM_VARIABLEINSTANCE add index FK_VARINST_TKVARMP (TOKENVARIABLEMAP_), add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP (ID_);

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -30,9 +30,11 @@
 create table JBPM_TRANSITION (ID_ number(19,0) not null, NAME_ varchar2(255 char), DESCRIPTION_ varchar2(4000 char), PROCESSDEFINITION_ number(19,0), FROM_ number(19,0), TO_ number(19,0), CONDITION_ varchar2(255 char), FROMINDEX_ number(10,0), primary key (ID_));
 create table JBPM_VARIABLEACCESS (ID_ number(19,0) not null, VARIABLENAME_ varchar2(255 char), ACCESS_ varchar2(255 char), MAPPEDNAME_ varchar2(255 char), SCRIPT_ number(19,0), PROCESSSTATE_ number(19,0), TASKCONTROLLER_ number(19,0), INDEX_ number(10,0), primary key (ID_));
 create table JBPM_VARIABLEINSTANCE (ID_ number(19,0) not null, CLASS_ char(1 char) not null, VERSION_ number(10,0) not null, NAME_ varchar2(255 char), CONVERTER_ char(1 char), TOKEN_ number(19,0), TOKENVARIABLEMAP_ number(19,0), PROCESSINSTANCE_ number(19,0), BYTEARRAYVALUE_ number(19,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar2(255 char), LONGVALUE_ number(19,0), STRINGIDCLASS_ varchar2(255 char), STRINGVALUE_ varchar2(4000 char), TASKINSTANCE_ number(19,0), primary key (ID_));
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_);
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_);
 alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
 alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
 alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
@@ -55,6 +57,8 @@
 alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
 alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
 alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
+create index IDX_JOB_NODE on JBPM_JOB (NODE_);
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_);
 create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
 create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
 create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
@@ -63,6 +67,19 @@
 alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
 alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_);
+create index IDX_LOG_NODE on JBPM_LOG (NODE_);
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_);
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_);
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_);
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_);
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_);
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_);
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_);
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_);
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_);
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_);
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_);
 alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
 alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
 alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
@@ -76,15 +93,19 @@
 alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
 alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
 alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_);
 create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
 alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
 alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_);
 create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
 alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
 alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_);
 create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
 create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION);
 create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
 alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
 alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
@@ -108,11 +129,18 @@
 create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
 alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_);
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_);
 alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
 alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
 create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_);
 alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
 alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_);
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_);
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_);
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_);
 create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
 create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
 create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
@@ -125,6 +153,7 @@
 alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
 alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
 alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_);
 alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
 create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
 create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
@@ -159,6 +188,7 @@
 alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
 create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
 create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_);
 create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
 alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
 alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -30,9 +30,11 @@
 create table JBPM_TRANSITION (ID_ int8 not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ int8, FROM_ int8, TO_ int8, CONDITION_ varchar(255), FROMINDEX_ int4, primary key (ID_));
 create table JBPM_VARIABLEACCESS (ID_ int8 not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ int8, PROCESSSTATE_ int8, TASKCONTROLLER_ int8, INDEX_ int4, primary key (ID_));
 create table JBPM_VARIABLEINSTANCE (ID_ int8 not null, CLASS_ char(1) not null, VERSION_ int4 not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ int8, TOKENVARIABLEMAP_ int8, PROCESSINSTANCE_ int8, BYTEARRAYVALUE_ int8, DATEVALUE_ timestamp, DOUBLEVALUE_ float8, LONGIDCLASS_ varchar(255), LONGVALUE_ int8, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ int8, primary key (ID_));
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_);
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_);
 alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
 alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
 alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
@@ -55,6 +57,8 @@
 alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
 alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
 alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
+create index IDX_JOB_NODE on JBPM_JOB (NODE_);
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_);
 create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
 create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
 create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
@@ -63,6 +67,19 @@
 alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
 alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_);
+create index IDX_LOG_NODE on JBPM_LOG (NODE_);
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_);
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_);
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_);
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_);
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_);
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_);
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_);
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_);
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_);
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_);
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_);
 alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
 alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
 alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
@@ -76,15 +93,19 @@
 alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
 alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
 alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_);
 create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
 alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
 alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_);
 create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
 alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
 alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_);
 create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
 create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION);
 create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
 alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
 alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
@@ -108,11 +129,18 @@
 create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
 alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
 alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_);
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_);
 alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
 alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
 create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_);
 alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
 alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_);
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_);
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_);
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_);
 create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
 create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
 create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
@@ -125,6 +153,7 @@
 alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
 alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
 alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_);
 alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
 create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
 create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
@@ -159,6 +188,7 @@
 alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
 create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
 create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_);
 create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
 alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
 alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,168 +1,198 @@
-create table JBPM_ACTION (ID_ fixed(19,0) not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ boolean null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ boolean null, REFERENCEDACTION_ fixed(19,0) null, ACTIONDELEGATION_ fixed(19,0) null, EVENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ fixed(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ fixed(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ fixed(19,0) not null, NAME_ varchar(255) null, FILEDEFINITION_ fixed(19,0) null, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ fixed(19,0) not null, BYTES_ long byte null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ fixed(19,0) not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ timestamp null, MESSAGE_ varchar(4000) null, TOKEN_ fixed(19,0) null, TASKINSTANCE_ fixed(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ fixed(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ fixed(19,0) not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ fixed(19,0) null, primary key (ID_));
-create table JBPM_EVENT (ID_ fixed(19,0) not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, NODE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, TASK_ fixed(19,0) null, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ fixed(19,0) not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, TASK_ fixed(19,0) null, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ fixed(19,0) null, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ fixed(19,0) null, GROUP_ fixed(19,0) null, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ fixed(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null);
-create table JBPM_ID_USER (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_));
-create table JBPM_JOB (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ timestamp null, PROCESSINSTANCE_ fixed(19,0) null, TOKEN_ fixed(19,0) null, TASKINSTANCE_ fixed(19,0) null, ISSUSPENDED_ boolean null, ISEXCLUSIVE_ boolean null, LOCKOWNER_ varchar(255) null, LOCKTIME_ timestamp null, EXCEPTION_ varchar(4000) null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ fixed(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ fixed(19,0) null, NODE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_LOG (ID_ fixed(19,0) not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ timestamp null, TOKEN_ fixed(19,0) null, PARENT_ fixed(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ fixed(19,0) null, NODE_ fixed(19,0) null, ENTER_ timestamp null, LEAVE_ timestamp null, DURATION_ fixed(19,0) null, NEWLONGVALUE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, CHILD_ fixed(19,0) null, SOURCENODE_ fixed(19,0) null, DESTINATIONNODE_ fixed(19,0) null, VARIABLEINSTANCE_ fixed(19,0) null, OLDBYTEARRAY_ fixed(19,0) null, NEWBYTEARRAY_ fixed(19,0) null, OLDDATEVALUE_ timestamp null, NEWDATEVALUE_ timestamp null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ fixed(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ fixed(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NEWSTRINGIDCLASS_ varchar(255) null, N!
 EWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ fixed(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ fixed(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, STARTTASK_ fixed(19,0) null, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ fixed(19,0) null, TASKMGMTDEFINITION_ fixed(19,0) null, NAME_ varchar(255) null, primary key (ID_));
-create table JBPM_NODE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, ISASYNC_ boolean null, ISASYNCEXCL_ boolean null, ACTION_ fixed(19,0) null, SUPERSTATE_ fixed(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ fixed(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION fixed(19,0) null, SCRIPT_ fixed(19,0) null, SIGNAL_ int null, CREATETASKS_ boolean null, ENDTASKS_ boolean null, NODECOLLECTIONINDEX_ int null, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ fixed(19,0) not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ boolean null, STARTSTATE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ fixed(19,0) not null, VERSION_ int not null, KEY_ varchar(255) null, START_ timestamp null, END_ timestamp null, ISSUSPENDED_ boolean null, PROCESSDEFINITION_ fixed(19,0) null, ROOTTOKEN_ fixed(19,0) null, SUPERPROCESSTOKEN_ fixed(19,0) null, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ fixed(19,0) not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, ACTION_ fixed(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ fixed(19,0) not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ fixed(19,0) null, TASKMGMTDEFINITION_ fixed(19,0) null, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ fixed(19,0) not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ fixed(19,0) null, TASKMGMTINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TASK (ID_ fixed(19,0) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, ISBLOCKING_ boolean null, ISSIGNALLING_ boolean null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ fixed(19,0) null, TASKNODE_ fixed(19,0) null, STARTSTATE_ fixed(19,0) null, ASSIGNMENTDELEGATION_ fixed(19,0) null, SWIMLANE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ fixed(19,0) not null, POOLEDACTOR_ fixed(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ fixed(19,0) not null, TASKCONTROLLERDELEGATION_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ timestamp null, START_ timestamp null, END_ timestamp null, DUEDATE_ timestamp null, PRIORITY_ int null, ISCANCELLED_ boolean null, ISSUSPENDED_ boolean null, ISOPEN_ boolean null, ISSIGNALLING_ boolean null, ISBLOCKING_ boolean null, TASK_ fixed(19,0) null, TOKEN_ fixed(19,0) null, PROCINST_ fixed(19,0) null, SWIMLANINSTANCE_ fixed(19,0) null, TASKMGMTINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TOKEN (ID_ fixed(19,0) not null, VERSION_ int not null, NAME_ varchar(255) null, START_ timestamp null, END_ timestamp null, NODEENTER_ timestamp null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ boolean null, ISTERMINATIONIMPLICIT_ boolean null, ISSUSPENDED_ boolean null, LOCK_ varchar(255) null, NODE_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, PARENT_ fixed(19,0) null, SUBPROCESSINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ fixed(19,0) not null, VERSION_ int not null, TOKEN_ fixed(19,0) null, CONTEXTINSTANCE_ fixed(19,0) null, primary key (ID_));
-create table JBPM_TRANSITION (ID_ fixed(19,0) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, FROM_ fixed(19,0) null, TO_ fixed(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ fixed(19,0) not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ fixed(19,0) null, PROCESSSTATE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, INDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ fixed(19,0) null, TOKENVARIABLEMAP_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, BYTEARRAYVALUE_ fixed(19,0) null, DATEVALUE_ timestamp null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ fixed(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ fixed(19,0) null, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION foreign key FK_ACTION_EVENT (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION foreign key FK_ACTION_EXPTHDL (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION foreign key FK_ACTION_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION foreign key FK_CRTETIMERACT_TA (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION foreign key FK_ACTION_ACTNDEL (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION foreign key FK_ACTION_REFACT (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY foreign key FK_BYTEARR_FILDEF (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK foreign key FK_BYTEBLOCK_FILE (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT foreign key FK_COMMENT_TOKEN (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT foreign key FK_COMMENT_TSK (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS foreign key FK_DECCOND_DEC (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION foreign key FK_DELEGATION_PRCD (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT foreign key FK_EVENT_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT foreign key FK_EVENT_NODE (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT foreign key FK_EVENT_TRANS (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT foreign key FK_EVENT_TASK (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP foreign key FK_ID_GRP_PARENT (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP foreign key FK_ID_MEMSHIP_GRP (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP foreign key FK_ID_MEMSHIP_USR (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB foreign key FK_JOB_TOKEN (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB foreign key FK_JOB_NODE (NODE_) references JBPM_NODE;
-alter table JBPM_JOB foreign key FK_JOB_PRINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB foreign key FK_JOB_ACTION (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB foreign key FK_JOB_TSKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG foreign key FK_LOG_SOURCENODE (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG foreign key FK_LOG_TOKEN (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG foreign key FK_LOG_OLDBYTES (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG foreign key FK_LOG_NEWBYTES (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG foreign key FK_LOG_CHILDTOKEN (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG foreign key FK_LOG_DESTNODE (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG foreign key FK_LOG_TASKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG foreign key FK_LOG_SWIMINST (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG foreign key FK_LOG_PARENT (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG foreign key FK_LOG_NODE (NODE_) references JBPM_NODE;
-alter table JBPM_LOG foreign key FK_LOG_ACTION (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG foreign key FK_LOG_VARINST (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG foreign key FK_LOG_TRANSITION (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION foreign key FK_TSKDEF_START (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION foreign key FK_MODDEF_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE foreign key FK_TASKMGTINST_TMD (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE foreign key FK_MODINST_PRCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE foreign key FK_PROCST_SBPRCDEF (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE foreign key FK_NODE_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE foreign key FK_NODE_SCRIPT (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE foreign key FK_NODE_ACTION (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE foreign key FK_DECISION_DELEG (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE foreign key FK_NODE_SUPERSTATE (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR foreign key FK_POOLEDACTOR_SLI (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION foreign key FK_PROCDEF_STRTSTA (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_ROOTTKN (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_SPROCTKN (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION foreign key FK_RTACTN_PROCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION foreign key FK_RTACTN_ACTION (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE foreign key FK_SWL_ASSDEL (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE foreign key FK_SWL_TSKMGMTDEF (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE foreign key FK_SWIMLANEINST_TM (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE foreign key FK_SWIMLANEINST_SL (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK foreign key FK_TSK_TSKCTRL (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK foreign key FK_TASK_ASSDEL (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK foreign key FK_TASK_TASKNODE (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK foreign key FK_TASK_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK foreign key FK_TASK_STARTST (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK foreign key FK_TASK_TASKMGTDEF (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK foreign key FK_TASK_SWIMLANE (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL foreign key FK_TSKACTPOL_PLACT (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL foreign key FK_TASKACTPL_TSKI (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER foreign key FK_TSKCTRL_DELEG (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE foreign key FK_TSKINS_PRCINS (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TMINST (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TOKEN (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_SLINST (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TASK (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN foreign key FK_TOKEN_PARENT (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN foreign key FK_TOKEN_NODE (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN foreign key FK_TOKEN_PROCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN foreign key FK_TOKEN_SUBPI (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP foreign key FK_TKVARMAP_CTXT (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP foreign key FK_TKVARMAP_TOKEN (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION foreign key FK_TRANSITION_TO (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION foreign key FK_TRANS_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION foreign key FK_TRANSITION_FROM (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_TSKCTRL (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_SCRIPT (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_PROCST (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_TK (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_TKVARMP (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_PRCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE foreign key FK_VAR_TSKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE foreign key FK_BYTEINST_ARRAY (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
-create sequence hibernate_sequence;
+create table JBPM_ACTION (ID_ fixed(19,0) not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ boolean null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ boolean null, REFERENCEDACTION_ fixed(19,0) null, ACTIONDELEGATION_ fixed(19,0) null, EVENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ fixed(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ fixed(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ fixed(19,0) not null, NAME_ varchar(255) null, FILEDEFINITION_ fixed(19,0) null, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ fixed(19,0) not null, BYTES_ long byte null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ fixed(19,0) not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ timestamp null, MESSAGE_ varchar(4000) null, TOKEN_ fixed(19,0) null, TASKINSTANCE_ fixed(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ fixed(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ fixed(19,0) not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ fixed(19,0) null, primary key (ID_))
+create table JBPM_EVENT (ID_ fixed(19,0) not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, NODE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, TASK_ fixed(19,0) null, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ fixed(19,0) not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, TASK_ fixed(19,0) null, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ fixed(19,0) null, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ fixed(19,0) null, GROUP_ fixed(19,0) null, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ fixed(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null)
+create table JBPM_ID_USER (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_))
+create table JBPM_JOB (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ timestamp null, PROCESSINSTANCE_ fixed(19,0) null, TOKEN_ fixed(19,0) null, TASKINSTANCE_ fixed(19,0) null, ISSUSPENDED_ boolean null, ISEXCLUSIVE_ boolean null, LOCKOWNER_ varchar(255) null, LOCKTIME_ timestamp null, EXCEPTION_ varchar(4000) null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ fixed(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ fixed(19,0) null, NODE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_LOG (ID_ fixed(19,0) not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ timestamp null, TOKEN_ fixed(19,0) null, PARENT_ fixed(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ fixed(19,0) null, NODE_ fixed(19,0) null, ENTER_ timestamp null, LEAVE_ timestamp null, DURATION_ fixed(19,0) null, NEWLONGVALUE_ fixed(19,0) null, TRANSITION_ fixed(19,0) null, CHILD_ fixed(19,0) null, SOURCENODE_ fixed(19,0) null, DESTINATIONNODE_ fixed(19,0) null, VARIABLEINSTANCE_ fixed(19,0) null, OLDBYTEARRAY_ fixed(19,0) null, NEWBYTEARRAY_ fixed(19,0) null, OLDDATEVALUE_ timestamp null, NEWDATEVALUE_ timestamp null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ fixed(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ fixed(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NEWSTRINGIDCLASS_ varchar(255) null, N!
 EWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ fixed(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ fixed(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, STARTTASK_ fixed(19,0) null, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ fixed(19,0) null, TASKMGMTDEFINITION_ fixed(19,0) null, NAME_ varchar(255) null, primary key (ID_))
+create table JBPM_NODE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, ISASYNC_ boolean null, ISASYNCEXCL_ boolean null, ACTION_ fixed(19,0) null, SUPERSTATE_ fixed(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ fixed(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION fixed(19,0) null, SCRIPT_ fixed(19,0) null, SIGNAL_ int null, CREATETASKS_ boolean null, ENDTASKS_ boolean null, NODECOLLECTIONINDEX_ int null, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ fixed(19,0) not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ fixed(19,0) not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ boolean null, STARTSTATE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ fixed(19,0) not null, VERSION_ int not null, KEY_ varchar(255) null, START_ timestamp null, END_ timestamp null, ISSUSPENDED_ boolean null, PROCESSDEFINITION_ fixed(19,0) null, ROOTTOKEN_ fixed(19,0) null, SUPERPROCESSTOKEN_ fixed(19,0) null, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ fixed(19,0) not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, ACTION_ fixed(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ fixed(19,0) not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ fixed(19,0) null, TASKMGMTDEFINITION_ fixed(19,0) null, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ fixed(19,0) not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ fixed(19,0) null, TASKMGMTINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TASK (ID_ fixed(19,0) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, ISBLOCKING_ boolean null, ISSIGNALLING_ boolean null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ fixed(19,0) null, TASKNODE_ fixed(19,0) null, STARTSTATE_ fixed(19,0) null, ASSIGNMENTDELEGATION_ fixed(19,0) null, SWIMLANE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ fixed(19,0) not null, POOLEDACTOR_ fixed(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ fixed(19,0) not null, TASKCONTROLLERDELEGATION_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ timestamp null, START_ timestamp null, END_ timestamp null, DUEDATE_ timestamp null, PRIORITY_ int null, ISCANCELLED_ boolean null, ISSUSPENDED_ boolean null, ISOPEN_ boolean null, ISSIGNALLING_ boolean null, ISBLOCKING_ boolean null, TASK_ fixed(19,0) null, TOKEN_ fixed(19,0) null, PROCINST_ fixed(19,0) null, SWIMLANINSTANCE_ fixed(19,0) null, TASKMGMTINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TOKEN (ID_ fixed(19,0) not null, VERSION_ int not null, NAME_ varchar(255) null, START_ timestamp null, END_ timestamp null, NODEENTER_ timestamp null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ boolean null, ISTERMINATIONIMPLICIT_ boolean null, ISSUSPENDED_ boolean null, LOCK_ varchar(255) null, NODE_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, PARENT_ fixed(19,0) null, SUBPROCESSINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ fixed(19,0) not null, VERSION_ int not null, TOKEN_ fixed(19,0) null, CONTEXTINSTANCE_ fixed(19,0) null, primary key (ID_))
+create table JBPM_TRANSITION (ID_ fixed(19,0) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, FROM_ fixed(19,0) null, TO_ fixed(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ fixed(19,0) not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ fixed(19,0) null, PROCESSSTATE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, INDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ fixed(19,0) null, TOKENVARIABLEMAP_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, BYTEARRAYVALUE_ fixed(19,0) null, DATEVALUE_ timestamp null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ fixed(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ fixed(19,0) null, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION foreign key FK_ACTION_EVENT (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION foreign key FK_ACTION_EXPTHDL (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION foreign key FK_ACTION_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION foreign key FK_CRTETIMERACT_TA (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION foreign key FK_ACTION_ACTNDEL (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION foreign key FK_ACTION_REFACT (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY foreign key FK_BYTEARR_FILDEF (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK foreign key FK_BYTEBLOCK_FILE (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT foreign key FK_COMMENT_TOKEN (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT foreign key FK_COMMENT_TSK (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS foreign key FK_DECCOND_DEC (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION foreign key FK_DELEGATION_PRCD (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT foreign key FK_EVENT_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT foreign key FK_EVENT_NODE (NODE_) references JBPM_NODE
+alter table JBPM_EVENT foreign key FK_EVENT_TRANS (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT foreign key FK_EVENT_TASK (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP foreign key FK_ID_GRP_PARENT (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP foreign key FK_ID_MEMSHIP_GRP (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP foreign key FK_ID_MEMSHIP_USR (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB foreign key FK_JOB_TOKEN (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB foreign key FK_JOB_NODE (NODE_) references JBPM_NODE
+alter table JBPM_JOB foreign key FK_JOB_PRINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB foreign key FK_JOB_ACTION (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB foreign key FK_JOB_TSKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG foreign key FK_LOG_SOURCENODE (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG foreign key FK_LOG_TOKEN (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG foreign key FK_LOG_OLDBYTES (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG foreign key FK_LOG_NEWBYTES (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG foreign key FK_LOG_CHILDTOKEN (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG foreign key FK_LOG_DESTNODE (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG foreign key FK_LOG_TASKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG foreign key FK_LOG_SWIMINST (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG foreign key FK_LOG_PARENT (PARENT_) references JBPM_LOG
+alter table JBPM_LOG foreign key FK_LOG_NODE (NODE_) references JBPM_NODE
+alter table JBPM_LOG foreign key FK_LOG_ACTION (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG foreign key FK_LOG_VARINST (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG foreign key FK_LOG_TRANSITION (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION foreign key FK_TSKDEF_START (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION foreign key FK_MODDEF_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE foreign key FK_TASKMGTINST_TMD (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE foreign key FK_MODINST_PRCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE foreign key FK_PROCST_SBPRCDEF (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE foreign key FK_NODE_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE foreign key FK_NODE_SCRIPT (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE foreign key FK_NODE_ACTION (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE foreign key FK_DECISION_DELEG (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE foreign key FK_NODE_SUPERSTATE (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR foreign key FK_POOLEDACTOR_SLI (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION foreign key FK_PROCDEF_STRTSTA (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_ROOTTKN (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE foreign key FK_PROCIN_SPROCTKN (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION foreign key FK_RTACTN_PROCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION foreign key FK_RTACTN_ACTION (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE foreign key FK_SWL_ASSDEL (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE foreign key FK_SWL_TSKMGMTDEF (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE foreign key FK_SWIMLANEINST_TM (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE foreign key FK_SWIMLANEINST_SL (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK foreign key FK_TSK_TSKCTRL (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK foreign key FK_TASK_ASSDEL (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK foreign key FK_TASK_TASKNODE (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK foreign key FK_TASK_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK foreign key FK_TASK_STARTST (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK foreign key FK_TASK_TASKMGTDEF (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK foreign key FK_TASK_SWIMLANE (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL foreign key FK_TSKACTPOL_PLACT (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL foreign key FK_TASKACTPL_TSKI (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER foreign key FK_TSKCTRL_DELEG (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE foreign key FK_TSKINS_PRCINS (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TMINST (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TOKEN (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_SLINST (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE foreign key FK_TASKINST_TASK (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN foreign key FK_TOKEN_PARENT (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN foreign key FK_TOKEN_NODE (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN foreign key FK_TOKEN_PROCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN foreign key FK_TOKEN_SUBPI (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP foreign key FK_TKVARMAP_CTXT (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP foreign key FK_TKVARMAP_TOKEN (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION foreign key FK_TRANSITION_TO (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION foreign key FK_TRANS_PROCDEF (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION foreign key FK_TRANSITION_FROM (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_TSKCTRL (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_SCRIPT (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS foreign key FK_VARACC_PROCST (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_TK (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_TKVARMP (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE foreign key FK_VARINST_PRCINST (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE foreign key FK_VAR_TSKINST (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE foreign key FK_BYTEINST_ARRAY (BYTEARRAYVALUE_) references JBPM_BYTEARRAY
+create sequence hibernate_sequence

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,167 +1,197 @@
-create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
-create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
-create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_));
-create table JBPM_DELEGATION (ID_ numeric(19,0) identity not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_EVENT (ID_ numeric(19,0) identity not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_EXCEPTIONHANDLER (ID_ numeric(19,0) identity not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_GROUP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_MEMBERSHIP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ numeric(19,0) null, GROUP_ numeric(19,0) null, primary key (ID_));
-create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null);
-create table JBPM_ID_USER (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_));
-create table JBPM_JOB (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ datetime null, PROCESSINSTANCE_ numeric(19,0) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, ISSUSPENDED_ tinyint null, ISEXCLUSIVE_ tinyint null, LOCKOWNER_ varchar(255) null, LOCKTIME_ datetime null, EXCEPTION_ varchar(4000) null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ numeric(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ numeric(19,0) null, NODE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_LOG (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ datetime null, TOKEN_ numeric(19,0) null, PARENT_ numeric(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ numeric(19,0) null, NODE_ numeric(19,0) null, ENTER_ datetime null, LEAVE_ datetime null, DURATION_ numeric(19,0) null, NEWLONGVALUE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, CHILD_ numeric(19,0) null, SOURCENODE_ numeric(19,0) null, DESTINATIONNODE_ numeric(19,0) null, VARIABLEINSTANCE_ numeric(19,0) null, OLDBYTEARRAY_ numeric(19,0) null, NEWBYTEARRAY_ numeric(19,0) null, OLDDATEVALUE_ datetime null, NEWDATEVALUE_ datetime null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ numeric(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ numeric(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NE!
 WSTRINGIDCLASS_ varchar(255) null, NEWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ numeric(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_MODULEDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, STARTTASK_ numeric(19,0) null, primary key (ID_));
-create table JBPM_MODULEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, NAME_ varchar(255) null, primary key (ID_));
-create table JBPM_NODE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISASYNC_ tinyint null, ISASYNCEXCL_ tinyint null, ACTION_ numeric(19,0) null, SUPERSTATE_ numeric(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ numeric(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION numeric(19,0) null, SCRIPT_ numeric(19,0) null, SIGNAL_ int null, CREATETASKS_ tinyint null, ENDTASKS_ tinyint null, NODECOLLECTIONINDEX_ int null, primary key (ID_));
-create table JBPM_POOLEDACTOR (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_PROCESSDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ tinyint null, STARTSTATE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_PROCESSINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, KEY_ varchar(255) null, START_ datetime null, END_ datetime null, ISSUSPENDED_ tinyint null, PROCESSDEFINITION_ numeric(19,0) null, ROOTTOKEN_ numeric(19,0) null, SUPERPROCESSTOKEN_ numeric(19,0) null, primary key (ID_));
-create table JBPM_RUNTIMEACTION (ID_ numeric(19,0) identity not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, ACTION_ numeric(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_));
-create table JBPM_SWIMLANE (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_SWIMLANEINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASK (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISBLOCKING_ tinyint null, ISSIGNALLING_ tinyint null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ numeric(19,0) null, TASKNODE_ numeric(19,0) null, STARTSTATE_ numeric(19,0) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, SWIMLANE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(19,0) not null, POOLEDACTOR_ numeric(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_));
-create table JBPM_TASKCONTROLLER (ID_ numeric(19,0) identity not null, TASKCONTROLLERDELEGATION_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TASKINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ datetime null, START_ datetime null, END_ datetime null, DUEDATE_ datetime null, PRIORITY_ int null, ISCANCELLED_ tinyint null, ISSUSPENDED_ tinyint null, ISOPEN_ tinyint null, ISSIGNALLING_ tinyint null, ISBLOCKING_ tinyint null, TASK_ numeric(19,0) null, TOKEN_ numeric(19,0) null, PROCINST_ numeric(19,0) null, SWIMLANINSTANCE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_));
-create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
-create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
-create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
-create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);
-alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT;
-alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER;
-alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION;
-alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION;
-alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY;
-create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_);
-create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_);
-alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE;
-create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_);
-alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION;
-alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK;
-alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP;
-alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER;
-create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_);
-create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_);
-create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_);
-alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY;
-alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN;
-alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG;
-alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE;
-alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION;
-create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_);
-alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK;
-alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_);
-alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_);
-create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_);
-create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_);
-create index IDX_NODE_ACTION on JBPM_NODE (ACTION_);
-alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION;
-alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE;
-create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_);
-create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_);
-alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_);
-alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE;
-create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_);
-create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_);
-create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_);
-create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_);
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN;
-alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN;
-create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_);
-create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_);
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_);
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_);
-create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_);
-create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_);
-alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION;
-alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE;
-alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION;
-alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE;
-alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR;
-alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION;
-create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_);
-create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_);
-create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_);
-create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_);
-create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_);
-alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE;
-alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK;
-create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_);
-create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_);
-create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_);
-create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_);
-alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN;
-alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_);
-create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_);
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE;
-alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN;
-create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_);
-create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_);
-create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_);
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE;
-alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION;
-alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION;
-alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE;
-create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_);
-create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_);
-create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_);
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE;
-alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY;
+create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_))
+create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_))
+create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_DECISIONCONDITIONS (DECISION_ numeric(19,0) not null, TRANSITIONNAME_ varchar(255) null, EXPRESSION_ varchar(255) null, INDEX_ int not null, primary key (DECISION_, INDEX_))
+create table JBPM_DELEGATION (ID_ numeric(19,0) identity not null, CLASSNAME_ varchar(4000) null, CONFIGURATION_ varchar(4000) null, CONFIGTYPE_ varchar(255) null, PROCESSDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_EVENT (ID_ numeric(19,0) identity not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_EXCEPTIONHANDLER (ID_ numeric(19,0) identity not null, EXCEPTIONCLASSNAME_ varchar(4000) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, GRAPHELEMENTINDEX_ int null, NODE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, TASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_GROUP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, TYPE_ varchar(255) null, PARENT_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_MEMBERSHIP (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, ROLE_ varchar(255) null, USER_ numeric(19,0) null, GROUP_ numeric(19,0) null, primary key (ID_))
+create table JBPM_ID_PERMISSIONS (ENTITY_ numeric(19,0) not null, CLASS_ varchar(255) null, NAME_ varchar(255) null, ACTION_ varchar(255) null)
+create table JBPM_ID_USER (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, EMAIL_ varchar(255) null, PASSWORD_ varchar(255) null, primary key (ID_))
+create table JBPM_JOB (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, DUEDATE_ datetime null, PROCESSINSTANCE_ numeric(19,0) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, ISSUSPENDED_ tinyint null, ISEXCLUSIVE_ tinyint null, LOCKOWNER_ varchar(255) null, LOCKTIME_ datetime null, EXCEPTION_ text null, RETRIES_ int null, NAME_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, ACTION_ numeric(19,0) null, GRAPHELEMENTTYPE_ varchar(255) null, GRAPHELEMENT_ numeric(19,0) null, NODE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_LOG (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ datetime null, TOKEN_ numeric(19,0) null, PARENT_ numeric(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ text null, ACTION_ numeric(19,0) null, NODE_ numeric(19,0) null, ENTER_ datetime null, LEAVE_ datetime null, DURATION_ numeric(19,0) null, NEWLONGVALUE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, CHILD_ numeric(19,0) null, SOURCENODE_ numeric(19,0) null, DESTINATIONNODE_ numeric(19,0) null, VARIABLEINSTANCE_ numeric(19,0) null, OLDBYTEARRAY_ numeric(19,0) null, NEWBYTEARRAY_ numeric(19,0) null, OLDDATEVALUE_ datetime null, NEWDATEVALUE_ datetime null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ numeric(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ numeric(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NEWSTRINGID!
 CLASS_ varchar(255) null, NEWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ numeric(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_MODULEDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, STARTTASK_ numeric(19,0) null, primary key (ID_))
+create table JBPM_MODULEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, PROCESSINSTANCE_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, NAME_ varchar(255) null, primary key (ID_))
+create table JBPM_NODE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISASYNC_ tinyint null, ISASYNCEXCL_ tinyint null, ACTION_ numeric(19,0) null, SUPERSTATE_ numeric(19,0) null, SUBPROCNAME_ varchar(255) null, SUBPROCESSDEFINITION_ numeric(19,0) null, DECISIONEXPRESSION_ varchar(255) null, DECISIONDELEGATION numeric(19,0) null, SCRIPT_ numeric(19,0) null, SIGNAL_ int null, CREATETASKS_ tinyint null, ENDTASKS_ tinyint null, NODECOLLECTIONINDEX_ int null, primary key (ID_))
+create table JBPM_POOLEDACTOR (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_PROCESSDEFINITION (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, VERSION_ int null, ISTERMINATIONIMPLICIT_ tinyint null, STARTSTATE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_PROCESSINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, KEY_ varchar(255) null, START_ datetime null, END_ datetime null, ISSUSPENDED_ tinyint null, PROCESSDEFINITION_ numeric(19,0) null, ROOTTOKEN_ numeric(19,0) null, SUPERPROCESSTOKEN_ numeric(19,0) null, primary key (ID_))
+create table JBPM_RUNTIMEACTION (ID_ numeric(19,0) identity not null, VERSION_ int not null, EVENTTYPE_ varchar(255) null, TYPE_ char(1) null, GRAPHELEMENT_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, ACTION_ numeric(19,0) null, PROCESSINSTANCEINDEX_ int null, primary key (ID_))
+create table JBPM_SWIMLANE (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, TASKMGMTDEFINITION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_SWIMLANEINSTANCE (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, ACTORID_ varchar(255) null, SWIMLANE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASK (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, ISBLOCKING_ tinyint null, ISSIGNALLING_ tinyint null, CONDITION_ varchar(255) null, DUEDATE_ varchar(255) null, PRIORITY_ int null, ACTORIDEXPRESSION_ varchar(255) null, POOLEDACTORSEXPRESSION_ varchar(255) null, TASKMGMTDEFINITION_ numeric(19,0) null, TASKNODE_ numeric(19,0) null, STARTSTATE_ numeric(19,0) null, ASSIGNMENTDELEGATION_ numeric(19,0) null, SWIMLANE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASKACTORPOOL (TASKINSTANCE_ numeric(19,0) not null, POOLEDACTOR_ numeric(19,0) not null, primary key (TASKINSTANCE_, POOLEDACTOR_))
+create table JBPM_TASKCONTROLLER (ID_ numeric(19,0) identity not null, TASKCONTROLLERDELEGATION_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TASKINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, ACTORID_ varchar(255) null, CREATE_ datetime null, START_ datetime null, END_ datetime null, DUEDATE_ datetime null, PRIORITY_ int null, ISCANCELLED_ tinyint null, ISSUSPENDED_ tinyint null, ISOPEN_ tinyint null, ISSIGNALLING_ tinyint null, ISBLOCKING_ tinyint null, TASK_ numeric(19,0) null, TOKEN_ numeric(19,0) null, PROCINST_ numeric(19,0) null, SWIMLANINSTANCE_ numeric(19,0) null, TASKMGMTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_))
+create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_))
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_))
+create index IDX_ACTION_REFACT on JBPM_ACTION (REFERENCEDACTION_)
+create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_)
+create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_)
+create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_)
+create index IDX_CRTETIMERACT_TA on JBPM_ACTION (TIMERACTION_)
+alter table JBPM_ACTION add constraint FK_ACTION_EVENT foreign key (EVENT_) references JBPM_EVENT
+alter table JBPM_ACTION add constraint FK_ACTION_EXPTHDL foreign key (EXCEPTIONHANDLER_) references JBPM_EXCEPTIONHANDLER
+alter table JBPM_ACTION add constraint FK_ACTION_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_ACTION add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION
+alter table JBPM_ACTION add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_ACTION add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION
+alter table JBPM_BYTEARRAY add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_BYTEBLOCK add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY
+create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_)
+create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_)
+alter table JBPM_COMMENT add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_COMMENT add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_DECISIONCONDITIONS add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE
+create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_)
+alter table JBPM_DELEGATION add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_EVENT add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_EVENT add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION
+alter table JBPM_EVENT add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK
+alter table JBPM_ID_GROUP add constraint FK_ID_GRP_PARENT foreign key (PARENT_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_GRP foreign key (GROUP_) references JBPM_ID_GROUP
+alter table JBPM_ID_MEMBERSHIP add constraint FK_ID_MEMSHIP_USR foreign key (USER_) references JBPM_ID_USER
+create index IDX_JOB_NODE on JBPM_JOB (NODE_)
+create index IDX_JOB_ACTION on JBPM_JOB (ACTION_)
+create index IDX_JOB_TSKINST on JBPM_JOB (TASKINSTANCE_)
+create index IDX_JOB_PRINST on JBPM_JOB (PROCESSINSTANCE_)
+create index IDX_JOB_TOKEN on JBPM_JOB (TOKEN_)
+alter table JBPM_JOB add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_JOB add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_JOB add constraint FK_JOB_PRINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_JOB add constraint FK_JOB_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_JOB add constraint FK_JOB_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_LOG_NEWBYTES on JBPM_LOG (NEWBYTEARRAY_)
+create index IDX_LOG_NODE on JBPM_LOG (NODE_)
+create index IDX_LOG_TASKINST on JBPM_LOG (TASKINSTANCE_)
+create index IDX_LOG_TRANSITION on JBPM_LOG (TRANSITION_)
+create index IDX_LOG_DESTNODE on JBPM_LOG (DESTINATIONNODE_)
+create index IDX_LOG_CHILDTOKEN on JBPM_LOG (CHILD_)
+create index IDX_LOG_TOKEN on JBPM_LOG (TOKEN_)
+create index IDX_LOG_SWIMINST on JBPM_LOG (SWIMLANEINSTANCE_)
+create index IDX_LOG_PARENT on JBPM_LOG (PARENT_)
+create index IDX_LOG_VARINST on JBPM_LOG (VARIABLEINSTANCE_)
+create index IDX_LOG_ACTION on JBPM_LOG (ACTION_)
+create index IDX_LOG_SOURCENODE on JBPM_LOG (SOURCENODE_)
+create index IDX_LOG_OLDBYTES on JBPM_LOG (OLDBYTEARRAY_)
+alter table JBPM_LOG add constraint FK_LOG_SOURCENODE foreign key (SOURCENODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_OLDBYTES foreign key (OLDBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY
+alter table JBPM_LOG add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN
+alter table JBPM_LOG add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG
+alter table JBPM_LOG add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_LOG add constraint FK_LOG_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_LOG add constraint FK_LOG_VARINST foreign key (VARIABLEINSTANCE_) references JBPM_VARIABLEINSTANCE
+alter table JBPM_LOG add constraint FK_LOG_TRANSITION foreign key (TRANSITION_) references JBPM_TRANSITION
+create index IDX_TSKDEF_START on JBPM_MODULEDEFINITION (STARTTASK_)
+create index IDX_MODDEF_PROCDF on JBPM_MODULEDEFINITION (PROCESSDEFINITION_)
+alter table JBPM_MODULEDEFINITION add constraint FK_TSKDEF_START foreign key (STARTTASK_) references JBPM_TASK
+alter table JBPM_MODULEDEFINITION add constraint FK_MODDEF_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+create index IDX_TASKMGTINST_TMD on JBPM_MODULEINSTANCE (TASKMGMTDEFINITION_)
+create index IDX_MODINST_PRINST on JBPM_MODULEINSTANCE (PROCESSINSTANCE_)
+alter table JBPM_MODULEINSTANCE add constraint FK_TASKMGTINST_TMD foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_MODULEINSTANCE add constraint FK_MODINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_PSTATE_SBPRCDEF on JBPM_NODE (SUBPROCESSDEFINITION_)
+create index IDX_NODE_SCRIPT on JBPM_NODE (SCRIPT_)
+create index IDX_NODE_SUPRSTATE on JBPM_NODE (SUPERSTATE_)
+create index IDX_NODE_PROCDEF on JBPM_NODE (PROCESSDEFINITION_)
+create index IDX_DECISION_DELEG on JBPM_NODE (DECISIONDELEGATION)
+create index IDX_NODE_ACTION on JBPM_NODE (ACTION_)
+alter table JBPM_NODE add constraint FK_PROCST_SBPRCDEF foreign key (SUBPROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_NODE add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION
+alter table JBPM_NODE add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION
+alter table JBPM_NODE add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE
+create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_)
+create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_)
+alter table JBPM_POOLEDACTOR add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE
+create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_)
+alter table JBPM_PROCESSDEFINITION add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE
+create index IDX_PROCIN_ROOTTK on JBPM_PROCESSINSTANCE (ROOTTOKEN_)
+create index IDX_PROCIN_SPROCTK on JBPM_PROCESSINSTANCE (SUPERPROCESSTOKEN_)
+create index IDX_PROCIN_KEY on JBPM_PROCESSINSTANCE (KEY_)
+create index IDX_PROCIN_PROCDEF on JBPM_PROCESSINSTANCE (PROCESSDEFINITION_)
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN
+alter table JBPM_PROCESSINSTANCE add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN
+create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_)
+create index IDX_RTACTN_ACTION on JBPM_RUNTIMEACTION (ACTION_)
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_RUNTIMEACTION add constraint FK_RTACTN_ACTION foreign key (ACTION_) references JBPM_ACTION
+create index IDX_SWL_TSKMGMTDEF on JBPM_SWIMLANE (TASKMGMTDEFINITION_)
+create index IDX_SWL_ASSDEL on JBPM_SWIMLANE (ASSIGNMENTDELEGATION_)
+alter table JBPM_SWIMLANE add constraint FK_SWL_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_SWIMLANE add constraint FK_SWL_TSKMGMTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+create index IDX_SWIMLINST_SL on JBPM_SWIMLANEINSTANCE (SWIMLANE_)
+create index IDX_SWIMLANEINST_TM on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_)
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_TM foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_SWIMLANEINSTANCE add constraint FK_SWIMLANEINST_SL foreign key (SWIMLANE_) references JBPM_SWIMLANE
+create index IDX_TASK_STARTST on JBPM_TASK (STARTSTATE_)
+create index IDX_TASK_SWIMLANE on JBPM_TASK (SWIMLANE_)
+create index IDX_TSK_TSKCTRL on JBPM_TASK (TASKCONTROLLER_)
+create index IDX_TASK_ASSDEL on JBPM_TASK (ASSIGNMENTDELEGATION_)
+create index IDX_TASK_TSKNODE on JBPM_TASK (TASKNODE_)
+create index IDX_TASK_PROCDEF on JBPM_TASK (PROCESSDEFINITION_)
+create index IDX_TASK_TASKMGTDF on JBPM_TASK (TASKMGMTDEFINITION_)
+alter table JBPM_TASK add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_TASK add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION
+alter table JBPM_TASK add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE
+alter table JBPM_TASK add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION
+alter table JBPM_TASK add constraint FK_TASK_SWIMLANE foreign key (SWIMLANE_) references JBPM_SWIMLANE
+alter table JBPM_TASKACTORPOOL add constraint FK_TSKACTPOL_PLACT foreign key (POOLEDACTOR_) references JBPM_POOLEDACTOR
+alter table JBPM_TASKACTORPOOL add constraint FK_TASKACTPL_TSKI foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+create index IDX_TSKCTRL_DELEG on JBPM_TASKCONTROLLER (TASKCONTROLLERDELEGATION_)
+alter table JBPM_TASKCONTROLLER add constraint FK_TSKCTRL_DELEG foreign key (TASKCONTROLLERDELEGATION_) references JBPM_DELEGATION
+create index IDX_TASKINST_TOKN on JBPM_TASKINSTANCE (TOKEN_)
+create index IDX_TASKINST_TSK on JBPM_TASKINSTANCE (TASK_, PROCINST_)
+create index IDX_TSKINST_TMINST on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)
+create index IDX_TSKINST_SLINST on JBPM_TASKINSTANCE (SWIMLANINSTANCE_)
+create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_)
+alter table JBPM_TASKINSTANCE add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE
+alter table JBPM_TASKINSTANCE add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK
+create index IDX_TOKEN_PROCIN on JBPM_TOKEN (PROCESSINSTANCE_)
+create index IDX_TOKEN_SUBPI on JBPM_TOKEN (SUBPROCESSINSTANCE_)
+create index IDX_TOKEN_NODE on JBPM_TOKEN (NODE_)
+create index IDX_TOKEN_PARENT on JBPM_TOKEN (PARENT_)
+alter table JBPM_TOKEN add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN
+alter table JBPM_TOKEN add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE
+alter table JBPM_TOKEN add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_TOKEN add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_)
+create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_)
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE
+alter table JBPM_TOKENVARIABLEMAP add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN
+create index IDX_TRANSIT_TO on JBPM_TRANSITION (TO_)
+create index IDX_TRANSIT_FROM on JBPM_TRANSITION (FROM_)
+create index IDX_TRANS_PROCDEF on JBPM_TRANSITION (PROCESSDEFINITION_)
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE
+alter table JBPM_TRANSITION add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION
+alter table JBPM_TRANSITION add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION
+alter table JBPM_VARIABLEACCESS add constraint FK_VARACC_PROCST foreign key (PROCESSSTATE_) references JBPM_NODE
+create index IDX_VARINST_TKVARMP on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_)
+create index IDX_VARINST_PRCINS on JBPM_VARIABLEINSTANCE (PROCESSINSTANCE_)
+create index IDX_BYTEINST_ARRAY on JBPM_VARIABLEINSTANCE (BYTEARRAYVALUE_)
+create index IDX_VARINST_TK on JBPM_VARIABLEINSTANCE (TOKEN_)
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TK foreign key (TOKEN_) references JBPM_TOKEN
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_TKVARMP foreign key (TOKENVARIABLEMAP_) references JBPM_TOKENVARIABLEMAP
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE
+alter table JBPM_VARIABLEINSTANCE add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/test/resources/hibernate.cfg.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/test/resources/hibernate.cfg.xml	2009-06-25 11:46:12 UTC (rev 27128)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/services/jbpm/src/test/resources/hibernate.cfg.xml	2009-06-25 14:31:51 UTC (rev 27129)
@@ -1,8 +1,7 @@
 <?xml version='1.0' encoding='utf-8'?>
-
 <!DOCTYPE hibernate-configuration PUBLIC
-          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
-          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 
 <hibernate-configuration>
   <session-factory>
@@ -15,16 +14,16 @@
     <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
     <property name="hibernate.connection.username">sa</property>
     <property name="hibernate.connection.password"></property>
-    <property name="hibernate.hbm2ddl.auto">create</property>
     <!-- JDBC connection properties (end) -->
-    
-    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-    
+
+
     <!-- DataSource properties (begin) ===
     <property name="hibernate.connection.datasource">java:/JbpmDS</property>
     ==== DataSource properties (end) -->
-    
+
     <!-- JTA transaction properties (begin) ===
+    <property name="jta.UserTransaction">UserTransaction</property>
+    <property name="hibernate.current_session_context_class">jta</property>
     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
     ==== JTA transaction properties (end) -->
@@ -34,49 +33,50 @@
     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
     ==== CMT transaction properties (end) -->
 
-    <!-- logging properties (begin) ===
-    <property name="hibernate.show_sql">true</property>
+    <!-- ################################### -->
+    <!-- # common settings                 # -->
+    <!-- ################################### -->
+
+    <!-- Automatic schema creation (begin) -->
+    <property name="hibernate.hbm2ddl.auto">create</property>
+    <!-- Automatic schema creation (end) -->
+    
+    <!-- Simple memory-only cache -->
+    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+
+    <!-- SQL rendering properties (begin) ===
     <property name="hibernate.format_sql">true</property>
     <property name="hibernate.use_sql_comments">true</property>
-    ==== logging properties (end) -->
-    
+    ==== SQL rendering properties (end) -->
+
     <!-- ############################################ -->
     <!-- # mapping files with external dependencies # -->
     <!-- ############################################ -->
 
-    <!-- following mapping file has a dependendy on   -->
-    <!-- 'bsh-{version}.jar'.                         -->
-    <!-- uncomment this if you don't have bsh on your -->
-    <!-- classpath.  you won't be able to use the     -->
-    <!-- script element in process definition files   -->
-    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
-    <!-- following mapping files have a dependendy on  -->
-    <!-- 'jbpm-identity.jar', mapping files            -->
-    <!-- of the pluggable jbpm identity component.     -->
-    <!-- Uncomment the following 3 lines if you        -->
-    <!-- want to use the jBPM identity mgmgt           -->
-    <!-- component.                                    -->
-    <!-- identity mappings (begin) -->
-    <mapping resource="org/jbpm/identity/User.hbm.xml"/>
-    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
-    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
-    <!-- identity mappings (end) -->
+    <!-- Additional mappings defined per module go here -->
+    <mapping resource="hibernate.extra.hbm.xml" />
+    <mapping resource="hibernate.identity.hbm.xml" />
     
-    <!-- following mapping files have a dependendy on  -->
-    <!-- the JCR API                                   -->
-    <!-- jcr mappings (begin) ===
-    <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
-    ==== jcr mappings (end) -->
-
-
     <!-- ###################### -->
     <!-- # jbpm mapping files # -->
     <!-- ###################### -->
 
-    <!-- hql queries and type defs -->
+    <!-- hql queries -->
     <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
-    
+
+    <!-- hql queries used in simulation for querying historical data.
+         uncomment if you want to use the GetSimulationInputCommand
+         or you want to use the queries directly.
+         beware: the queries need the stddev function to be enabled in your dialect.
+         for more information, visit: 
+         http://www.camunda.com/business_process_simulation_news/mysql_and_stddev.html -->
+    <!--
+    <mapping resource="org/jbpm/sim/bam/hibernate.queries.hbm.xml" />
+    -->
+
+    <!-- graph.action mapping files -->
+    <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
+
     <!-- graph.def mapping files -->
     <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
     <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
@@ -87,6 +87,15 @@
     <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
     <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
 
+    <!-- ########################################### -->
+    <!-- # mapping file with external dependencies # -->
+    <!-- ########################################### -->
+    <!-- the following mapping file has a dependency on 'bsh-{version}.jar'.
+         uncomment this if bsh is not in your classpath.
+         the script element will not be available in process definition files.
+         note: this mapping must appear below org/jbpm/graph/def/Action.hbm.xml -->
+    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
     <!-- graph.node mapping files -->
     <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
@@ -94,6 +103,7 @@
     <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
+    <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
     <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
 
@@ -101,21 +111,21 @@
     <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
     <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
 
-    <!-- taskmgmt.def mapping files -->
-    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
-    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+    <!-- bytes mapping files -->
+    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
 
     <!-- module.def mapping files -->
     <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
 
-    <!-- bytes mapping files -->
-    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
     <!-- file.def mapping files -->
     <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
 
+    <!-- taskmgmt.def mapping files -->
+    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
     <!-- scheduler.def mapping files -->
     <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
     <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
@@ -128,7 +138,7 @@
 
     <!-- module.exe mapping files -->
     <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-        
+
     <!-- context.exe mapping files -->
     <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
     <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
@@ -147,6 +157,7 @@
     <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
     <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
     <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
+    <mapping resource="org/jbpm/job/CleanUpProcessJob.hbm.xml"/>
 
     <!-- taskmgmt.exe mapping files -->
     <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
@@ -185,6 +196,66 @@
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
     <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-    
+
+    <!-- ################## -->
+    <!-- # cache settings # -->
+    <!-- ##################-->
+
+    <!-- strategy="nonstrict-read-write" can be used with HashtableCacheProvider -->
+
+    <class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
+
+    <class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
+
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
+    <collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
   </session-factory>
 </hibernate-configuration>




More information about the jboss-svn-commits mailing list