- 浏览: 93304 次
- 性别:
- 来自: 湖南
文章分类
最新评论
jbpm连接mysql数据库的实例以及问题解决方案
jbpm连接mysql数据库的实例实现步骤:
第一步:在eclipse中新建一个java project,项目名称为:jbpmExample_2。
第二步:导入Junit、jbpm以及mysql的jar.
第三步:将jbpm下的config中的jbpm.cfg.xml拷贝到src目录下。
第四步:将jbpm下的config(我的目录是:D:\Program Files\jbpm-jpdl-3.2.3\config)中的hibernate.cfg.xml拷贝到src目录下,并修改hibernate.cfg.xml的配置文件。
将hibernate.cfg.xml中的如下的代码:
<!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property> - <!-- 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" /> - <!-- JDBC connection properties (end) --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
改成如下的代码,连接mysql数据库:
<!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <!-- JDBC connection properties (begin) --> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property>
并在如上的代码添加如下的代码,用于自动创建jbpm所需的数据表:
<property name="hibernate.hbm2ddl.auto">create</property> <property name="show_sql">true</property>
第五步:在src目录下新建jbpmConfiguration.xml文件,内容如下:
<jbpm-configuration> <jbpm-context> <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory"/> <service name="tx" factory="org.jbpm.tx.TxServiceFactory" /> </jbpm-context> <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml"/> <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties"/> <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm/default.modules.properties"/> <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties"/> <string name="resource.action.types" value="org/jbpm/graph/action.action.types.xml"/> <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml"/> <string name="resource.varmappping" value="org/jbpm/context/exe/jbpm.varmapping.xml"/> </jbpm-configuration>
jbpmConfiguration.xml此xml文件可以不写,因为系统会自动去找org/jbpm/default.jbpm.cfg.xml文件。
第六步:在src目录下新建myProcess.xml文件,内容如下:
<process-definition name="hello world"> <start-state name="start"> <transition to="s"/> </start-state> <state name='s'> <transition to="end"/> </state> <end-state name="end"/> </process-definition>
第七步:新建一个Junit Test Case 类名为:TestHelloWorldDB,代码如下:
package com.baoz.je.test; import java.util.List; import junit.framework.TestCase; import org.jbpm.JbpmConfiguration; import org.jbpm.JbpmContext; import org.jbpm.db.GraphSession; import org.jbpm.graph.def.ProcessDefinition; import org.jbpm.graph.exe.ProcessInstance; import org.jbpm.graph.exe.Token; public class TestHelloWorldDB extends TestCase { static JbpmConfiguration jbpmConfiguration = null; static{ jbpmConfiguration=JbpmConfiguration.parseResource("jbpmConfiguration.xml"); } protected void setUp() throws Exception { //创建jbpm的表结构 jbpmConfiguration.createSchema(); } /** * 部署流程 */ public void deployProcessDefinition(){ //定义流程 ProcessDefinition processDefinition = new ProcessDefinition().parseXmlResource("myProcess.xml"); //查找上面配置的pojo持久性上下文生成器 JbpmContext jbpmContext= jbpmConfiguration.createJbpmContext(); //在数据库中部署流程定义 try { jbpmContext.deployProcessDefinition(processDefinition); } finally { jbpmContext.close(); } } /** * 假如一个用户提交表单上,流程的执行过程 */ public void processInstancesCreatedWhenUserSubmitWebappForm(){ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); try { GraphSession graphSession = jbpmContext.getGraphSession(); ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("hello world"); ProcessInstance processInstance = new ProcessInstance(processDefinition); Token token = processInstance.getRootToken(); assertEquals("start", token.getNode().getName()); token.signal(); assertEquals("s",token.getNode().getName()); jbpmContext.save(processInstance); } finally{ jbpmContext.close(); } } /** * 当一个异步消息被接收时,流程的执行过程 */ public void theProcessInstancesContinuesWhenAnAsyncMessageIsReceived(){ JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); try { GraphSession graphSession = jbpmContext.getGraphSession(); ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("hello world"); List<ProcessInstance> piList = graphSession.findProcessInstances(processDefinition.getId()); ProcessInstance processInstance = piList.get(0); processInstance.signal(); assertTrue(processInstance.hasEnded()); jbpmContext.save(processInstance); } finally{ jbpmContext.close(); } } public void testSimplePersistence(){ deployProcessDefinition(); processInstancesCreatedWhenUserSubmitWebappForm(); theProcessInstancesContinuesWhenAnAsyncMessageIsReceived(); } protected void tearDown() throws Exception { //删除创建的jbpm的表结构 //jbpmConfiguration.dropSchema(); } }
第八步:在mysql中新建一个数据库,数据库名为jbpm。
第九步:运行如上的Test Case,如果没有报错,而且控制台打印出如下的内容,表示此示例运行成功:
log4j:WARN No appenders could be found for logger (org.jbpm.JbpmConfiguration). log4j:WARN Please initialize the log4j system properly. alter table JBPM_ACTION drop foreign key FK_ACTION_EVENT alter table JBPM_ACTION drop foreign key FK_ACTION_EXPTHDL alter table JBPM_ACTION drop foreign key FK_ACTION_PROCDEF alter table JBPM_ACTION drop foreign key FK_CRTETIMERACT_TA alter table JBPM_ACTION drop foreign key FK_ACTION_ACTNDEL alter table JBPM_ACTION drop foreign key FK_ACTION_REFACT alter table JBPM_BYTEARRAY drop foreign key FK_BYTEARR_FILDEF alter table JBPM_BYTEBLOCK drop foreign key FK_BYTEBLOCK_FILE alter table JBPM_COMMENT drop foreign key FK_COMMENT_TOKEN alter table JBPM_COMMENT drop foreign key FK_COMMENT_TSK alter table JBPM_DECISIONCONDITIONS drop foreign key FK_DECCOND_DEC alter table JBPM_DELEGATION drop foreign key FK_DELEGATION_PRCD alter table JBPM_EVENT drop foreign key FK_EVENT_PROCDEF alter table JBPM_EVENT drop foreign key FK_EVENT_NODE alter table JBPM_EVENT drop foreign key FK_EVENT_TRANS alter table JBPM_EVENT drop foreign key FK_EVENT_TASK alter table JBPM_JOB drop foreign key FK_JOB_TOKEN alter table JBPM_JOB drop foreign key FK_JOB_NODE alter table JBPM_JOB drop foreign key FK_JOB_PRINST alter table JBPM_JOB drop foreign key FK_JOB_ACTION alter table JBPM_JOB drop foreign key FK_JOB_TSKINST alter table JBPM_LOG drop foreign key FK_LOG_SOURCENODE alter table JBPM_LOG drop foreign key FK_LOG_TOKEN alter table JBPM_LOG drop foreign key FK_LOG_OLDBYTES alter table JBPM_LOG drop foreign key FK_LOG_NEWBYTES alter table JBPM_LOG drop foreign key FK_LOG_CHILDTOKEN alter table JBPM_LOG drop foreign key FK_LOG_DESTNODE alter table JBPM_LOG drop foreign key FK_LOG_TASKINST alter table JBPM_LOG drop foreign key FK_LOG_SWIMINST alter table JBPM_LOG drop foreign key FK_LOG_PARENT alter table JBPM_LOG drop foreign key FK_LOG_NODE alter table JBPM_LOG drop foreign key FK_LOG_ACTION alter table JBPM_LOG drop foreign key FK_LOG_VARINST alter table JBPM_LOG drop foreign key FK_LOG_TRANSITION alter table JBPM_MODULEDEFINITION drop foreign key FK_TSKDEF_START alter table JBPM_MODULEDEFINITION drop foreign key FK_MODDEF_PROCDEF alter table JBPM_MODULEINSTANCE drop foreign key FK_TASKMGTINST_TMD alter table JBPM_MODULEINSTANCE drop foreign key FK_MODINST_PRCINST alter table JBPM_NODE drop foreign key FK_PROCST_SBPRCDEF alter table JBPM_NODE drop foreign key FK_NODE_PROCDEF alter table JBPM_NODE drop foreign key FK_NODE_SCRIPT alter table JBPM_NODE drop foreign key FK_NODE_ACTION alter table JBPM_NODE drop foreign key FK_DECISION_DELEG alter table JBPM_NODE drop foreign key FK_NODE_SUPERSTATE alter table JBPM_POOLEDACTOR drop foreign key FK_POOLEDACTOR_SLI alter table JBPM_PROCESSDEFINITION drop foreign key FK_PROCDEF_STRTSTA alter table JBPM_PROCESSINSTANCE drop foreign key FK_PROCIN_PROCDEF alter table JBPM_PROCESSINSTANCE drop foreign key FK_PROCIN_ROOTTKN alter table JBPM_PROCESSINSTANCE drop foreign key FK_PROCIN_SPROCTKN alter table JBPM_RUNTIMEACTION drop foreign key FK_RTACTN_PROCINST alter table JBPM_RUNTIMEACTION drop foreign key FK_RTACTN_ACTION alter table JBPM_SWIMLANE drop foreign key FK_SWL_ASSDEL alter table JBPM_SWIMLANE drop foreign key FK_SWL_TSKMGMTDEF alter table JBPM_SWIMLANEINSTANCE drop foreign key FK_SWIMLANEINST_TM alter table JBPM_SWIMLANEINSTANCE drop foreign key FK_SWIMLANEINST_SL alter table JBPM_TASK drop foreign key FK_TSK_TSKCTRL alter table JBPM_TASK drop foreign key FK_TASK_ASSDEL alter table JBPM_TASK drop foreign key FK_TASK_TASKNODE alter table JBPM_TASK drop foreign key FK_TASK_PROCDEF alter table JBPM_TASK drop foreign key FK_TASK_STARTST alter table JBPM_TASK drop foreign key FK_TASK_TASKMGTDEF alter table JBPM_TASK drop foreign key FK_TASK_SWIMLANE alter table JBPM_TASKACTORPOOL drop foreign key FK_TSKACTPOL_PLACT alter table JBPM_TASKACTORPOOL drop foreign key FK_TASKACTPL_TSKI alter table JBPM_TASKCONTROLLER drop foreign key FK_TSKCTRL_DELEG alter table JBPM_TASKINSTANCE drop foreign key FK_TSKINS_PRCINS alter table JBPM_TASKINSTANCE drop foreign key FK_TASKINST_TMINST alter table JBPM_TASKINSTANCE drop foreign key FK_TASKINST_TOKEN alter table JBPM_TASKINSTANCE drop foreign key FK_TASKINST_SLINST alter table JBPM_TASKINSTANCE drop foreign key FK_TASKINST_TASK alter table JBPM_TOKEN drop foreign key FK_TOKEN_PARENT alter table JBPM_TOKEN drop foreign key FK_TOKEN_NODE alter table JBPM_TOKEN drop foreign key FK_TOKEN_PROCINST alter table JBPM_TOKEN drop foreign key FK_TOKEN_SUBPI alter table JBPM_TOKENVARIABLEMAP drop foreign key FK_TKVARMAP_CTXT alter table JBPM_TOKENVARIABLEMAP drop foreign key FK_TKVARMAP_TOKEN alter table JBPM_TRANSITION drop foreign key FK_TRANSITION_TO alter table JBPM_TRANSITION drop foreign key FK_TRANS_PROCDEF alter table JBPM_TRANSITION drop foreign key FK_TRANSITION_FROM alter table JBPM_VARIABLEACCESS drop foreign key FK_VARACC_TSKCTRL alter table JBPM_VARIABLEACCESS drop foreign key FK_VARACC_SCRIPT alter table JBPM_VARIABLEACCESS drop foreign key FK_VARACC_PROCST alter table JBPM_VARIABLEINSTANCE drop foreign key FK_VARINST_TK alter table JBPM_VARIABLEINSTANCE drop foreign key FK_VARINST_TKVARMP alter table JBPM_VARIABLEINSTANCE drop foreign key FK_VARINST_PRCINST alter table JBPM_VARIABLEINSTANCE drop foreign key FK_VAR_TSKINST alter table JBPM_VARIABLEINSTANCE drop foreign key FK_BYTEINST_ARRAY drop table if exists JBPM_ACTION drop table if exists JBPM_BYTEARRAY drop table if exists JBPM_BYTEBLOCK drop table if exists JBPM_COMMENT drop table if exists JBPM_DECISIONCONDITIONS drop table if exists JBPM_DELEGATION drop table if exists JBPM_EVENT drop table if exists JBPM_EXCEPTIONHANDLER drop table if exists JBPM_JOB drop table if exists JBPM_LOG drop table if exists JBPM_MODULEDEFINITION drop table if exists JBPM_MODULEINSTANCE drop table if exists JBPM_NODE drop table if exists JBPM_POOLEDACTOR drop table if exists JBPM_PROCESSDEFINITION drop table if exists JBPM_PROCESSINSTANCE drop table if exists JBPM_RUNTIMEACTION drop table if exists JBPM_SWIMLANE drop table if exists JBPM_SWIMLANEINSTANCE drop table if exists JBPM_TASK drop table if exists JBPM_TASKACTORPOOL drop table if exists JBPM_TASKCONTROLLER drop table if exists JBPM_TASKINSTANCE drop table if exists JBPM_TOKEN drop table if exists JBPM_TOKENVARIABLEMAP drop table if exists JBPM_TRANSITION drop table if exists JBPM_VARIABLEACCESS drop table if exists JBPM_VARIABLEINSTANCE create table JBPM_ACTION (ID_ bigint not null auto_increment, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ text, 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 auto_increment, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_)) create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_)) create table JBPM_COMMENT (ID_ bigint not null auto_increment, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ datetime, MESSAGE_ text, 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 auto_increment, CLASSNAME_ text, CONFIGURATION_ text, CONFIGTYPE_ varchar(255), PROCESSDEFINITION_ bigint, primary key (ID_)) create table JBPM_EVENT (ID_ bigint not null auto_increment, 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 auto_increment, EXCEPTIONCLASSNAME_ text, TYPE_ char(1), GRAPHELEMENT_ bigint, PROCESSDEFINITION_ bigint, GRAPHELEMENTINDEX_ integer, NODE_ bigint, TRANSITION_ bigint, TASK_ bigint, primary key (ID_)) create table JBPM_JOB (ID_ bigint not null auto_increment, CLASS_ char(1) not null, VERSION_ integer not null, DUEDATE_ datetime, PROCESSINSTANCE_ bigint, TOKEN_ bigint, TASKINSTANCE_ bigint, ISSUSPENDED_ bit, ISEXCLUSIVE_ bit, LOCKOWNER_ varchar(255), LOCKTIME_ datetime, EXCEPTION_ text, 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 auto_increment, CLASS_ char(1) not null, INDEX_ integer, DATE_ datetime, TOKEN_ bigint, PARENT_ bigint, MESSAGE_ text, EXCEPTION_ text, ACTION_ bigint, NODE_ bigint, ENTER_ datetime, LEAVE_ datetime, DURATION_ bigint, NEWLONGVALUE_ bigint, TRANSITION_ bigint, CHILD_ bigint, SOURCENODE_ bigint, DESTINATIONNODE_ bigint, VARIABLEINSTANCE_ bigint, OLDBYTEARRAY_ bigint, NEWBYTEARRAY_ bigint, OLDDATEVALUE_ datetime, NEWDATEVALUE_ datetime, OLDDOUBLEVALUE_ double precision, NEWDOUBLEVALUE_ double precision, 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_ text, NEWSTRINGVALUE_ text, TASKINSTANCE_ bigint, TASKACTORID_ varchar(255), TASKOLDACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_)) create table JBPM_MODULEDEFINITION (ID_ bigint not null auto_increment, CLASS_ char(1) not null, NAME_ text, PROCESSDEFINITION_ bigint, STARTTASK_ bigint, primary key (ID_)) create table JBPM_MODULEINSTANCE (ID_ bigint not null auto_increment, 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 auto_increment, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ text, 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 auto_increment, VERSION_ integer not null, ACTORID_ varchar(255), SWIMLANEINSTANCE_ bigint, primary key (ID_)) create table JBPM_PROCESSDEFINITION (ID_ bigint not null auto_increment, CLASS_ char(1) not null, NAME_ varchar(255), DESCRIPTION_ text, VERSION_ integer, ISTERMINATIONIMPLICIT_ bit, STARTSTATE_ bigint, primary key (ID_)) create table JBPM_PROCESSINSTANCE (ID_ bigint not null auto_increment, VERSION_ integer not null, KEY_ varchar(255), START_ datetime, END_ datetime, ISSUSPENDED_ bit, PROCESSDEFINITION_ bigint, ROOTTOKEN_ bigint, SUPERPROCESSTOKEN_ bigint, primary key (ID_)) create table JBPM_RUNTIMEACTION (ID_ bigint not null auto_increment, 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 auto_increment, NAME_ varchar(255), ACTORIDEXPRESSION_ varchar(255), POOLEDACTORSEXPRESSION_ varchar(255), ASSIGNMENTDELEGATION_ bigint, TASKMGMTDEFINITION_ bigint, primary key (ID_)) create table JBPM_SWIMLANEINSTANCE (ID_ bigint not null auto_increment, 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 auto_increment, NAME_ varchar(255), DESCRIPTION_ text, 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 auto_increment, TASKCONTROLLERDELEGATION_ bigint, primary key (ID_)) create table JBPM_TASKINSTANCE (ID_ bigint not null auto_increment, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), DESCRIPTION_ text, ACTORID_ varchar(255), CREATE_ datetime, START_ datetime, END_ datetime, DUEDATE_ datetime, 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 auto_increment, VERSION_ integer not null, NAME_ varchar(255), START_ datetime, END_ datetime, NODEENTER_ datetime, 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 auto_increment, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_)) 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_)) 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_)) 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_)) 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 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_) alter table JBPM_ACTION add index FK_CRTETIMERACT_TA (TIMERACTION_), add constraint FK_CRTETIMERACT_TA foreign key (TIMERACTION_) references JBPM_ACTION (ID_) alter table JBPM_ACTION add index FK_ACTION_ACTNDEL (ACTIONDELEGATION_), add constraint FK_ACTION_ACTNDEL foreign key (ACTIONDELEGATION_) references JBPM_DELEGATION (ID_) alter table JBPM_ACTION add index FK_ACTION_REFACT (REFERENCEDACTION_), add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION (ID_) alter table JBPM_BYTEARRAY add index FK_BYTEARR_FILDEF (FILEDEFINITION_), add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION (ID_) alter table JBPM_BYTEBLOCK add index FK_BYTEBLOCK_FILE (PROCESSFILE_), add constraint FK_BYTEBLOCK_FILE foreign key (PROCESSFILE_) references JBPM_BYTEARRAY (ID_) create index IDX_COMMENT_TOKEN on JBPM_COMMENT (TOKEN_) create index IDX_COMMENT_TSK on JBPM_COMMENT (TASKINSTANCE_) alter table JBPM_COMMENT add index FK_COMMENT_TOKEN (TOKEN_), add constraint FK_COMMENT_TOKEN foreign key (TOKEN_) references JBPM_TOKEN (ID_) alter table JBPM_COMMENT add index FK_COMMENT_TSK (TASKINSTANCE_), add constraint FK_COMMENT_TSK foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE (ID_) alter table JBPM_DECISIONCONDITIONS add index FK_DECCOND_DEC (DECISION_), add constraint FK_DECCOND_DEC foreign key (DECISION_) references JBPM_NODE (ID_) create index IDX_DELEG_PRCD on JBPM_DELEGATION (PROCESSDEFINITION_) alter table JBPM_DELEGATION add index FK_DELEGATION_PRCD (PROCESSDEFINITION_), add constraint FK_DELEGATION_PRCD foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_) alter table JBPM_EVENT add index FK_EVENT_PROCDEF (PROCESSDEFINITION_), add constraint FK_EVENT_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_) alter table JBPM_EVENT add index FK_EVENT_NODE (NODE_), add constraint FK_EVENT_NODE foreign key (NODE_) references JBPM_NODE (ID_) alter table JBPM_EVENT add index FK_EVENT_TRANS (TRANSITION_), add constraint FK_EVENT_TRANS foreign key (TRANSITION_) references JBPM_TRANSITION (ID_) alter table JBPM_EVENT add index FK_EVENT_TASK (TASK_), add constraint FK_EVENT_TASK foreign key (TASK_) references JBPM_TASK (ID_) 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 index FK_JOB_TOKEN (TOKEN_), add constraint FK_JOB_TOKEN foreign key (TOKEN_) references JBPM_TOKEN (ID_) alter table JBPM_JOB add index FK_JOB_NODE (NODE_), add constraint FK_JOB_NODE foreign key (NODE_) references JBPM_NODE (ID_) 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_) 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_) alter table JBPM_LOG add index FK_LOG_NEWBYTES (NEWBYTEARRAY_), add constraint FK_LOG_NEWBYTES foreign key (NEWBYTEARRAY_) references JBPM_BYTEARRAY (ID_) alter table JBPM_LOG add index FK_LOG_CHILDTOKEN (CHILD_), add constraint FK_LOG_CHILDTOKEN foreign key (CHILD_) references JBPM_TOKEN (ID_) alter table JBPM_LOG add index FK_LOG_DESTNODE (DESTINATIONNODE_), add constraint FK_LOG_DESTNODE foreign key (DESTINATIONNODE_) references JBPM_NODE (ID_) alter table JBPM_LOG add index FK_LOG_TASKINST (TASKINSTANCE_), add constraint FK_LOG_TASKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE (ID_) alter table JBPM_LOG add index FK_LOG_SWIMINST (SWIMLANEINSTANCE_), add constraint FK_LOG_SWIMINST foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE (ID_) alter table JBPM_LOG add index FK_LOG_PARENT (PARENT_), add constraint FK_LOG_PARENT foreign key (PARENT_) references JBPM_LOG (ID_) alter table JBPM_LOG add index FK_LOG_NODE (NODE_), add constraint FK_LOG_NODE foreign key (NODE_) references JBPM_NODE (ID_) 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_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_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_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 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_) alter table JBPM_NODE add index FK_NODE_SCRIPT (SCRIPT_), add constraint FK_NODE_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION (ID_) alter table JBPM_NODE add index FK_NODE_ACTION (ACTION_), add constraint FK_NODE_ACTION foreign key (ACTION_) references JBPM_ACTION (ID_) alter table JBPM_NODE add index FK_DECISION_DELEG (DECISIONDELEGATION), add constraint FK_DECISION_DELEG foreign key (DECISIONDELEGATION) references JBPM_DELEGATION (ID_) alter table JBPM_NODE add index FK_NODE_SUPERSTATE (SUPERSTATE_), add constraint FK_NODE_SUPERSTATE foreign key (SUPERSTATE_) references JBPM_NODE (ID_) create index IDX_PLDACTR_ACTID on JBPM_POOLEDACTOR (ACTORID_) create index IDX_TSKINST_SWLANE on JBPM_POOLEDACTOR (SWIMLANEINSTANCE_) alter table JBPM_POOLEDACTOR add index FK_POOLEDACTOR_SLI (SWIMLANEINSTANCE_), add constraint FK_POOLEDACTOR_SLI foreign key (SWIMLANEINSTANCE_) references JBPM_SWIMLANEINSTANCE (ID_) create index IDX_PROCDEF_STRTST on JBPM_PROCESSDEFINITION (STARTSTATE_) alter table JBPM_PROCESSDEFINITION add index FK_PROCDEF_STRTSTA (STARTSTATE_), add constraint FK_PROCDEF_STRTSTA foreign key (STARTSTATE_) references JBPM_NODE (ID_) 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 index FK_PROCIN_PROCDEF (PROCESSDEFINITION_), add constraint FK_PROCIN_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_) alter table JBPM_PROCESSINSTANCE add index FK_PROCIN_ROOTTKN (ROOTTOKEN_), add constraint FK_PROCIN_ROOTTKN foreign key (ROOTTOKEN_) references JBPM_TOKEN (ID_) alter table JBPM_PROCESSINSTANCE add index FK_PROCIN_SPROCTKN (SUPERPROCESSTOKEN_), add constraint FK_PROCIN_SPROCTKN foreign key (SUPERPROCESSTOKEN_) references JBPM_TOKEN (ID_) create index IDX_RTACTN_PRCINST on JBPM_RUNTIMEACTION (PROCESSINSTANCE_) 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_) 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_) 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_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 index FK_TSK_TSKCTRL (TASKCONTROLLER_), add constraint FK_TSK_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER (ID_) alter table JBPM_TASK add index FK_TASK_ASSDEL (ASSIGNMENTDELEGATION_), add constraint FK_TASK_ASSDEL foreign key (ASSIGNMENTDELEGATION_) references JBPM_DELEGATION (ID_) alter table JBPM_TASK add index FK_TASK_TASKNODE (TASKNODE_), add constraint FK_TASK_TASKNODE foreign key (TASKNODE_) references JBPM_NODE (ID_) alter table JBPM_TASK add index FK_TASK_PROCDEF (PROCESSDEFINITION_), add constraint FK_TASK_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_) alter table JBPM_TASK add index FK_TASK_STARTST (STARTSTATE_), add constraint FK_TASK_STARTST foreign key (STARTSTATE_) references JBPM_NODE (ID_) alter table JBPM_TASK add index FK_TASK_TASKMGTDEF (TASKMGMTDEFINITION_), add constraint FK_TASK_TASKMGTDEF foreign key (TASKMGMTDEFINITION_) references JBPM_MODULEDEFINITION (ID_) 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_) 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_) 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 index FK_TSKINS_PRCINS (PROCINST_), add constraint FK_TSKINS_PRCINS foreign key (PROCINST_) references JBPM_PROCESSINSTANCE (ID_) alter table JBPM_TASKINSTANCE add index FK_TASKINST_TMINST (TASKMGMTINSTANCE_), add constraint FK_TASKINST_TMINST foreign key (TASKMGMTINSTANCE_) references JBPM_MODULEINSTANCE (ID_) alter table JBPM_TASKINSTANCE add index FK_TASKINST_TOKEN (TOKEN_), add constraint FK_TASKINST_TOKEN foreign key (TOKEN_) references JBPM_TOKEN (ID_) alter table JBPM_TASKINSTANCE add index FK_TASKINST_SLINST (SWIMLANINSTANCE_), add constraint FK_TASKINST_SLINST foreign key (SWIMLANINSTANCE_) references JBPM_SWIMLANEINSTANCE (ID_) alter table JBPM_TASKINSTANCE add index FK_TASKINST_TASK (TASK_), add constraint FK_TASKINST_TASK foreign key (TASK_) references JBPM_TASK (ID_) 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 index FK_TOKEN_PARENT (PARENT_), add constraint FK_TOKEN_PARENT foreign key (PARENT_) references JBPM_TOKEN (ID_) alter table JBPM_TOKEN add index FK_TOKEN_NODE (NODE_), add constraint FK_TOKEN_NODE foreign key (NODE_) references JBPM_NODE (ID_) alter table JBPM_TOKEN add index FK_TOKEN_PROCINST (PROCESSINSTANCE_), add constraint FK_TOKEN_PROCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_) alter table JBPM_TOKEN add index FK_TOKEN_SUBPI (SUBPROCESSINSTANCE_), add constraint FK_TOKEN_SUBPI foreign key (SUBPROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_) create index IDX_TKVARMAP_CTXT on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_) create index IDX_TKVVARMP_TOKEN on JBPM_TOKENVARIABLEMAP (TOKEN_) alter table JBPM_TOKENVARIABLEMAP add index FK_TKVARMAP_CTXT (CONTEXTINSTANCE_), add constraint FK_TKVARMAP_CTXT foreign key (CONTEXTINSTANCE_) references JBPM_MODULEINSTANCE (ID_) alter table JBPM_TOKENVARIABLEMAP add index FK_TKVARMAP_TOKEN (TOKEN_), add constraint FK_TKVARMAP_TOKEN foreign key (TOKEN_) references JBPM_TOKEN (ID_) 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 index FK_TRANSITION_TO (TO_), add constraint FK_TRANSITION_TO foreign key (TO_) references JBPM_NODE (ID_) alter table JBPM_TRANSITION add index FK_TRANS_PROCDEF (PROCESSDEFINITION_), add constraint FK_TRANS_PROCDEF foreign key (PROCESSDEFINITION_) references JBPM_PROCESSDEFINITION (ID_) alter table JBPM_TRANSITION add index FK_TRANSITION_FROM (FROM_), add constraint FK_TRANSITION_FROM foreign key (FROM_) references JBPM_NODE (ID_) alter table JBPM_VARIABLEACCESS add index FK_VARACC_TSKCTRL (TASKCONTROLLER_), add constraint FK_VARACC_TSKCTRL foreign key (TASKCONTROLLER_) references JBPM_TASKCONTROLLER (ID_) alter table JBPM_VARIABLEACCESS add index FK_VARACC_SCRIPT (SCRIPT_), add constraint FK_VARACC_SCRIPT foreign key (SCRIPT_) references JBPM_ACTION (ID_) 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_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_) alter table JBPM_VARIABLEINSTANCE add index FK_VARINST_PRCINST (PROCESSINSTANCE_), add constraint FK_VARINST_PRCINST foreign key (PROCESSINSTANCE_) references JBPM_PROCESSINSTANCE (ID_) alter table JBPM_VARIABLEINSTANCE add index FK_VAR_TSKINST (TASKINSTANCE_), add constraint FK_VAR_TSKINST foreign key (TASKINSTANCE_) references JBPM_TASKINSTANCE (ID_) alter table JBPM_VARIABLEINSTANCE add index FK_BYTEINST_ARRAY (BYTEARRAYVALUE_), add constraint FK_BYTEINST_ARRAY foreign key (BYTEARRAYVALUE_) references JBPM_BYTEARRAY (ID_) Hibernate: select processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ? Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, DESCRIPTION_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_, CLASS_) values (?, ?, ?, ?, ?, 'P') Hibernate: insert into JBPM_NODE (NAME_, DESCRIPTION_, PROCESSDEFINITION_, ISASYNC_, ISASYNCEXCL_, ACTION_, SUPERSTATE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'R') Hibernate: insert into JBPM_TRANSITION (NAME_, DESCRIPTION_, PROCESSDEFINITION_, FROM_, TO_, CONDITION_) values (?, ?, ?, ?, ?, ?) Hibernate: insert into JBPM_NODE (NAME_, DESCRIPTION_, PROCESSDEFINITION_, ISASYNC_, ISASYNCEXCL_, ACTION_, SUPERSTATE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'S') Hibernate: insert into JBPM_TRANSITION (NAME_, DESCRIPTION_, PROCESSDEFINITION_, FROM_, TO_, CONDITION_) values (?, ?, ?, ?, ?, ?) Hibernate: insert into JBPM_NODE (NAME_, DESCRIPTION_, PROCESSDEFINITION_, ISASYNC_, ISASYNCEXCL_, ACTION_, SUPERSTATE_, SUBPROCNAME_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, ?, 'E') Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, CLASS_) values (?, ?, 'C') Hibernate: insert into JBPM_MODULEDEFINITION (NAME_, PROCESSDEFINITION_, STARTTASK_, CLASS_) values (?, ?, ?, 'T') Hibernate: update JBPM_PROCESSDEFINITION set NAME_=?, DESCRIPTION_=?, VERSION_=?, ISTERMINATIONIMPLICIT_=?, STARTSTATE_=? where ID_=? Hibernate: update JBPM_TRANSITION set NAME_=?, DESCRIPTION_=?, PROCESSDEFINITION_=?, FROM_=?, TO_=?, CONDITION_=? where ID_=? Hibernate: update JBPM_TRANSITION set NAME_=?, DESCRIPTION_=?, PROCESSDEFINITION_=?, FROM_=?, TO_=?, CONDITION_=? where ID_=? Hibernate: update JBPM_NODE set PROCESSDEFINITION_=?, NODECOLLECTIONINDEX_=? where ID_=? Hibernate: update JBPM_NODE set PROCESSDEFINITION_=?, NODECOLLECTIONINDEX_=? where ID_=? Hibernate: update JBPM_NODE set PROCESSDEFINITION_=?, NODECOLLECTIONINDEX_=? where ID_=? Hibernate: update JBPM_MODULEDEFINITION set PROCESSDEFINITION_=?, NAME_=? where ID_=? Hibernate: update JBPM_MODULEDEFINITION set PROCESSDEFINITION_=?, NAME_=? where ID_=? Hibernate: update JBPM_TRANSITION set FROM_=?, FROMINDEX_=? where ID_=? Hibernate: update JBPM_TRANSITION set FROM_=?, FROMINDEX_=? where ID_=? Hibernate: update JBPM_TRANSITION set TO_=? where ID_=? Hibernate: update JBPM_TRANSITION set TO_=? where ID_=? Hibernate: select processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ? Hibernate: select exceptionh0_.PROCESSDEFINITION_ as PROCESSD5_1_, exceptionh0_.ID_ as ID1_1_, exceptionh0_.GRAPHELEMENTINDEX_ as GRAPHELE6_1_, exceptionh0_.ID_ as ID1_5_0_, exceptionh0_.EXCEPTIONCLASSNAME_ as EXCEPTIO2_5_0_, exceptionh0_.TYPE_ as TYPE3_5_0_, exceptionh0_.GRAPHELEMENT_ as GRAPHELE4_5_0_ from JBPM_EXCEPTIONHANDLER exceptionh0_ where exceptionh0_.PROCESSDEFINITION_=? Hibernate: insert into JBPM_TOKEN (VERSION_, NAME_, START_, END_, NODEENTER_, NEXTLOGINDEX_, ISABLETOREACTIVATEPARENT_, ISTERMINATIONIMPLICIT_, ISSUSPENDED_, LOCK_, NODE_, PROCESSINSTANCE_, PARENT_, SUBPROCESSINSTANCE_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into JBPM_PROCESSINSTANCE (VERSION_, KEY_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (?, ?, ?, ?, ?, ?, ?, ?) Hibernate: select definition0_.PROCESSDEFINITION_ as PROCESSD4_1_, definition0_.ID_ as ID1_1_, definition0_.NAME_ as NAME3_1_, definition0_.ID_ as ID1_11_0_, definition0_.NAME_ as NAME3_11_0_, definition0_.PROCESSDEFINITION_ as PROCESSD4_11_0_, definition0_.STARTTASK_ as STARTTASK5_11_0_, definition0_.CLASS_ as CLASS2_11_0_ from JBPM_MODULEDEFINITION definition0_ where definition0_.PROCESSDEFINITION_=? Hibernate: select events0_.PROCESSDEFINITION_ as PROCESSD5_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.PROCESSDEFINITION_=? Hibernate: select node0_.ID_ as ID1_1_0_, node0_.NAME_ as NAME3_1_0_, node0_.DESCRIPTION_ as DESCRIPT4_1_0_, node0_.PROCESSDEFINITION_ as PROCESSD5_1_0_, node0_.ISASYNC_ as ISASYNC6_1_0_, node0_.ISASYNCEXCL_ as ISASYNCE7_1_0_, node0_.ACTION_ as ACTION8_1_0_, node0_.SUPERSTATE_ as SUPERSTATE9_1_0_, node0_.SUBPROCNAME_ as SUBPROC10_1_0_, node0_.SUBPROCESSDEFINITION_ as SUBPROC11_1_0_, node0_.DECISIONEXPRESSION_ as DECISIO12_1_0_, node0_.DECISIONDELEGATION as DECISIO13_1_0_, node0_.SCRIPT_ as SCRIPT14_1_0_, node0_.SIGNAL_ as SIGNAL15_1_0_, node0_.CREATETASKS_ as CREATET16_1_0_, node0_.ENDTASKS_ as ENDTASKS17_1_0_, node0_.CLASS_ as CLASS2_1_0_ from JBPM_NODE node0_ where node0_.ID_=? Hibernate: select leavingtra0_.FROM_ as FROM5_1_, leavingtra0_.ID_ as ID1_1_, leavingtra0_.FROMINDEX_ as FROMINDEX8_1_, leavingtra0_.ID_ as ID1_2_0_, leavingtra0_.NAME_ as NAME2_2_0_, leavingtra0_.DESCRIPTION_ as DESCRIPT3_2_0_, leavingtra0_.PROCESSDEFINITION_ as PROCESSD4_2_0_, leavingtra0_.FROM_ as FROM5_2_0_, leavingtra0_.TO_ as TO6_2_0_, leavingtra0_.CONDITION_ as CONDITION7_2_0_ from JBPM_TRANSITION leavingtra0_ where leavingtra0_.FROM_=? Hibernate: select exceptionh0_.TRANSITION_ as TRANSITION8_1_, exceptionh0_.ID_ as ID1_1_, exceptionh0_.GRAPHELEMENTINDEX_ as GRAPHELE6_1_, exceptionh0_.ID_ as ID1_5_0_, exceptionh0_.EXCEPTIONCLASSNAME_ as EXCEPTIO2_5_0_, exceptionh0_.TYPE_ as TYPE3_5_0_, exceptionh0_.GRAPHELEMENT_ as GRAPHELE4_5_0_ from JBPM_EXCEPTIONHANDLER exceptionh0_ where exceptionh0_.TRANSITION_=? Hibernate: select events0_.NODE_ as NODE6_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.NODE_=? Hibernate: select events0_.TRANSITION_ as TRANSITION7_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.TRANSITION_=? Hibernate: select node0_.ID_ as ID1_1_0_, node0_.NAME_ as NAME3_1_0_, node0_.DESCRIPTION_ as DESCRIPT4_1_0_, node0_.PROCESSDEFINITION_ as PROCESSD5_1_0_, node0_.ISASYNC_ as ISASYNC6_1_0_, node0_.ISASYNCEXCL_ as ISASYNCE7_1_0_, node0_.ACTION_ as ACTION8_1_0_, node0_.SUPERSTATE_ as SUPERSTATE9_1_0_, node0_.SUBPROCNAME_ as SUBPROC10_1_0_, node0_.SUBPROCESSDEFINITION_ as SUBPROC11_1_0_, node0_.DECISIONEXPRESSION_ as DECISIO12_1_0_, node0_.DECISIONDELEGATION as DECISIO13_1_0_, node0_.SCRIPT_ as SCRIPT14_1_0_, node0_.SIGNAL_ as SIGNAL15_1_0_, node0_.CREATETASKS_ as CREATET16_1_0_, node0_.ENDTASKS_ as ENDTASKS17_1_0_, node0_.CLASS_ as CLASS2_1_0_ from JBPM_NODE node0_ where node0_.ID_=? Hibernate: select events0_.NODE_ as NODE6_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.NODE_=? Hibernate: insert into JBPM_MODULEINSTANCE (VERSION_, PROCESSINSTANCE_, TASKMGMTDEFINITION_, CLASS_) values (?, ?, ?, 'T') Hibernate: insert into JBPM_MODULEINSTANCE (VERSION_, PROCESSINSTANCE_, CLASS_) values (?, ?, 'C') Hibernate: update JBPM_TOKEN set VERSION_=?, NAME_=?, START_=?, END_=?, NODEENTER_=?, NEXTLOGINDEX_=?, ISABLETOREACTIVATEPARENT_=?, ISTERMINATIONIMPLICIT_=?, ISSUSPENDED_=?, LOCK_=?, NODE_=?, PROCESSINSTANCE_=?, PARENT_=?, SUBPROCESSINSTANCE_=? where ID_=? and VERSION_=? Hibernate: update JBPM_PROCESSINSTANCE set VERSION_=?, KEY_=?, START_=?, END_=?, ISSUSPENDED_=?, PROCESSDEFINITION_=?, ROOTTOKEN_=?, SUPERPROCESSTOKEN_=? where ID_=? and VERSION_=? Hibernate: update JBPM_MODULEINSTANCE set PROCESSINSTANCE_=?, NAME_=? where ID_=? Hibernate: update JBPM_MODULEINSTANCE set PROCESSINSTANCE_=?, NAME_=? where ID_=? Hibernate: select processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ? Hibernate: select processins0_.ID_ as ID1_16_, processins0_.VERSION_ as VERSION2_16_, processins0_.KEY_ as KEY3_16_, processins0_.START_ as START4_16_, processins0_.END_ as END5_16_, processins0_.ISSUSPENDED_ as ISSUSPEN6_16_, processins0_.PROCESSDEFINITION_ as PROCESSD7_16_, processins0_.ROOTTOKEN_ as ROOTTOKEN8_16_, processins0_.SUPERPROCESSTOKEN_ as SUPERPRO9_16_ from JBPM_PROCESSINSTANCE processins0_ where processins0_.PROCESSDEFINITION_=? order by processins0_.START_ desc Hibernate: select token0_.ID_ as ID1_17_0_, token0_.VERSION_ as VERSION2_17_0_, token0_.NAME_ as NAME3_17_0_, token0_.START_ as START4_17_0_, token0_.END_ as END5_17_0_, token0_.NODEENTER_ as NODEENTER6_17_0_, token0_.NEXTLOGINDEX_ as NEXTLOGI7_17_0_, token0_.ISABLETOREACTIVATEPARENT_ as ISABLETO8_17_0_, token0_.ISTERMINATIONIMPLICIT_ as ISTERMIN9_17_0_, token0_.ISSUSPENDED_ as ISSUSPE10_17_0_, token0_.LOCK_ as LOCK11_17_0_, token0_.NODE_ as NODE12_17_0_, token0_.PROCESSINSTANCE_ as PROCESS13_17_0_, token0_.PARENT_ as PARENT14_17_0_, token0_.SUBPROCESSINSTANCE_ as SUBPROC15_17_0_ from JBPM_TOKEN token0_ where token0_.ID_=? Hibernate: select leavingtra0_.FROM_ as FROM5_1_, leavingtra0_.ID_ as ID1_1_, leavingtra0_.FROMINDEX_ as FROMINDEX8_1_, leavingtra0_.ID_ as ID1_2_0_, leavingtra0_.NAME_ as NAME2_2_0_, leavingtra0_.DESCRIPTION_ as DESCRIPT3_2_0_, leavingtra0_.PROCESSDEFINITION_ as PROCESSD4_2_0_, leavingtra0_.FROM_ as FROM5_2_0_, leavingtra0_.TO_ as TO6_2_0_, leavingtra0_.CONDITION_ as CONDITION7_2_0_ from JBPM_TRANSITION leavingtra0_ where leavingtra0_.FROM_=? Hibernate: select exceptionh0_.TRANSITION_ as TRANSITION8_1_, exceptionh0_.ID_ as ID1_1_, exceptionh0_.GRAPHELEMENTINDEX_ as GRAPHELE6_1_, exceptionh0_.ID_ as ID1_5_0_, exceptionh0_.EXCEPTIONCLASSNAME_ as EXCEPTIO2_5_0_, exceptionh0_.TYPE_ as TYPE3_5_0_, exceptionh0_.GRAPHELEMENT_ as GRAPHELE4_5_0_ from JBPM_EXCEPTIONHANDLER exceptionh0_ where exceptionh0_.TRANSITION_=? Hibernate: select instances0_.PROCESSINSTANCE_ as PROCESSI4_1_, instances0_.ID_ as ID1_1_, instances0_.NAME_ as NAME6_1_, instances0_.ID_ as ID1_19_0_, instances0_.VERSION_ as VERSION3_19_0_, instances0_.PROCESSINSTANCE_ as PROCESSI4_19_0_, instances0_.TASKMGMTDEFINITION_ as TASKMGMT5_19_0_, instances0_.CLASS_ as CLASS2_19_0_ from JBPM_MODULEINSTANCE instances0_ where instances0_.PROCESSINSTANCE_=? Hibernate: select runtimeact0_.PROCESSINSTANCE_ as PROCESSI6_1_, runtimeact0_.ID_ as ID1_1_, runtimeact0_.PROCESSINSTANCEINDEX_ as PROCESSI8_1_, runtimeact0_.ID_ as ID1_18_0_, runtimeact0_.VERSION_ as VERSION2_18_0_, runtimeact0_.EVENTTYPE_ as EVENTTYPE3_18_0_, runtimeact0_.TYPE_ as TYPE4_18_0_, runtimeact0_.GRAPHELEMENT_ as GRAPHELE5_18_0_, runtimeact0_.PROCESSINSTANCE_ as PROCESSI6_18_0_, runtimeact0_.ACTION_ as ACTION7_18_0_ from JBPM_RUNTIMEACTION runtimeact0_ where runtimeact0_.PROCESSINSTANCE_=? Hibernate: select events0_.TRANSITION_ as TRANSITION7_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.TRANSITION_=? Hibernate: select node0_.ID_ as ID1_1_0_, node0_.NAME_ as NAME3_1_0_, node0_.DESCRIPTION_ as DESCRIPT4_1_0_, node0_.PROCESSDEFINITION_ as PROCESSD5_1_0_, node0_.ISASYNC_ as ISASYNC6_1_0_, node0_.ISASYNCEXCL_ as ISASYNCE7_1_0_, node0_.ACTION_ as ACTION8_1_0_, node0_.SUPERSTATE_ as SUPERSTATE9_1_0_, node0_.SUBPROCNAME_ as SUBPROC10_1_0_, node0_.SUBPROCESSDEFINITION_ as SUBPROC11_1_0_, node0_.DECISIONEXPRESSION_ as DECISIO12_1_0_, node0_.DECISIONDELEGATION as DECISIO13_1_0_, node0_.SCRIPT_ as SCRIPT14_1_0_, node0_.SIGNAL_ as SIGNAL15_1_0_, node0_.CREATETASKS_ as CREATET16_1_0_, node0_.ENDTASKS_ as ENDTASKS17_1_0_, node0_.CLASS_ as CLASS2_1_0_ from JBPM_NODE node0_ where node0_.ID_=? Hibernate: select events0_.NODE_ as NODE6_1_, events0_.ID_ as ID1_1_, events0_.EVENTTYPE_ as EVENTTYPE2_1_, events0_.ID_ as ID1_3_0_, events0_.EVENTTYPE_ as EVENTTYPE2_3_0_, events0_.TYPE_ as TYPE3_3_0_, events0_.GRAPHELEMENT_ as GRAPHELE4_3_0_ from JBPM_EVENT events0_ where events0_.NODE_=? Hibernate: select children0_.PARENT_ as PARENT14_1_, children0_.ID_ as ID1_1_, children0_.NAME_ as NAME3_1_, children0_.ID_ as ID1_17_0_, children0_.VERSION_ as VERSION2_17_0_, children0_.NAME_ as NAME3_17_0_, children0_.START_ as START4_17_0_, children0_.END_ as END5_17_0_, children0_.NODEENTER_ as NODEENTER6_17_0_, children0_.NEXTLOGINDEX_ as NEXTLOGI7_17_0_, children0_.ISABLETOREACTIVATEPARENT_ as ISABLETO8_17_0_, children0_.ISTERMINATIONIMPLICIT_ as ISTERMIN9_17_0_, children0_.ISSUSPENDED_ as ISSUSPE10_17_0_, children0_.LOCK_ as LOCK11_17_0_, children0_.NODE_ as NODE12_17_0_, children0_.PROCESSINSTANCE_ as PROCESS13_17_0_, children0_.PARENT_ as PARENT14_17_0_, children0_.SUBPROCESSINSTANCE_ as SUBPROC15_17_0_ from JBPM_TOKEN children0_ where children0_.PARENT_=? Hibernate: select taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM21_1_, taskinstan0_.ID_ as ID1_1_, taskinstan0_.ID_ as ID1_23_0_, taskinstan0_.VERSION_ as VERSION3_23_0_, taskinstan0_.NAME_ as NAME4_23_0_, taskinstan0_.DESCRIPTION_ as DESCRIPT5_23_0_, taskinstan0_.ACTORID_ as ACTORID6_23_0_, taskinstan0_.CREATE_ as CREATE7_23_0_, taskinstan0_.START_ as START8_23_0_, taskinstan0_.END_ as END9_23_0_, taskinstan0_.DUEDATE_ as DUEDATE10_23_0_, taskinstan0_.PRIORITY_ as PRIORITY11_23_0_, taskinstan0_.ISCANCELLED_ as ISCANCE12_23_0_, taskinstan0_.ISSUSPENDED_ as ISSUSPE13_23_0_, taskinstan0_.ISOPEN_ as ISOPEN14_23_0_, taskinstan0_.ISSIGNALLING_ as ISSIGNA15_23_0_, taskinstan0_.ISBLOCKING_ as ISBLOCKING16_23_0_, taskinstan0_.TASK_ as TASK17_23_0_, taskinstan0_.TOKEN_ as TOKEN18_23_0_, taskinstan0_.PROCINST_ as PROCINST19_23_0_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN20_23_0_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM21_23_0_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.TASKMGMTINSTANCE_=? Hibernate: update JBPM_PROCESSINSTANCE set VERSION_=?, KEY_=?, START_=?, END_=?, ISSUSPENDED_=?, PROCESSDEFINITION_=?, ROOTTOKEN_=?, SUPERPROCESSTOKEN_=? where ID_=? and VERSION_=? Hibernate: update JBPM_TOKEN set VERSION_=?, NAME_=?, START_=?, END_=?, NODEENTER_=?, NEXTLOGINDEX_=?, ISABLETOREACTIVATEPARENT_=?, ISTERMINATIONIMPLICIT_=?, ISSUSPENDED_=?, LOCK_=?, NODE_=?, PROCESSINSTANCE_=?, PARENT_=?, SUBPROCESSINSTANCE_=? where ID_=? and VERSION_=?
此时你可要查看jbpm数据库中已经有表存在,而且JBPM_PROCESSINSTANCE 、JBPM_TOKEN 这两个表插入了一条数据。并且在第一次运行完之后要将<property name="hibernate.hbm2ddl.auto">create</property>改成<property name="hibernate.hbm2ddl.auto">update</property>,要不每次都会重新创建表结构。
问题注意点:
1.假如:你没有将hibernate.cfg.xml拷贝到src目录下就会报如下错误:
org.hibernate.HibernateException: hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147) at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1405) at org.hibernate.cfg.Configuration.configure(Configuration.java:1427) at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:80) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:69) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSchemaExport(DbPersistenceServiceFactory.java:77) at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:108) at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:466) at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:458) at com.baoz.je.test.TestHelloWorldDB.setUp(TestHelloWorldDB.java:22) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
2.假如你没有在jbpmConfiguration.xml中添加如下代码:
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
就会报如下的错误:
org.jbpm.JbpmException: no jbpm tx service configured at org.jbpm.persistence.db.DbPersistenceService.isRollbackOnly(DbPersistenceService.java:399) at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:217) at org.jbpm.svc.Services.close(Services.java:223) at org.jbpm.JbpmContext.close(JbpmContext.java:139) at com.baoz.je.test.TestHelloWorldDB.deployProcessDefinition(TestHelloWorldDB.java:37) at com.baoz.je.test.TestHelloWorldDB.testSimplePersistence(TestHelloWorldDB.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
3.你的jbpm数据库中没有表的话,一定是你的
jbpmConfiguration.dropSchema();
这句代码没注释,一定要注释,要不它会将你创建的表又删除了。
- jbpmExample_2.rar (10.6 KB)
- 下载次数: 43
相关推荐
标题:“JBPM修改数据库实例”涉及的是在JBPM(Java Business Process Management)系统中,如何将默认使用的H2内存数据库替换为更强大的MySQL或PostgreSQL数据库。这一过程通常是为了满足生产环境的需求,因为H2...
目前,JBPM已经发展成为一个成熟稳定的企业级工作流解决方案。它提供了一套完整的工具链,包括图形化编辑器、RESTful API、任务管理器等,使得开发者能够方便地定义、部署和监控复杂的业务流程。 ### 二、JBPM与...
jbpm(Java Business Process Management)是一个开源的工作流管理系统,它提供了流程定义、执行、监控和管理的全面解决方案。jbpm的核心功能包括业务流程建模、执行和跟踪,以及与应用程序集成的能力。为了实现这些...
jbpm是一个开源的工作流管理系统,它提供了业务流程建模、执行、监控和管理的全面解决方案。这些SQL脚本的目的是确保jbpm在多种常见的关系型数据库(MySQL、Microsoft SQL Server、Sybase、Oracle和IBM DB2)中能够...
jbpm(Business Process Management)是一种开源的工作流管理系统,它提供了业务流程建模、部署、执行、监控和管理的全套解决方案。在IT行业中,jbpm常用于实现企业的业务流程自动化,帮助提升工作效率,优化业务...
总之,JBPM提供了一套全面的解决方案来管理企业级工作流,涵盖了流程设计、部署、执行、监控等多个环节。开发者可以通过Eclipse这样的集成开发环境,高效地进行工作流开发,同时利用数据库来持久化流程状态,确保...
在使用jbpm3.2.2(一个开源的工作流引擎)与MySQL数据库进行集成时,可能会遇到关于字段类型不匹配的问题。这通常发生在初始化数据库结构或升级流程引擎版本时,尤其是当MySQL数据库中的字段类型与Jbpm预期的不同时...
JBPM的设计原则之一是保持简单性和灵活性,这使得它成为很多企业级项目中的首选工作流解决方案。 #### 二、环境搭建 本实例使用的是JDK 1.5、MySQL 5.0 和 JBPM 3.2.3版本。在开始之前,需要确保已经安装并配置好...
在【Mysql+jbpm3.2.3+tomcat.doc】文档中,可能包含了详细的步骤指南,包括上述集成过程中的每个环节,以及可能出现的问题和解决方案。同时,可能还会涉及到如何使用工作流API来编程控制流程,或者通过jbpm-console...
jbpm是一个开源的工作流管理系统,它提供了完整的业务流程自动化解决方案,包括流程设计、执行、监控和管理。这个修改版示例可能是对原有示例进行了一些优化或修正错误后的版本,更适合初学者理解和学习。 首先,...
4. **数据库连接**:jbPM需要一个数据库来存储流程实例、任务等信息,你可以选择MySQL、Oracle等常见数据库,配置相应的数据库连接信息。 5. **IDE集成**:jbPM可以与Eclipse、IntelliJ IDEA等IDE集成,安装对应的...
JBoss jBPM 是一款开源的工作流和业务流程管理(Business Process Management, BPM)系统,旨在为开发者提供灵活且强大的流程管理解决方案。本文档将详细介绍 JBoss jBPM 的核心功能以及如何在基于 Struts 1.1 + ...
本示例主要介绍如何使用Maven3与JBPM4.4集成,并在MySQL数据库环境下实现一个简单的 HelloWorld 应用。JBPM(Java Business Process Management)是一个开源的工作流和业务流程管理系统,它提供了完整的BPM解决方案...
对于部署,可以将jBPM集成到像Tomcat这样的应用服务器中,并配置与MySQL数据库的连接,以便存储和管理流程实例的数据。 2、框架设计简介: jBPM的设计旨在提供一个完整的业务流程生命周期管理解决方案,包括建模、...
JBPM(Java Business Process Management)是一款开源的工作流管理系统,它提供了流程定义、执行以及监控的一整套解决方案。在JBPM3.3.3版本中,我们需要进行一系列步骤来搭建一个完整的开发环境,以便进行业务流程...
而jbpm4则是业务流程管理(BPM)的一个开源解决方案,它允许开发者设计、执行和监控业务流程。将jbpm4集成到Spring中,可以实现灵活的业务流程自动化,提高开发效率。 在"提前试用spring 集成 jbpm4"这个主题中,...
jbpm(Java Business Process Management)是一款开源的工作流管理系统,它提供了流程定义、执行以及监控的一整套解决方案。jbpm的核心配置文件是系统运行的关键,它们定义了系统的环境设置、数据库连接以及工作流...
JBPM提供了全面的工作流解决方案,包括流程设计、执行、监控和优化,旨在提高工作效率,简化复杂的业务操作。 JBPM的核心特性包括: 1. **流程建模**:JBPM支持BPMN 2.0标准,提供图形化的流程建模工具,使得非...