CREATE TABLE XPDL_P_ACTUALPARAMETER(VC_SCOPE VARCHAR(50) NOT NULL,VC_PACKAGEID VARCHAR(50) NOT NULL,VC_COMPID VARCHAR(50) NOT NULL,INT_INDEX INTEGER NOT NULL,VC_NAME VARCHAR(50) NOT NULL,CONSTRAINT SYS_PK_XPDL_P_ACTUALPARAMETER PRIMARY KEY(VC_SCOPE,VC_PACKAGEID,VC_COMPID))
CREATE TABLE XPDL_P_FORMALPARAMETER(VC_SCOPE VARCHAR(50) NOT NULL,VC_PACKAGEID VARCHAR(50) NOT NULL,VC_COMPID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,INT_INDEX INTEGER NOT NULL,VC_MODE VARCHAR(10) NOT NULL,VC_TYPE VARCHAR(50) NOT NULL,VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_FORMALPARAMETER PRIMARY KEY(VC_SCOPE,VC_PACKAGEID,VC_COMPID,VC_UUID,INT_INDEX))
CREATE TABLE XPDL_P_EXTENDEDATTRIBUTE(VC_SCOPE VARCHAR(50) NOT NULL,VC_PACKAGEID VARCHAR(50) NOT NULL,VC_COMPID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL,VC_VALUE VARCHAR(100) NOT NULL,CONSTRAINT SYS_PK_XPDL_P_EXTENDEDATTRIBUTE PRIMARY KEY(VC_SCOPE,VC_PACKAGEID,VC_COMPID,VC_NAME))
CREATE TABLE XPDL_P_PACKAGE(VC_UUID VARCHAR(50) NOT NULL PRIMARY KEY,VC_NAME VARCHAR(50) NOT NULL)
CREATE TABLE XPDL_P_PACKAGEHEADER(VC_PACKAGEID VARCHAR(50) NOT NULL PRIMARY KEY,VC_XPDLVERSION VARCHAR(50) NOT NULL,VC_VENDOR VARCHAR(50) NOT NULL,DAT_CREATED TIMESTAMP NOT NULL,VC_DESCRIPTION VARCHAR(255))
CREATE TABLE XPDL_P_APPLICATION(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL,VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_APPLICATION PRIMARY KEY(VC_PACKAGEID,VC_UUID))
CREATE TABLE XPDL_P_DATAFIELD(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL,VC_TYPE VARCHAR(50) NOT NULL,VC_VALUE VARCHAR(50),VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_DATAFIELD PRIMARY KEY(VC_PACKAGEID,VC_UUID))
CREATE TABLE XPDL_P_SCRIPT(VC_PACKAGEID VARCHAR(50) NOT NULL PRIMARY KEY,VC_TYPE VARCHAR(50) NOT NULL,VC_VERSION VARCHAR(50),VC_GRAMMAR VARCHAR(50))
CREATE TABLE XPDL_P_PROCESS(VC_PACKAGEID VARCHAR(50) NOT NULL PRIMARY KEY,VC_UUID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL)
CREATE TABLE XPDL_P_PROCESSHEADER(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,DAT_CREATED TIMESTAMP,DAT_VALIDFROM TIMESTAMP NOT NULL,DAT_VALIDTO TIMESTAMP,INT_LIMIT INTEGER,VC_DURATIONUNIT VARCHAR(3) ,VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_PROCESSHEADER PRIMARY KEY(VC_PACKAGEID,VC_PROCESSID))
CREATE TABLE XPDL_P_ACTIVITY(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL,INT_LIMIT INTEGER,VC_DURATIONUNIT VARCHAR(3),VC_IMPLTYPE VARCHAR(20),VC_IMPLID VARCHAR(20),VC_PERFORMER VARCHAR(255),VC_JOINTYPE VARCHAR(10),VC_SPLITTYPE VARCHAR(10),VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_ACTIVITY PRIMARY KEY(VC_PACKAGEID,VC_PROCESSID,VC_UUID))
CREATE TABLE XPDL_P_TRANSITION(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_PROCESSID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_NAME VARCHAR(50) NOT NULL,VC_FROM VARCHAR(50) NOT NULL,VC_TO VARCHAR(50) NOT NULL,VC_CONDITION VARCHAR(255),INT_WEIGHT INTEGER,VC_DESCRIPTION VARCHAR(255),CONSTRAINT SYS_PK_XPDL_P_TRANSITION PRIMARY KEY(VC_PACKAGEID,VC_PROCESSID,VC_UUID))
CREATE TABLE XPDL_P_TOOL(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_DESCRIPTION VARCHAR(255),VC_APPID VARCHAR(50) NOT NULL,CONSTRAINT SYS_PK_XPDL_P_SUBFLOW PRIMARY KEY(VC_PACKAGEID,VC_UUID))
CREATE TABLE XPDL_P_SUBFLOW(VC_PACKAGEID VARCHAR(50) NOT NULL,VC_UUID VARCHAR(50) NOT NULL,VC_DESCRIPTION VARCHAR(255),VC_PROCESSID VARCHAR(50) NOT NULL,CONSTRAINT SYS_PK_XPDL_P_SUBFLOW PRIMARY KEY(VC_PACKAGEID,VC_UUID))
