create table BPEL_ACTIVITY_INST (DBID_ number(19,0) not null, CLASS_ varchar2(255 char) not null, dbversion number(19,0) not null, ACT_INST_UUID_ varchar2(255 char), ACT_DEF_UUID_ varchar2(500 char), PROCESS_UUID_ varchar2(255 char), INST_UUID_ varchar2(255 char), STARTED_DATE_ timestamp, ENDED_DATE_ timestamp, ACTIVITY_STATE_ varchar2(255 char), LAST_EXCEPTION_ number(19,0), CHILD_ACT_INST_ID_ number(19,0), OPERATION_ varchar2(255 char), VARIABLE_ varchar2(255 char), MESSAGE_EXCHANGE_ varchar2(255 char), FH_INST_ number(19,0), TH_INST_ number(19,0), CH_INST_ number(19,0), START_VALUE_ number(10,0), STOP_VALUE_ number(10,0), COMPLETION_CONDITION_VALUE_ number(10,0), CHILD_WAIT_ACT_ number(19,0), PARENT_ACT_INST_ID_ number(19,0), INDEX_ number(10,0), PARENT_SCOPE_ID_ number(19,0), primary key (DBID_));
create table BPEL_BASE_ACTIVITY_DEF (DBID_ number(19,0) not null, CLASS_ varchar2(255 char) not null, dbversion number(19,0) not null, ACT_DEF_UUID_ varchar2(500 char), PROCESS_DEF_UUID_ varchar2(255 char), NAME_ varchar2(255 char), SUPPR_JN_FL_ number(1,0), TGT_JN_CDT_EXP_LG_ varchar2(255 char), TGT_JN_CDT_BLN_LG_ varchar2(255 char), CHILD_ACT_DEF_ID_ number(19,0), FAULT_NAME_QNAME_ varchar2(255 char), FAULT_MESSAGE_TYPE_QNAME_ varchar2(255 char), FAULT_ELEMENT_QNAME_ varchar2(255 char), faultVariable varchar2(255 char), EX_ON_STA_FAULT_ number(1,0), TERMINATION_HANDLER_ number(19,0), COMPENSATION_HANDLER_ number(19,0), NAMESPACE_ varchar2(255 char), VERSION_ number(10,0), EXPR_LANG_ varchar2(255 char), QUERY_LANG_ varchar2(255 char), DPLY_DATE_ timestamp, UNDPLY_DATE timestamp, STATE_ varchar2(255 char), TARGET_ varchar2(255 char), IVK_PRTLNK_ varchar2(255 char), IVK_IN_VAR_ varchar2(255 char), IVK_OUT_VAR_ varchar2(255 char), IVK_OPERATION_ varchar2(255 char), IVK_PRT_PT_QNAME_ varchar2(255 char), PT_QNAME_ varchar2(255 char), FAULT_VARIABLE_ varchar2(255 char), WHL_EXP_LANG_ varchar2(255 char), WHL_BOOL_EXP_ varchar2(255 char), RPU_EXP_LANG_ varchar2(255 char), RPU_BOOL_EXP_ varchar2(255 char), REC_CRT_INST_ number(1,0), REC_VAR_ varchar2(255 char), REC_PARTN_LNK_ varchar2(255 char), REC_OPERATION_ varchar2(255 char), REC_MSG_EXCHNG_ varchar2(255 char), REC_PRT_PT_QNAME_ varchar2(255 char), REP_VAR_ varchar2(255 char), REP_PARTN_LNK_ varchar2(255 char), REP_OPERATION_ varchar2(255 char), REP_MSG_EXCHNG_ varchar2(255 char), REP_PRT_PT_QNAME_ varchar2(255 char), REP_FLT_NM_QNAME_ varchar2(255 char), ASSIGN_VLDT_ number(1,0), FOR_EXPR_LANG_ varchar2(255 char), FOR_DUR_LANG_ varchar2(255 char), UNTIL_EXPR_LANG_ varchar2(255 char), UNTIL_DEAD_LANG_ varchar2(255 char), IF_EXPR_LANG_ varchar2(255 char), IF_EXPR_ varchar2(255 char), ELSE_ACT_DEF_ID_ number(19,0), ELSE_ACT_UUID_ varchar2(500 char), PK_DF_CR_INST_ number(1,0), FRCH_C_N_EXPR_ varchar2(255 char), FRCH_PARLLL_EXPR_ number(1,0), FRCH_FINL_EXPR_ varchar2(255 char), FRCH_FINL_EXPR_LG_ varchar2(255 char), FRCH_STRT_EXPR_ varchar2(255 char), FRCH_STRT_EXPR_LG_ varchar2(255 char), FRCH_CD_EXPR_ varchar2(255 char), FRCH_CD_EXPR_LG_ varchar2(255 char), FRCH_CD_SUCC_ number(1,0), PARENT_ACT_DEF_ID_ number(19,0), INDEX_ number(10,0), SCOPE_ID_ number(19,0), primary key (DBID_));
create table BPEL_FAULT_ (DBID_ number(19,0) not null, CLASS_ varchar2(255 char) not null, FAULT_QNAME_ varchar2(255 char), MSG_PARTS_ clob, ELT_ clob, primary key (DBID_));
create table BPEL_REC (DBID_ number(19,0) not null, TYPE_ varchar2(255 char), ACT_INST_UUID_ varchar2(255 char), PROCESS_UUID_ varchar2(255 char), INST_UUID_ varchar2(255 char), DATA_ blob, primary key (DBID_));
create table COPY_FULL_IMPL (DBID_ number(19,0) not null, KEEP_SRC_ELT_NAME number(1,0), COPY_LST_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table CORR_DEF_ (DBID_ number(19,0) not null, SETVALUE_ varchar2(255 char), INITIATE_ varchar2(255 char), ON_MSG_CORR_ID_ number(19,0), INDEX_ number(10,0), ON_EVT_CORR_ID_ number(19,0), IVK_CR_DEF_ID_ number(19,0), REC_CR_DEF_ID_ number(19,0), RP_CR_DEF_ID_ number(19,0), primary key (DBID_));
create table CS_INIT_FULL_IMPL (DBID_ number(19,0) not null, ACT_INST_UUID_ varchar2(255 char), DATE_ timestamp, NAME_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table ELSEIF_DEF_ (DBID_ number(19,0) not null, ELSEIF_EXPR_ varchar2(255 char), ELSEIF_EXPR_LANG_ varchar2(255 char), ELSEIF_ACT_DEF_ID_ number(19,0), ELSEIF_ACT_UUID_ varchar2(500 char), IF_ELSEIF_LST_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table FRM_PRT_DEF_ (DBID_ number(19,0) not null, FP_PART_ varchar2(255 char), FP_TO_VAR_ varchar2(255 char), ON_MSG_FRM_PRT_ID_ number(19,0), INDEX_ number(10,0), ON_EVT_FRM_PRT_ID_ number(19,0), IVK_FR_PT_ID_ number(19,0), REC_FR_PT_ID_ number(19,0), primary key (DBID_));
create table FROM_TO_FULL (DBID_ number(19,0) not null, CLASS_ varchar2(255 char) not null, FT_VARIANT_ varchar2(255 char), FT_EXP_LANG_ varchar2(255 char), FT_VARIABLE_ varchar2(255 char), FT_PART_ varchar2(255 char), FT_PARTNER_LINK_ varchar2(255 char), FT_ENDPOINT_REF_ varchar2(255 char), FT_PROP_QNAME_ varchar2(255 char), FT_EXPRESSION_ varchar2(255 char), FT_QUERY_ varchar2(255 char), FT_QUERY_LANG_ varchar2(255 char), LITRL_VALUE_ varchar2(3999 char), FROM_LST_ID_ number(19,0), INDEX_ number(10,0), TO_LST_ID_ number(19,0), primary key (DBID_));
create table NOVA_CS_INST_PROP (CS_ID_ number(19,0) not null, VALUE_ clob, QNAME_ varchar2(255 char) not null, primary key (CS_ID_, QNAME_));
create table NOVA_NAMESPACE (DBID_ number(19,0) not null, URI_ varchar2(255 char), PREFIX_ varchar2(255 char), primary key (DBID_));
create table ON_ALRM_DEF_ (DBID_ number(19,0) not null, ON_ALRM_ACT_DEF_ID_ number(19,0), ON_ALRM_ACT_UUID_ varchar2(500 char), FOR_EXPR_LANG_ varchar2(255 char), FOR_DUR_LANG_ varchar2(255 char), UNTIL_EXPR_LANG_ varchar2(255 char), UNTIL_DEAD_LANG_ varchar2(255 char), REPETE_EXPR_LANG_ varchar2(255 char), REPEAT_DEAD_LANG_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), PK_DF_ON_AL_ID_ number(19,0), primary key (DBID_));
create table ON_EVT_DEF_ (DBID_ number(19,0) not null, PICK_VAR_ varchar2(255 char), PICK_PART_LNK_ varchar2(255 char), PICK_OPTN_ varchar2(255 char), PICK_MSG_EXCHG_ varchar2(255 char), PICK_PT_TP_QNAME_ varchar2(255 char), ON_EVT_ACT_DEF_ID_ number(19,0), ON_EVT_ACT_UUID_ varchar2(500 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table ON_MSG_DEF_ (DBID_ number(19,0) not null, PICK_VAR_ varchar2(255 char), PICK_PART_LNK_ varchar2(255 char), PICK_OPTN_ varchar2(255 char), PICK_MSG_EXCHG_ varchar2(255 char), PICK_PT_TP_QNAME_ varchar2(255 char), ON_MSG_ACT_DEF_ID_ number(19,0), ON_MSG_ACT_UUID_ varchar2(500 char), PK_DF_ON_MSG_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table PART_LNK_DEF_ (DBID_ number(19,0) not null, NAME_ varchar2(255 char), MY_ROLE_ varchar2(255 char), PARTNER_ROLE_ varchar2(255 char), INIT_PRTN_ROLE_ number(1,0), PRT_LNK_QNAME_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table PLNK_UPDATE_FULL_IMPL (DBID_ number(19,0) not null, ACT_INST_UUID_ varchar2(255 char), DATE_ timestamp, NAME_ varchar2(255 char), P_END_REF clob, PLNK_UPD_TYPE_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table PROCESS_INST_STATE_UPDATE_ (DBID_ number(19,0) not null, DATE_ timestamp, STATE_ varchar2(255 char), PROCESS_INST_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table PROC_STATE_UPD_ (DBID_ number(19,0) not null, DATE_ timestamp, STATE_ varchar2(255 char), PROCESS_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table SCOPE_STATE_UPDATE_ (DBID_ number(19,0) not null, ACT_INST_UUID_ varchar2(255 char), DATE_ timestamp, STATE_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table SRC_FULL_IMPL (DBID_ number(19,0) not null, LNK_NAME varchar2(255 char), TR_CND_EXP_LG varchar2(255 char), TR_CND_BOL_EXP varchar2(255 char), SRC_LST_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table TGT_FULL_IMPL (DBID_ number(19,0) not null, LNK_NAME varchar2(255 char), TRGT_LST_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table TO_PRT_DEF_ (DBID_ number(19,0) not null, TP_PART_ varchar2(255 char), TP_FRM_VAR_ varchar2(255 char), IVK_TO_PT_ID_ number(19,0), INDEX_ number(10,0), RP_TO_PT_ID_ number(19,0), primary key (DBID_));
create table TR_COND_UPD_ (DBID_ number(19,0) not null, STATUS_ number(1,0), NAME_ varchar2(255 char), DATE_ timestamp, FLOW_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table VAR_DEF_ (DBID_ number(19,0) not null, MSGTYPE_QNAME_ varchar2(255 char), TYPE_QNAME_ varchar2(255 char), ELT_QNAME_ varchar2(255 char), NAME_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table VAR_DEF_CS_ (DBID_ number(19,0) not null, NAME_ varchar2(255 char), SCOPE_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table VAR_UPDATE_FULL_IMPL (DBID_ number(19,0) not null, ACT_INST_UUID_ varchar2(255 char), DATE_ timestamp, NAME_ varchar2(255 char), IS_MESSAGE_ number(1,0), VALUE_ clob, INDEX_ number(10,0), SCOPE_ID_ number(19,0), primary key (DBID_));
create table WAITING_FULL_IMPL (DBID_ number(19,0) not null, EXPECTED_STARTED_DATE_ timestamp, PICK_ID_ number(19,0), INDEX_ number(10,0), primary key (DBID_));
create table linkList (FLOW_LINKS_ID_ number(19,0) not null, FLOW_LINKS_ varchar2(255 char), INDEX_ number(10,0) not null, primary key (FLOW_LINKS_ID_, INDEX_));
create table messageExchanges (SCOPE_ID_ number(19,0) not null, elt varchar2(255 char), INDEX_ number(10,0) not null, primary key (SCOPE_ID_, INDEX_));
create table properties (CORR_ST_DEF_ID_ number(19,0) not null, PROP_QNAME_ varchar2(255 char), INDEX_ number(10,0) not null, primary key (CORR_ST_DEF_ID_, INDEX_));
create index ACT_INST_EXCEPTION_IDX on BPEL_ACTIVITY_INST (LAST_EXCEPTION_);
create index ACT_INST_PARENT_IDK on BPEL_ACTIVITY_INST (PARENT_ACT_INST_ID_);
create index SCOPE_INST_EVT_IDX on BPEL_ACTIVITY_INST (PARENT_SCOPE_ID_);
create index ACT_INST_CHILD_IDX on BPEL_ACTIVITY_INST (CHILD_ACT_INST_ID_);
create index ACT_PROC_INST_UUID_IDX on BPEL_ACTIVITY_INST (INST_UUID_);
create index ACT_INST_FH_IDX on BPEL_ACTIVITY_INST (FH_INST_);
create index ACT_INST_CH_IDX on BPEL_ACTIVITY_INST (CH_INST_);
create index ACT_INST_WAIT_IDX on BPEL_ACTIVITY_INST (CHILD_WAIT_ACT_);
create index ACT_INST_UUID_IDX on BPEL_ACTIVITY_INST (ACT_INST_UUID_);
create index ACT_INST_TH_IDX on BPEL_ACTIVITY_INST (TH_INST_);
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_PARENT_FK foreign key (PARENT_ACT_INST_ID_) references BPEL_ACTIVITY_INST;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_CH_FK foreign key (CH_INST_) references BPEL_ACTIVITY_INST;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_TH_FK foreign key (TH_INST_) references BPEL_ACTIVITY_INST;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_FH_FK foreign key (FH_INST_) references BPEL_ACTIVITY_INST;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_EXCEPTION_FK foreign key (LAST_EXCEPTION_) references BPEL_FAULT_;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_WAIT_FK foreign key (CHILD_WAIT_ACT_) references WAITING_FULL_IMPL;
alter table BPEL_ACTIVITY_INST add constraint ACT_INST_CHILD_FK foreign key (CHILD_ACT_INST_ID_) references BPEL_ACTIVITY_INST;
alter table BPEL_ACTIVITY_INST add constraint SCOPE_INST_EVT_FK foreign key (PARENT_SCOPE_ID_) references BPEL_ACTIVITY_INST;
create index SCOPE_DEF_FAULT_HANDLERS_IDX on BPEL_BASE_ACTIVITY_DEF (SCOPE_ID_);
alter table BPEL_BASE_ACTIVITY_DEF add constraint FK90444D19F1C5FAB0 foreign key (PARENT_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table BPEL_BASE_ACTIVITY_DEF add constraint FK90444D1982112BDD foreign key (CHILD_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table BPEL_BASE_ACTIVITY_DEF add constraint FK90444D19614874B5 foreign key (TERMINATION_HANDLER_) references BPEL_BASE_ACTIVITY_DEF;
alter table BPEL_BASE_ACTIVITY_DEF add constraint FK90444D19DE3B31AF foreign key (COMPENSATION_HANDLER_) references BPEL_BASE_ACTIVITY_DEF;
alter table BPEL_BASE_ACTIVITY_DEF add constraint FK90444D19D4D0807A foreign key (ELSE_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table BPEL_BASE_ACTIVITY_DEF add constraint SCOPE_DEF_FAULT_HANDLERS_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index IDX_REC_PROC_INST on BPEL_REC (INST_UUID_);
create index IDX_REC_ACT_INST on BPEL_REC (ACT_INST_UUID_);
create index IDX_REC_PROC_DEF on BPEL_REC (PROCESS_UUID_);
create index COPY_LST_IDX on COPY_FULL_IMPL (COPY_LST_ID_);
alter table COPY_FULL_IMPL add constraint COPY_LST_FK foreign key (COPY_LST_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index RP_CR_DEF_LST_IDX on CORR_DEF_ (RP_CR_DEF_ID_);
create index IVK_CR_DEF_LST_IDX on CORR_DEF_ (IVK_CR_DEF_ID_);
create index ON_MSG_CORR_IDX on CORR_DEF_ (ON_MSG_CORR_ID_);
create index REC_CR_DEF_LST_IDX on CORR_DEF_ (REC_CR_DEF_ID_);
create index ON_EVT_CORR_IDX on CORR_DEF_ (ON_EVT_CORR_ID_);
alter table CORR_DEF_ add constraint REC_CR_DEF_LST_FK foreign key (REC_CR_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table CORR_DEF_ add constraint IVK_CR_DEF_LST_FK foreign key (IVK_CR_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table CORR_DEF_ add constraint RP_CR_DEF_LST_FK foreign key (RP_CR_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table CORR_DEF_ add constraint ON_EVT_CORR_FK foreign key (ON_EVT_CORR_ID_) references ON_EVT_DEF_;
alter table CORR_DEF_ add constraint ON_MSG_CORR_FK foreign key (ON_MSG_CORR_ID_) references ON_MSG_DEF_;
create index SCOPE_INST_CS_IDX on CS_INIT_FULL_IMPL (SCOPE_ID_);
alter table CS_INIT_FULL_IMPL add constraint SCOPE_INST_CS_FK foreign key (SCOPE_ID_) references BPEL_ACTIVITY_INST;
create index IF_ELSEIF_LST_IDX on ELSEIF_DEF_ (IF_ELSEIF_LST_ID_);
alter table ELSEIF_DEF_ add constraint IF_ELSEIF_LST_FK foreign key (IF_ELSEIF_LST_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table ELSEIF_DEF_ add constraint FK4BC7A7A366DBBFD7 foreign key (ELSEIF_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index IVK_FR_PT_LST_IDX on FRM_PRT_DEF_ (IVK_FR_PT_ID_);
create index ON_MSG_FRM_PRT_IDX on FRM_PRT_DEF_ (ON_MSG_FRM_PRT_ID_);
create index ON_EVT_FRM_PRT_IDX on FRM_PRT_DEF_ (ON_EVT_FRM_PRT_ID_);
create index REC_FR_PT_LST_IDX on FRM_PRT_DEF_ (REC_FR_PT_ID_);
alter table FRM_PRT_DEF_ add constraint REC_FR_PT_LST_FK foreign key (REC_FR_PT_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table FRM_PRT_DEF_ add constraint IVK_FR_PT_LST_FK foreign key (IVK_FR_PT_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table FRM_PRT_DEF_ add constraint ON_MSG_FRM_PRT_FK foreign key (ON_MSG_FRM_PRT_ID_) references ON_MSG_DEF_;
alter table FRM_PRT_DEF_ add constraint ON_EVT_FRM_PRT_FK foreign key (ON_EVT_FRM_PRT_ID_) references ON_EVT_DEF_;
create index TO_LST_IDX on FROM_TO_FULL (TO_LST_ID_);
create index FROM_LST_IDX on FROM_TO_FULL (FROM_LST_ID_);
alter table FROM_TO_FULL add constraint FROM_LST_FK foreign key (FROM_LST_ID_) references COPY_FULL_IMPL;
alter table FROM_TO_FULL add constraint TO_LST_FK foreign key (TO_LST_ID_) references COPY_FULL_IMPL;
create index CS_INST_PROP_IDX on NOVA_CS_INST_PROP (CS_ID_);
alter table NOVA_CS_INST_PROP add constraint CS_INST_PROP_FK foreign key (CS_ID_) references CS_INIT_FULL_IMPL;
create index SCOPE_DEF_ALARMS_IDX on ON_ALRM_DEF_ (SCOPE_ID_);
create index PK_DF_ON_AL_IDX on ON_ALRM_DEF_ (PK_DF_ON_AL_ID_);
alter table ON_ALRM_DEF_ add constraint PK_DF_ON_AL_FK foreign key (PK_DF_ON_AL_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table ON_ALRM_DEF_ add constraint FK5B79CBB3735C61C7 foreign key (ON_ALRM_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table ON_ALRM_DEF_ add constraint SCOPE_DEF_ALARMS_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_DEF_EVTS_IDX on ON_EVT_DEF_ (SCOPE_ID_);
alter table ON_EVT_DEF_ add constraint FKC013947699EA93C4 foreign key (ON_EVT_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table ON_EVT_DEF_ add constraint SCOPE_DEF_EVTS_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index PK_DF_ON_MSG_IDX on ON_MSG_DEF_ (PK_DF_ON_MSG_ID_);
alter table ON_MSG_DEF_ add constraint PK_DF_ON_MSG_FK foreign key (PK_DF_ON_MSG_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table ON_MSG_DEF_ add constraint FK4A3B4998A6853462 foreign key (ON_MSG_ACT_DEF_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_DEF_PL_IDX on PART_LNK_DEF_ (SCOPE_ID_);
alter table PART_LNK_DEF_ add constraint SCOPE_DEF_PL_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_INST_PLNK_IDX on PLNK_UPDATE_FULL_IMPL (SCOPE_ID_);
alter table PLNK_UPDATE_FULL_IMPL add constraint SCOPE_INST_PLNK_FK foreign key (SCOPE_ID_) references BPEL_ACTIVITY_INST;
create index PROCESS_INST_STATE_IDX on PROCESS_INST_STATE_UPDATE_ (PROCESS_INST_ID_);
alter table PROCESS_INST_STATE_UPDATE_ add constraint PROCESS_INST_STATE_FK foreign key (PROCESS_INST_ID_) references BPEL_ACTIVITY_INST;
create index PROCESS_STATE_IDX on PROC_STATE_UPD_ (PROCESS_ID_);
alter table PROC_STATE_UPD_ add constraint PROCESS_STATE_FK foreign key (PROCESS_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_INST_STATE_IDX on SCOPE_STATE_UPDATE_ (SCOPE_ID_);
alter table SCOPE_STATE_UPDATE_ add constraint SCOPE_INST_STATE_FK foreign key (SCOPE_ID_) references BPEL_ACTIVITY_INST;
create index SRC_LST_IDX on SRC_FULL_IMPL (SRC_LST_ID_);
alter table SRC_FULL_IMPL add constraint SRC_LST_FK foreign key (SRC_LST_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index TRGT_LST_IDX on TGT_FULL_IMPL (TRGT_LST_ID_);
alter table TGT_FULL_IMPL add constraint TRGT_LST_FK foreign key (TRGT_LST_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index IVK_TO_PT_LST_IDX on TO_PRT_DEF_ (IVK_TO_PT_ID_);
create index RP_TO_PT_LST_IDX on TO_PRT_DEF_ (RP_TO_PT_ID_);
alter table TO_PRT_DEF_ add constraint RP_TO_PT_LST_FK foreign key (RP_TO_PT_ID_) references BPEL_BASE_ACTIVITY_DEF;
alter table TO_PRT_DEF_ add constraint IVK_TO_PT_LST_FK foreign key (IVK_TO_PT_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index FLOW_INST_TR_COND_IDX on TR_COND_UPD_ (FLOW_ID_);
alter table TR_COND_UPD_ add constraint FLOW_INST_TR_COND_FK foreign key (FLOW_ID_) references BPEL_ACTIVITY_INST;
create index SCOPE_DEF_VAR_IDX on VAR_DEF_ (SCOPE_ID_);
alter table VAR_DEF_ add constraint SCOPE_DEF_VAR_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_DEF_CS_IDX on VAR_DEF_CS_ (SCOPE_ID_);
alter table VAR_DEF_CS_ add constraint SCOPE_DEF_CS_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_INST_VAR_IDX on VAR_UPDATE_FULL_IMPL (SCOPE_ID_);
alter table VAR_UPDATE_FULL_IMPL add constraint SCOPE_INST_VAR_FK foreign key (SCOPE_ID_) references BPEL_ACTIVITY_INST;
create index PICK_WAIT_IDX on WAITING_FULL_IMPL (PICK_ID_);
alter table WAITING_FULL_IMPL add constraint PICK_WAIT_FK foreign key (PICK_ID_) references BPEL_ACTIVITY_INST;
create index FLOW_LINKS_IDX on linkList (FLOW_LINKS_ID_);
alter table linkList add constraint FLOW_LINKS_FK foreign key (FLOW_LINKS_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index SCOPE_DEF_M_E_IDX on messageExchanges (SCOPE_ID_);
alter table messageExchanges add constraint SCOPE_DEF_M_E_FK foreign key (SCOPE_ID_) references BPEL_BASE_ACTIVITY_DEF;
create index CORR_ST_DEF_IDX on properties (CORR_ST_DEF_ID_);
alter table properties add constraint CORR_ST_DEF_FK foreign key (CORR_ST_DEF_ID_) references VAR_DEF_CS_;
create table orchestra_sequences ( sequence_name varchar2(255 char) not null ,  next_val number(19,0), primary key ( sequence_name ) ) ;
