CREATE TABLE RT_P_CASE(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL PRIMARY KEY,VC_NAME VARCHAR(50),VC_PRIMARYKEY VARCHAR(50) NOT NULL,VC_CREATOR VARCHAR(50),DAT_CREATIONTIME TIMESTAMP NOT NULL,INT_STATE INTEGER NOT NULL,VC_MAGICID VARCHAR(50) NOT NULL,VC_DESCRIPTION VARCHAR(255))
CREATE TABLE RT_P_WORK(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,VC_OWNER_PROCESSID VARCHAR(50),VC_ACTIVITYID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL PRIMARY KEY,VC_PERFORMER VARCHAR(50),DAT_ARRIVETIME TIMESTAMP,DAT_ACCEPTTIME TIMESTAMP,DAT_dispatchTIME TIMESTAMP,VC_PARENT_WORKID VARCHAR(50),VC_USEROBJECT VARCHAR(50),INT_PRIORITY INTEGER,INT_WEIGHT_FLAG INTEGER,DBL_WEIGHT DOUBLE,INT_EVENTTYPE INTEGER NOT NULL)
CREATE TABLE RT_P_PATH(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL PRIMARY KEY,VC_FROM VARCHAR(50),VC_TO VARCHAR(50),VC_OWNER_PROCESSID VARCHAR(50),VC_TRANSITIONID VARCHAR(50),VC_BATCHNO VARCHAR(50),INT_EVENTTYPE INTEGER NOT NULL)
CREATE TABLE RT_P_DATAFIELD(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_TYPE VARCHAR(50) NOT NULL,VC_VALUE VARCHAR(50),CONSTRAINT SYS_PK_RT_P_DATAFIELD PRIMARY KEY(VC_PACKAGEID,VC_PROCESSID,VC_CASEID,VC_UUID))
CREATE TABLE RT_P_CASEEVENT(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,INT_TYPE INTEGER NOT NULL,VC_OPERATOR VARCHAR(50) NOT NULL,DAT_OPTIME TIMESTAMP NOT NULL,VC_DESCRIPTION VARCHAR(255))
CREATE TABLE RT_P_WORKEVENT(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,VC_WORKID VARCHAR(50) NOT NULL,INT_TYPE INTEGER NOT NULL,VC_OPERATOR VARCHAR(50) NOT NULL,DAT_OPTIME TIMESTAMP NOT NULL,VC_DESCRIPTION VARCHAR(255))
CREATE TABLE RT_P_ACTIVITY_DISPATCH(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_CASEID VARCHAR(50) NOT NULL,VC_OWNER_PROCESSID VARCHAR(50),VC_ACTIVITYID VARCHAR(50) NOT NULL,INT_dispatch_COUNT INTEGER NOT NULL,INT_JOIN_MONITOR INTEGER,DBL_JOIN_MONITOR DOUBLE,int_dispatch_eventType INTEGER)
