netbpm没有提供oracle的相关语句,netbpm版本(netbpm-0.8.8.1),整理如下
CREATE TABLE NBPM_ACTOR(ID VARCHAR(255) NOT NULL PRIMARY KEY,SUBCLASS VARCHAR(255) NOT NULL,NAME VARCHAR(255),TYPE_ VARCHAR(255),PARENT VARCHAR(255),FIRSTNAME VARCHAR(255),LASTNAME VARCHAR(255),EMAIL VARCHAR(255),CONSTRAINT FKDC4D3E4BC4AB08AA FOREIGN KEY(PARENT) REFERENCES NBPM_ACTOR(ID));
CREATE TABLE NBPM_LOG(ID number NOT NULL PRIMARY KEY,ACTORID VARCHAR(255),FLOW number,DATE_ date,TYPE_ number(5));
CREATE TABLE NBPM_DELEGATION(ID number NOT NULL PRIMARY KEY,PROCESSDEFINITION number,CLASSNAME VARCHAR(255),CONFIGURATION VARCHAR(255),EXCEPTIONHANDLER number(5));
CREATE TABLE NBPM_FIELD(ID number NOT NULL PRIMARY KEY,NAME VARCHAR(255),DESCRIPTION VARCHAR(255),INDEX_ INTEGER,ATTRIBUTE number,STATE number,ACCESS_ number(5),HTMLFORMATTERDELEGATION number,CONSTRAINT FKDC9635503553D7E7 FOREIGN KEY(HTMLFORMATTERDELEGATION) REFERENCES NBPM_DELEGATION(ID));
CREATE TABLE NBPM_PROCESSINSTANCE(ID number NOT NULL PRIMARY KEY,START_ date,END_ date,INITIATORACTORID VARCHAR(255),PROCESSDEFINITION number,ROOTFLOW number,SUPERPROCESSFLOW number);
CREATE TABLE NBPM_TRANSITION(ID number NOT NULL PRIMARY KEY,FROM_ number,TO_ number,NAME VARCHAR(255),DESCRIPTION VARCHAR(255),PROCESSDEFINITION number);
CREATE TABLE NBPM_ATTRIBUTEINSTANCE(ID number NOT NULL PRIMARY KEY,VALUETEXT VARCHAR(255),ATTRIBUTE number,SCOPE number);
CREATE TABLE NBPM_MEMBERSHIP(ID number NOT NULL PRIMARY KEY,ROLE VARCHAR(255),TYPE_ VARCHAR(255),GROUP_ VARCHAR(255),USER_ VARCHAR(255),CONSTRAINT FK1BE14120B63DD9C0 FOREIGN KEY(GROUP_) REFERENCES NBPM_ACTOR(ID),CONSTRAINT FK1BE141206A68DF4 FOREIGN KEY(USER_) REFERENCES NBPM_ACTOR(ID));
CREATE TABLE NBPM_PROCESSBLOCK(ID number NOT NULL PRIMARY KEY,SUBCLASS VARCHAR(255) NOT NULL,PARENTBLOCK number,NAME VARCHAR(255),DESCRIPTION VARCHAR(255),PROCESSDEFINITION number,FORK number,JOIN_ number,RESPONSIBLEUSERNAME VARCHAR(255),VERSION_ INTEGER,STARTSTATE number,ENDSTATE number,IMAGE BLOB,IMAGEMIMETYPE VARCHAR(255),IMAGEHEIGHT INTEGER,IMAGEWIDTH INTEGER,AUTHORIZATIONDELEGATION number,CONSTRAINT FKB1DE48450E681 FOREIGN KEY(AUTHORIZATIONDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB1DE483AE6A603 FOREIGN KEY(PARENTBLOCK) REFERENCES NBPM_PROCESSBLOCK(ID),CONSTRAINT FKB1DE48B7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID));
CREATE TABLE NBPM_ATTRIBUTE(ID number NOT NULL PRIMARY KEY,SCOPE number,INITIALVALUE VARCHAR(255),SERIALIZERDELEGATION number,NAME VARCHAR(255),DESCRIPTION VARCHAR(255),PROCESSDEFINITION number,CONSTRAINT FK46521BF2A061B05A FOREIGN KEY(SERIALIZERDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FK46521BF2B7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID),CONSTRAINT FK46521BF26833E54 FOREIGN KEY(SCOPE) REFERENCES NBPM_PROCESSBLOCK(ID));
CREATE TABLE NBPM_ACTION(ID number NOT NULL PRIMARY KEY,DEFINITIONOBJECT number NOT NULL,EVENTTYPE number(5) NOT NULL,ACTIONDELEGATION number,CONSTRAINT FKAD5A74807E4E3BFE FOREIGN KEY(ACTIONDELEGATION) REFERENCES NBPM_DELEGATION(ID));
CREATE TABLE NBPM_JOB(ID number NOT NULL PRIMARY KEY,PROCESSDEFINITION number,CONTEXT number,DATE_ date,USERID VARCHAR(255),PWD VARCHAR(255),REFERENCE VARCHAR(255),ACTIONDELEGATION number,CONSTRAINT FK375F5193B7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID),CONSTRAINT FK375F51937E4E3BFE FOREIGN KEY(ACTIONDELEGATION) REFERENCES NBPM_DELEGATION(ID));
CREATE TABLE NBPM_FLOW(ID number NOT NULL PRIMARY KEY,NAME VARCHAR(255),ACTORID VARCHAR(255),START_ date,END_ date,PARENTREACTIVATION number(1),NODE number,PROCESSINSTANCE number,PARENT number,CONSTRAINT FKB48905F8C4AB08AA FOREIGN KEY(PARENT) REFERENCES NBPM_FLOW(ID),CONSTRAINT FKB48905F8842C3824 FOREIGN KEY(PROCESSINSTANCE) REFERENCES NBPM_PROCESSINSTANCE(ID));
CREATE TABLE NBPM_NODE(ID number NOT NULL PRIMARY KEY,SUBCLASS VARCHAR(255) NOT NULL,PROCESSBLOCK number,NAME VARCHAR(255),DESCRIPTION VARCHAR(255),PROCESSDEFINITION number,COORDINATEX1 INTEGER,COORDINATEY1 INTEGER,COORDINATEX2 INTEGER,COORDINATEY2 INTEGER,ASSIGNMENTDELEGATION number,ACTORROLENAME VARCHAR(255),SUBPROCESS number,PROCESSINVOKERDELEGATION number,ACTOREXPRESSION VARCHAR(255),DECISIONDELEGATION number,FORKDELEGATION number,JOINDELEGATION number,CONSTRAINT FKB48CB2CCAA96D113 FOREIGN KEY(PROCESSINVOKERDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB48CB2CCDB870B8A FOREIGN KEY(FORKDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB48CB2CC953D700F FOREIGN KEY(SUBPROCESS) REFERENCES NBPM_PROCESSBLOCK(ID),CONSTRAINT FKB48CB2CCDC6D79F2 FOREIGN KEY(JOINDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB48CB2CCB7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID),CONSTRAINT FKB48CB2CC16B99624 FOREIGN KEY(DECISIONDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB48CB2CCBDC5B3D5 FOREIGN KEY(ASSIGNMENTDELEGATION) REFERENCES NBPM_DELEGATION(ID),CONSTRAINT FKB48CB2CC7534635E FOREIGN KEY(PROCESSBLOCK) REFERENCES NBPM_PROCESSBLOCK(ID));
CREATE TABLE NBPM_LOGDETAIL(ID number NOT NULL PRIMARY KEY,SUBCLASS VARCHAR(255) NOT NULL,LOG_ number,ATTRIBUTE number,TEXT_ VARCHAR(255),DELEGATION number,CLASSNAME VARCHAR(255),EXCEPTIONMESSAGE VARCHAR(255),LONG_ number,CONSTRAINT FKD617A9EBC7AA9C FOREIGN KEY(ATTRIBUTE) REFERENCES NBPM_ATTRIBUTE(ID),CONSTRAINT FKD617A9EB32C59B FOREIGN KEY(LOG_) REFERENCES NBPM_LOG(ID),CONSTRAINT FKD617A9EB52D4AD28 FOREIGN KEY(DELEGATION) REFERENCES NBPM_DELEGATION(ID));
CREATE TABLE NBPM_ASSEMBLYFILE(ID number NOT NULL PRIMARY KEY,FILENAME VARCHAR(255),ASSEMBLYVERSION VARCHAR(255),ASSEMBLYNAME VARCHAR(255),BYTES BLOB,PROCESSDEFINITION number,CONSTRAINT FK44FE944AB7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID));
ALTER TABLE NBPM_LOG ADD CONSTRAINT FK375F591A30012E FOREIGN KEY(FLOW) REFERENCES NBPM_FLOW(ID);
ALTER TABLE NBPM_DELEGATION ADD CONSTRAINT FKBE986672B7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID);
ALTER TABLE NBPM_FIELD ADD CONSTRAINT FKDC96355068AC491 FOREIGN KEY(STATE) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_FIELD ADD CONSTRAINT FKDC963550C7AA9C FOREIGN KEY(ATTRIBUTE) REFERENCES NBPM_ATTRIBUTE(ID);
ALTER TABLE NBPM_PROCESSINSTANCE ADD CONSTRAINT FK236E60DA2D1911C2 FOREIGN KEY(SUPERPROCESSFLOW) REFERENCES NBPM_FLOW(ID);
ALTER TABLE NBPM_PROCESSINSTANCE ADD CONSTRAINT FK236E60DAB7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID);
ALTER TABLE NBPM_PROCESSINSTANCE ADD CONSTRAINT FK236E60DAF607B530 FOREIGN KEY(ROOTFLOW) REFERENCES NBPM_FLOW(ID);
ALTER TABLE NBPM_TRANSITION ADD CONSTRAINT FK4FF269F1C144 FOREIGN KEY(TO_) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_TRANSITION ADD CONSTRAINT FK4FF269FB7C43122 FOREIGN KEY(PROCESSDEFINITION) REFERENCES NBPM_PROCESSBLOCK(ID);
ALTER TABLE NBPM_TRANSITION ADD CONSTRAINT FK4FF269F5D2DDF5 FOREIGN KEY(FROM_) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_ATTRIBUTEINSTANCE ADD CONSTRAINT FK84748E876833E54 FOREIGN KEY(SCOPE) REFERENCES NBPM_FLOW(ID);
ALTER TABLE NBPM_ATTRIBUTEINSTANCE ADD CONSTRAINT FK84748E87C7AA9C FOREIGN KEY(ATTRIBUTE) REFERENCES NBPM_ATTRIBUTE(ID);
ALTER TABLE NBPM_PROCESSBLOCK ADD CONSTRAINT FKB1DE48A1927D4F FOREIGN KEY(STARTSTATE) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_PROCESSBLOCK ADD CONSTRAINT FKB1DE4866309C76 FOREIGN KEY(ENDSTATE) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_PROCESSBLOCK ADD CONSTRAINT FKB1DE48300CC2 FOREIGN KEY(FORK) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_PROCESSBLOCK ADD CONSTRAINT FKB1DE48609C875 FOREIGN KEY(JOIN_) REFERENCES NBPM_NODE(ID);
ALTER TABLE NBPM_JOB ADD CONSTRAINT FK375F519338B735AF FOREIGN KEY(CONTEXT) REFERENCES NBPM_FLOW(ID);
ALTER TABLE NBPM_FLOW ADD CONSTRAINT FKB48905F833AE02 FOREIGN KEY(NODE) REFERENCES NBPM_NODE(ID);
INSERT INTO NBPM_ACTOR VALUES('ae','User',NULL,NULL,NULL,'Albert','Einstein','ae@localhost');
INSERT INTO NBPM_ACTOR VALUES('cg','User',NULL,NULL,NULL,'Carl','Gauss','cg@localhost');
INSERT INTO NBPM_ACTOR VALUES('ed','User',NULL,NULL,NULL,'Edsger','Dijkstra','ed@localhost');
INSERT INTO NBPM_ACTOR VALUES('group A','Group','group-assignment-test-group A','hierarchy2',NULL,NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group B','Group','group-assignment-test-group B','hierarchy2','group A',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group C','Group','group-assignment-test-group C','hierarchy2','group A',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group D','Group','group-assignment-test-group D','hierarchy2','group C',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group-top','Group','netbpm-enterprises','hierarchy',NULL,NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group-acc','Group','Accounting','hierarchy','group-top',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group-hr','Group','Human Resources','hierarchy','group-top',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group-ms','Group','Marketing & Sales','hierarchy','group-top',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('group-rd','Group','Research & Development','hierarchy','group-top',NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('in','User',NULL,NULL,NULL,'Isaac','Newton','in@localhost');
INSERT INTO NBPM_ACTOR VALUES('netbpm-domain','Group','All users in the j2ee-security-domain ''netbpm-domain''','security',NULL,NULL,NULL,NULL);
INSERT INTO NBPM_ACTOR VALUES('pf','User',NULL,NULL,NULL,'Pierre','De Fermat','pf@localhost');
INSERT INTO NBPM_ACTOR VALUES('uaoga','User',NULL,NULL,NULL,'user a of group a','user a of group a','uaoga@localhost');
INSERT INTO NBPM_ACTOR VALUES('uaogb','User',NULL,NULL,NULL,'user a of group b','user a of group b','uaogb@localhost');
INSERT INTO NBPM_ACTOR VALUES('uaogc','User',NULL,NULL,NULL,'user a of group c','user a of group c','uaogc@localhost');
INSERT INTO NBPM_ACTOR VALUES('uaogd','User',NULL,NULL,NULL,'user a of group d','user a of group d','uaogd@localhost');
INSERT INTO NBPM_ACTOR VALUES('uboga','User',NULL,NULL,NULL,'user b of group a','user b of group a','uboga@localhost');
INSERT INTO NBPM_ACTOR VALUES('ubogb','User',NULL,NULL,NULL,'user b of group b','user b of group b','ubogb@localhost');
INSERT INTO NBPM_ACTOR VALUES('ubogc','User',NULL,NULL,NULL,'user b of group c','user b of group c','ubogc@localhost');
INSERT INTO NBPM_ACTOR VALUES('ubogd','User',NULL,NULL,NULL,'user b of group d','user b of group d','ubogd@localhost');
INSERT INTO NBPM_ACTOR VALUES('ucoga','User',NULL,NULL,NULL,'user c of group a','user c of group a','ucoga@localhost');
INSERT INTO NBPM_ACTOR VALUES('ucogb','User',NULL,NULL,NULL,'user c of group b','user c of group b','ucogb@localhost');
INSERT INTO NBPM_ACTOR VALUES('ucogc','User',NULL,NULL,NULL,'user c of group c','user c of group c','ucogc@localhost');
INSERT INTO NBPM_ACTOR VALUES('ucogd','User',NULL,NULL,NULL,'user c of group d','user c of group d','ucogd@localhost');
INSERT INTO NBPM_MEMBERSHIP VALUES(10,'architect','hierarchy','group-rd','ae');
INSERT INTO NBPM_MEMBERSHIP VALUES(11,'boss','hierarchy','group-rd','cg');
INSERT INTO NBPM_MEMBERSHIP VALUES(12,'member','hierarchy','group-rd','in');
INSERT INTO NBPM_MEMBERSHIP VALUES(13,'hr-responsible','hierarchy','group-rd','pf');
INSERT INTO NBPM_MEMBERSHIP VALUES(14,'cfo','hierarchy','group-rd','ed');
INSERT INTO NBPM_MEMBERSHIP VALUES(15,'ccaps-responsible','service','group-rd','ed');
INSERT INTO NBPM_MEMBERSHIP VALUES(16,'ccaps-responsible','service','group-ms','ed');
INSERT INTO NBPM_MEMBERSHIP VALUES(17,'group-assignment-test-uaoga','hierarchy2','group A','uaoga');
INSERT INTO NBPM_MEMBERSHIP VALUES(18,'group-assignment-test-uboga','hierarchy2','group A','uboga');
INSERT INTO NBPM_MEMBERSHIP VALUES(19,'group-assignment-test-ucoga','hierarchy2','group A','ucoga');
INSERT INTO NBPM_MEMBERSHIP VALUES(20,'group-assignment-test-uaogb','hierarchy2','group B','uaogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(21,'group-assignment-test-ubogb','hierarchy2','group B','ubogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(22,'group-assignment-test-ucogb','hierarchy2','group B','ucogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(23,'group-assignemnt-test-uaogc','hierarchy2','group C','uaogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(24,'group-assignment-test-ubogc','hierarchy2','group C','ubogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(25,'group-assignment-test-ucogc','hierarchy2','group C','ucogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(26,'group-assignment-test-uaogd','hierarchy2','group D','uaogd');
INSERT INTO NBPM_MEMBERSHIP VALUES(27,'group-assignment-test-ubogd','hierarchy2','group D','ubogd');
INSERT INTO NBPM_MEMBERSHIP VALUES(28,'group-assignment-test-ucogd','hierarchy2','group D','ucogd');
INSERT INTO NBPM_MEMBERSHIP VALUES(40,'user','security','netbpm-domain','ae');
INSERT INTO NBPM_MEMBERSHIP VALUES(41,'developer','security','netbpm-domain','ae');
INSERT INTO NBPM_MEMBERSHIP VALUES(42,'admin','security','netbpm-domain','ae');
INSERT INTO NBPM_MEMBERSHIP VALUES(43,'user','security','netbpm-domain','cg');
INSERT INTO NBPM_MEMBERSHIP VALUES(44,'user','security','netbpm-domain','in');
INSERT INTO NBPM_MEMBERSHIP VALUES(45,'user','security','netbpm-domain','pf');
INSERT INTO NBPM_MEMBERSHIP VALUES(46,'user','security','netbpm-domain','ed');
INSERT INTO NBPM_MEMBERSHIP VALUES(47,'user','security','netbpm-domain','uaoga');
INSERT INTO NBPM_MEMBERSHIP VALUES(48,'user','security','netbpm-domain','uboga');
INSERT INTO NBPM_MEMBERSHIP VALUES(49,'user','security','netbpm-domain','ucoga');
INSERT INTO NBPM_MEMBERSHIP VALUES(50,'user','security','netbpm-domain','uaogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(51,'user','security','netbpm-domain','ubogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(52,'user','security','netbpm-domain','ucogb');
INSERT INTO NBPM_MEMBERSHIP VALUES(53,'user','security','netbpm-domain','uaogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(54,'user','security','netbpm-domain','ubogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(55,'user','security','netbpm-domain','ucogc');
INSERT INTO NBPM_MEMBERSHIP VALUES(56,'user','security','netbpm-domain','uaogd');
INSERT INTO NBPM_MEMBERSHIP VALUES(57,'user','security','netbpm-domain','ubogd');
INSERT INTO NBPM_MEMBERSHIP VALUES(58,'user','security','netbpm-domain','ucogd');