Fire Workflow 中的七张表脚本:
Orale:
drop table T_FF_DF_WORKFLOWDEF cascade constraints; drop table T_FF_HIST_TRACE cascade constraints; drop table T_FF_RT_PROCESSINSTANCE cascade constraints; drop table T_FF_RT_PROCINST_VAR cascade constraints; drop table T_FF_RT_TASKINSTANCE cascade constraints; drop table T_FF_RT_TOKEN cascade constraints; drop table T_FF_RT_WORKITEM cascade constraints; create table T_FF_DF_WORKFLOWDEF (ID varchar2(50 char) not null, definition_type varchar2(50 char) not null, PROCESS_ID varchar2(100 char) not null, NAME varchar2(100 char) not null, DISPLAY_NAME varchar2(128 char), DESCRIPTION varchar2(1024 char), VERSION number(10,0) not null, STATE number(1,0) not null, UPLOAD_USER varchar2(50 char), UPLOAD_TIME timestamp, PUBLISH_USER varchar2(50 char), PUBLISH_TIME timestamp, PROCESS_CONTENT clob, primary key (ID)); create table T_FF_HIST_TRACE (ID varchar2(50 char) not null, PROCESSINSTANCE_ID varchar2(50 char) not null, STEP_NUMBER number(10,0) not null, MINOR_NUMBER number(10,0) not null, TYPE varchar2(15 char) not null, EDGE_ID varchar2(100 char), FROM_NODE_ID varchar2(100 char) not null, TO_NODE_ID varchar2(100 char) not null, primary key (ID)); create table T_FF_RT_PROCESSINSTANCE (ID varchar2(50 char) not null, PROCESS_ID varchar2(100 char) not null, VERSION number(10,0) not null, NAME varchar2(100 char), DISPLAY_NAME varchar2(128 char), STATE number(10,0) not null, SUSPENDED number(1,0) not null, CREATOR_ID varchar2(50 char), CREATED_TIME timestamp, STARTED_TIME timestamp, EXPIRED_TIME timestamp, END_TIME timestamp, PARENT_PROCESSINSTANCE_ID varchar2(50 char), PARENT_TASKINSTANCE_ID varchar2(50 char), primary key (ID)); create table T_FF_RT_PROCINST_VAR (PROCESSINSTANCE_ID varchar2(50 char) not null, VALUE varchar2(255 char), NAME varchar2(255 char) not null, primary key (PROCESSINSTANCE_ID, NAME)); create table T_FF_RT_TASKINSTANCE (ID varchar2(50 char) not null, BIZ_TYPE varchar2(250 char) not null, TASK_ID varchar2(300 char) not null, ACTIVITY_ID varchar2(200 char) not null, NAME varchar2(100 char) not null, DISPLAY_NAME varchar2(128 char), STATE number(10,0) not null, SUSPENDED number(1,0) not null, TASK_TYPE varchar2(10 char), CREATED_TIME timestamp not null, STARTED_TIME timestamp, EXPIRED_TIME timestamp, END_TIME timestamp, ASSIGNMENT_STRATEGY varchar2(10 char), PROCESSINSTANCE_ID varchar2(50 char) not null, PROCESS_ID varchar2(100 char) not null, VERSION number(10,0) not null, TARGET_ACTIVITY_ID varchar2(100 char), FROM_ACTIVITY_ID varchar2(600 char), STEP_NUMBER number(10,0) not null, CAN_BE_WITHDRAWN number(1,0) not null, primary key (ID)); create table T_FF_RT_TOKEN (ID varchar2(50 char) not null, ALIVE number(1,0) not null, VALUE number(10,0) not null, NODE_ID varchar2(200 char) not null, PROCESSINSTANCE_ID varchar2(50 char) not null, STEP_NUMBER number(10,0) not null, FROM_ACTIVITY_ID varchar2(100 char), primary key (ID)); create table T_FF_RT_WORKITEM (ID varchar2(50 char) not null, STATE number(10,0) not null, CREATED_TIME timestamp not null, CLAIMED_TIME timestamp, END_TIME timestamp, ACTOR_ID varchar2(50 char), COMMENTS varchar2(1024 char), TASKINSTANCE_ID varchar2(50 char) not null, primary key (ID)); create index IDX_TRACE_PROCINSTID on T_FF_HIST_TRACE (PROCESSINSTANCE_ID); alter table T_FF_RT_PROCINST_VAR add constraint FKD79C420D7AF471D8 foreign key (PROCESSINSTANCE_ID) references T_FF_RT_PROCESSINSTANCE; alter table T_FF_RT_WORKITEM add constraint FK4131554DE2527DDC foreign key (TASKINSTANCE_ID) references T_FF_RT_TASKINSTANCE;
MySQL:
drop table if exists T_FF_DF_WORKFLOWDEF; drop table if exists T_FF_HIST_TRACE; drop table if exists T_FF_RT_PROCESSINSTANCE; drop table if exists T_FF_RT_PROCINST_VAR; drop table if exists T_FF_RT_TASKINSTANCE; drop table if exists T_FF_RT_TOKEN; drop table if exists T_FF_RT_WORKITEM; create table T_FF_DF_WORKFLOWDEF (ID varchar(50) not null, definition_type varchar(50) not null, PROCESS_ID varchar(100) not null, NAME varchar(100) not null, DISPLAY_NAME varchar(128), DESCRIPTION text, VERSION integer not null, STATE bit not null, UPLOAD_USER varchar(50), UPLOAD_TIME datetime, PUBLISH_USER varchar(50), PUBLISH_TIME datetime, PROCESS_CONTENT text, primary key (ID)); create table T_FF_HIST_TRACE (ID varchar(50) not null, PROCESSINSTANCE_ID varchar(50) not null, STEP_NUMBER integer not null, MINOR_NUMBER integer not null, TYPE varchar(15) not null, EDGE_ID varchar(100), FROM_NODE_ID varchar(100) not null, TO_NODE_ID varchar(100) not null, primary key (ID)); create table T_FF_RT_PROCESSINSTANCE (ID varchar(50) not null, PROCESS_ID varchar(100) not null, VERSION integer not null, NAME varchar(100), DISPLAY_NAME varchar(128), STATE integer not null, SUSPENDED bit not null, CREATOR_ID varchar(50), CREATED_TIME datetime, STARTED_TIME datetime, EXPIRED_TIME datetime, END_TIME datetime, PARENT_PROCESSINSTANCE_ID varchar(50), PARENT_TASKINSTANCE_ID varchar(50), primary key (ID)); create table T_FF_RT_PROCINST_VAR (PROCESSINSTANCE_ID varchar(50) not null, VALUE varchar(255), NAME varchar(255) not null, primary key (PROCESSINSTANCE_ID, NAME)); create table T_FF_RT_TASKINSTANCE (ID varchar(50) not null, BIZ_TYPE varchar(250) not null, TASK_ID text not null, ACTIVITY_ID varchar(200) not null, NAME varchar(100) not null, DISPLAY_NAME varchar(128), STATE integer not null, SUSPENDED bit not null, TASK_TYPE varchar(10), CREATED_TIME datetime not null, STARTED_TIME datetime, EXPIRED_TIME datetime, END_TIME datetime, ASSIGNMENT_STRATEGY varchar(10), PROCESSINSTANCE_ID varchar(50) not null, PROCESS_ID varchar(100) not null, VERSION integer not null, TARGET_ACTIVITY_ID varchar(100), FROM_ACTIVITY_ID text, STEP_NUMBER integer not null, CAN_BE_WITHDRAWN bit not null, primary key (ID)); create table T_FF_RT_TOKEN (ID varchar(50) not null, ALIVE bit not null, VALUE integer not null, NODE_ID varchar(200) not null, PROCESSINSTANCE_ID varchar(50) not null, STEP_NUMBER integer not null, FROM_ACTIVITY_ID varchar(100), primary key (ID)); create table T_FF_RT_WORKITEM (ID varchar(50) not null, STATE integer not null, CREATED_TIME datetime not null, CLAIMED_TIME datetime, END_TIME datetime, ACTOR_ID varchar(50), COMMENTS text, TASKINSTANCE_ID varchar(50) not null, primary key (ID)); create index IDX_TRACE_PROCINSTID on T_FF_HIST_TRACE (PROCESSINSTANCE_ID); alter table T_FF_RT_PROCINST_VAR add index FKD79C420D7AF471D8 (PROCESSINSTANCE_ID), add constraint FKD79C420D7AF471D8 foreign key (PROCESSINSTANCE_ID) references T_FF_RT_PROCESSINSTANCE (ID); alter table T_FF_RT_WORKITEM add index FK4131554DE2527DDC (TASKINSTANCE_ID), add constraint FK4131554DE2527DDC foreign key (TASKINSTANCE_ID) references T_FF_RT_TASKINSTANCE (ID);