create table MON_DEF_ACTIVITY (DBID_ int8 not null, CLASS_ varchar(255) not null, dbversion int8 not null, ACT_DEF_UUID_ varchar(500), PROCESS_DEF_UUID_ varchar(255), NAME_ varchar(255), DOCUMENTATION_ varchar(4000), SUPPR_JN_FL_ bool, TGT_JN_CDT_EXP_LG_ varchar(255), TGT_JN_CDT_BLN_LG_ varchar(255), CHILD_ACT_DEF_ID_ int8, FAULT_NAME_QNAME_ varchar(255), FAULT_MESSAGE_TYPE_QNAME_ varchar(255), FAULT_ELEMENT_QNAME_ varchar(255), faultVariable varchar(255), EX_ON_STA_FAULT_ bool, TERMINATION_HANDLER_ int8, COMPENSATION_HANDLER_ int8, NAMESPACE_ varchar(255), VERSION_ int4, EXPR_LANG_ varchar(255), QUERY_LANG_ varchar(255), DPLY_DATE_ timestamp, UNDPLY_DATE timestamp, STATE_ varchar(255), TARGET_ varchar(255), IVK_PRTLNK_ varchar(255), IVK_IN_VAR_ varchar(255), IVK_OUT_VAR_ varchar(255), IVK_OPERATION_ varchar(255), IVK_PRT_PT_QNAME_ varchar(255), PT_QNAME_ varchar(255), FAULT_VARIABLE_ varchar(255), WHL_EXP_LANG_ varchar(255), WHL_BOOL_EXP_ varchar(255), RPU_EXP_LANG_ varchar(255), RPU_BOOL_EXP_ varchar(255), REC_CRT_INST_ bool, REC_VAR_ varchar(255), REC_PARTN_LNK_ varchar(255), REC_OPERATION_ varchar(255), REC_MSG_EXCHNG_ varchar(255), REC_PRT_PT_QNAME_ varchar(255), REP_VAR_ varchar(255), REP_PARTN_LNK_ varchar(255), REP_OPERATION_ varchar(255), REP_MSG_EXCHNG_ varchar(255), REP_PRT_PT_QNAME_ varchar(255), REP_FLT_NM_QNAME_ varchar(255), ASSIGN_VLDT_ bool, FOR_EXPR_LANG_ varchar(255), FOR_DUR_LANG_ varchar(255), UNTIL_EXPR_LANG_ varchar(255), UNTIL_DEAD_LANG_ varchar(255), IF_EXPR_LANG_ varchar(255), IF_EXPR_ varchar(255), ELSE_ACT_DEF_ID_ int8, ELSE_ACT_UUID_ varchar(500), PK_DF_CR_INST_ bool, FRCH_C_N_EXPR_ varchar(255), FRCH_PARLLL_EXPR_ bool, FRCH_FINL_EXPR_ varchar(255), FRCH_FINL_EXPR_LG_ varchar(255), FRCH_STRT_EXPR_ varchar(255), FRCH_STRT_EXPR_LG_ varchar(255), FRCH_CD_EXPR_ varchar(255), FRCH_CD_EXPR_LG_ varchar(255), FRCH_CD_SUCC_ bool, EXT_TYPE varchar(255), PARENT_ACT_DEF_ID_ int8, INDEX_ int4, SCOPE_ID_ int8, primary key (DBID_));
create table MON_DEF_COPY (DBID_ int8 not null, KEEP_SRC_ELT_NAME bool, COPY_LST_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_CORR (DBID_ int8 not null, SETVALUE_ varchar(255), INITIATE_ varchar(255), ON_MSG_CORR_ID_ int8, INDEX_ int4, ON_EVT_CORR_ID_ int8, IVK_CR_DEF_ID_ int8, REC_CR_DEF_ID_ int8, RP_CR_DEF_ID_ int8, primary key (DBID_));
create table MON_DEF_ELSEIF (DBID_ int8 not null, ELSEIF_EXPR_ varchar(255), ELSEIF_EXPR_LANG_ varchar(255), ELSEIF_ACT_DEF_ID_ int8, ELSEIF_ACT_UUID_ varchar(500), IF_ELSEIF_LST_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_EXT (DBID_ int8 not null, NAMESPACE varchar(255), MUST_UNDERSTAND bool, SUPPORTED bool, PROCESS_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_FROM_PART (DBID_ int8 not null, FP_PART_ varchar(255), FP_TO_VAR_ varchar(255), ON_MSG_FRM_PRT_ID_ int8, INDEX_ int4, ON_EVT_FRM_PRT_ID_ int8, IVK_FR_PT_ID_ int8, REC_FR_PT_ID_ int8, primary key (DBID_));
create table MON_DEF_FROM_TO (DBID_ int8 not null, CLASS_ varchar(255) not null, FT_VARIANT_ varchar(255), FT_EXP_LANG_ varchar(255), FT_VARIABLE_ varchar(255), FT_PART_ varchar(255), FT_PARTNER_LINK_ varchar(255), FT_ENDPOINT_REF_ varchar(255), FT_PROP_QNAME_ varchar(255), FT_EXPRESSION_ varchar(255), FT_QUERY_ varchar(255), FT_QUERY_LANG_ varchar(255), LITRL_VALUE_ varchar(3999), FROM_LST_ID_ int8, INDEX_ int4, TO_LST_ID_ int8, primary key (DBID_));
create table MON_DEF_LINK (FLOW_LINKS_ID_ int8 not null, FLOW_LINKS_ varchar(255), INDEX_ int4 not null, primary key (FLOW_LINKS_ID_, INDEX_));
create table MON_DEF_LINK_SRC (DBID_ int8 not null, LNK_NAME varchar(255), TR_CND_EXP_LG varchar(255), TR_CND_BOL_EXP varchar(255), SRC_LST_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_LINK_TGT (DBID_ int8 not null, LNK_NAME varchar(255), TRGT_LST_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_MSG_EXCHG (SCOPE_ID_ int8 not null, elt varchar(255), INDEX_ int4 not null, primary key (SCOPE_ID_, INDEX_));
create table MON_DEF_ON_ALRM (DBID_ int8 not null, ON_ALRM_ACT_DEF_ID_ int8, ON_ALRM_ACT_UUID_ varchar(500), FOR_EXPR_LANG_ varchar(255), FOR_DUR_LANG_ varchar(255), UNTIL_EXPR_LANG_ varchar(255), UNTIL_DEAD_LANG_ varchar(255), REPETE_EXPR_LANG_ varchar(255), REPEAT_DEAD_LANG_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, PK_DF_ON_AL_ID_ int8, primary key (DBID_));
create table MON_DEF_ON_EVT (DBID_ int8 not null, PICK_VAR_ varchar(255), PICK_PART_LNK_ varchar(255), PICK_OPTN_ varchar(255), PICK_MSG_EXCHG_ varchar(255), PICK_PT_TP_QNAME_ varchar(255), ON_EVT_ACT_DEF_ID_ int8, ON_EVT_ACT_UUID_ varchar(500), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_ON_MSG (DBID_ int8 not null, PICK_VAR_ varchar(255), PICK_PART_LNK_ varchar(255), PICK_OPTN_ varchar(255), PICK_MSG_EXCHG_ varchar(255), PICK_PT_TP_QNAME_ varchar(255), ON_MSG_ACT_DEF_ID_ int8, ON_MSG_ACT_UUID_ varchar(500), PK_DF_ON_MSG_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_PART_LNK (DBID_ int8 not null, NAME_ varchar(255), MY_ROLE_ varchar(255), PARTNER_ROLE_ varchar(255), INIT_PRTN_ROLE_ bool, PRT_LNK_QNAME_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_PROC_STATE (DBID_ int8 not null, DATE_ timestamp, STATE_ varchar(255), PROCESS_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_RESOURCES (PROCESS_ID_ int8 not null, CONTENT_ oid, NAME_ varchar(255) not null, primary key (PROCESS_ID_, NAME_));
create table MON_DEF_TO_PART (DBID_ int8 not null, TP_PART_ varchar(255), TP_FRM_VAR_ varchar(255), IVK_TO_PT_ID_ int8, INDEX_ int4, RP_TO_PT_ID_ int8, primary key (DBID_));
create table MON_DEF_VAR (DBID_ int8 not null, MSGTYPE_QNAME_ varchar(255), TYPE_QNAME_ varchar(255), ELT_QNAME_ varchar(255), NAME_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_VAR_CS (DBID_ int8 not null, NAME_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_DEF_VAR_CS_properties (CORR_ST_DEF_ID_ int8 not null, PROP_QNAME_ varchar(255), INDEX_ int4 not null, primary key (CORR_ST_DEF_ID_, INDEX_));
create table MON_RUNT_ACTIVITY (DBID_ int8 not null, CLASS_ varchar(255) not null, dbversion int8 not null, ACT_INST_UUID_ varchar(255), ACT_DEF_UUID_ varchar(500), PROCESS_UUID_ varchar(255), INST_UUID_ varchar(255), STARTED_DATE_ timestamp, ENDED_DATE_ timestamp, ACTIVITY_STATE_ varchar(255), LAST_EXCEPTION_ int8, CHILD_ACT_INST_ID_ int8, OPERATION_ varchar(255), VARIABLE_ varchar(255), MESSAGE_EXCHANGE_ varchar(255), FH_INST_ int8, TH_INST_ int8, CH_INST_ int8, START_VALUE_ int4, STOP_VALUE_ int4, COMPLETION_CONDITION_VALUE_ int4, CHILD_WAIT_ACT_ int8, PARENT_ACT_INST_ID_ int8, INDEX_ int4, PARENT_SCOPE_ID_ int8, primary key (DBID_));
create table MON_RUNT_BPEL_FAULT_ (DBID_ int8 not null, CLASS_ varchar(255) not null, FAULT_QNAME_ varchar(255), MSG_PARTS_ text, ELT_ text, primary key (DBID_));
create table MON_RUNT_CS_INIT (DBID_ int8 not null, ACT_INST_UUID_ varchar(255), DATE_ timestamp, NAME_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_RUNT_CS_PROP (CS_ID_ int8 not null, VALUE_ text, QNAME_ varchar(255) not null, primary key (CS_ID_, QNAME_));
create table MON_RUNT_INST_STATE (DBID_ int8 not null, DATE_ timestamp, STATE_ varchar(255), PROCESS_INST_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_RUNT_PLNK_UPDATE (DBID_ int8 not null, ACT_INST_UUID_ varchar(255), DATE_ timestamp, NAME_ varchar(255), P_END_REF text, PLNK_UPD_TYPE_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_RUNT_RECORD (DBID_ int8 not null, TYPE_ varchar(255), ACT_INST_UUID_ varchar(255), PROCESS_UUID_ varchar(255), INST_UUID_ varchar(255), DATA_ oid, primary key (DBID_));
create table MON_RUNT_SCOPE_STATE (DBID_ int8 not null, ACT_INST_UUID_ varchar(255), DATE_ timestamp, STATE_ varchar(255), SCOPE_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_RUNT_TR_COND_UPD_ (DBID_ int8 not null, STATUS_ bool, NAME_ varchar(255), DATE_ timestamp, FLOW_ID_ int8, INDEX_ int4, primary key (DBID_));
create table MON_RUNT_VAR_UPDATE (DBID_ int8 not null, ACT_INST_UUID_ varchar(255), DATE_ timestamp, NAME_ varchar(255), IS_MESSAGE_ bool, VALUE_ text, INDEX_ int4, SCOPE_ID_ int8, primary key (DBID_));
create table MON_RUNT_WAITING (DBID_ int8 not null, EXPECTED_STARTED_DATE_ timestamp, PICK_ID_ int8, INDEX_ int4, primary key (DBID_));
create index SCOPE_DEF_FAULT_HANDLERS_IDX on MON_DEF_ACTIVITY (SCOPE_ID_);
alter table MON_DEF_ACTIVITY add constraint FKB2087C9CF1C5FAB0 foreign key (PARENT_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ACTIVITY add constraint FKB2087C9C82112BDD foreign key (CHILD_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ACTIVITY add constraint FKB2087C9C614874B5 foreign key (TERMINATION_HANDLER_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ACTIVITY add constraint FKB2087C9CDE3B31AF foreign key (COMPENSATION_HANDLER_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ACTIVITY add constraint FKB2087C9CD4D0807A foreign key (ELSE_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ACTIVITY add constraint SCOPE_DEF_FAULT_HANDLERS_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index COPY_LST_IDX on MON_DEF_COPY (COPY_LST_ID_);
alter table MON_DEF_COPY add constraint COPY_LST_FK foreign key (COPY_LST_ID_) references MON_DEF_ACTIVITY;
create index RP_CR_DEF_LST_IDX on MON_DEF_CORR (RP_CR_DEF_ID_);
create index IVK_CR_DEF_LST_IDX on MON_DEF_CORR (IVK_CR_DEF_ID_);
create index ON_MSG_CORR_IDX on MON_DEF_CORR (ON_MSG_CORR_ID_);
create index REC_CR_DEF_LST_IDX on MON_DEF_CORR (REC_CR_DEF_ID_);
create index ON_EVT_CORR_IDX on MON_DEF_CORR (ON_EVT_CORR_ID_);
alter table MON_DEF_CORR add constraint REC_CR_DEF_LST_FK foreign key (REC_CR_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_CORR add constraint IVK_CR_DEF_LST_FK foreign key (IVK_CR_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_CORR add constraint RP_CR_DEF_LST_FK foreign key (RP_CR_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_CORR add constraint ON_EVT_CORR_FK foreign key (ON_EVT_CORR_ID_) references MON_DEF_ON_EVT;
alter table MON_DEF_CORR add constraint ON_MSG_CORR_FK foreign key (ON_MSG_CORR_ID_) references MON_DEF_ON_MSG;
create index IF_ELSEIF_LST_IDX on MON_DEF_ELSEIF (IF_ELSEIF_LST_ID_);
alter table MON_DEF_ELSEIF add constraint IF_ELSEIF_LST_FK foreign key (IF_ELSEIF_LST_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ELSEIF add constraint FK802DBCE366DBBFD7 foreign key (ELSEIF_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
create index PROCESS_EXT_IDX on MON_DEF_EXT (PROCESS_ID_);
alter table MON_DEF_EXT add constraint PROCESS_EXT_FK foreign key (PROCESS_ID_) references MON_DEF_ACTIVITY;
create index IVK_FR_PT_LST_IDX on MON_DEF_FROM_PART (IVK_FR_PT_ID_);
create index ON_MSG_FRM_PRT_IDX on MON_DEF_FROM_PART (ON_MSG_FRM_PRT_ID_);
create index ON_EVT_FRM_PRT_IDX on MON_DEF_FROM_PART (ON_EVT_FRM_PRT_ID_);
create index REC_FR_PT_LST_IDX on MON_DEF_FROM_PART (REC_FR_PT_ID_);
alter table MON_DEF_FROM_PART add constraint REC_FR_PT_LST_FK foreign key (REC_FR_PT_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_FROM_PART add constraint IVK_FR_PT_LST_FK foreign key (IVK_FR_PT_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_FROM_PART add constraint ON_MSG_FRM_PRT_FK foreign key (ON_MSG_FRM_PRT_ID_) references MON_DEF_ON_MSG;
alter table MON_DEF_FROM_PART add constraint ON_EVT_FRM_PRT_FK foreign key (ON_EVT_FRM_PRT_ID_) references MON_DEF_ON_EVT;
create index TO_LST_IDX on MON_DEF_FROM_TO (TO_LST_ID_);
create index FROM_LST_IDX on MON_DEF_FROM_TO (FROM_LST_ID_);
alter table MON_DEF_FROM_TO add constraint FROM_LST_FK foreign key (FROM_LST_ID_) references MON_DEF_COPY;
alter table MON_DEF_FROM_TO add constraint TO_LST_FK foreign key (TO_LST_ID_) references MON_DEF_COPY;
create index FLOW_LINKS_IDX on MON_DEF_LINK (FLOW_LINKS_ID_);
alter table MON_DEF_LINK add constraint FLOW_LINKS_FK foreign key (FLOW_LINKS_ID_) references MON_DEF_ACTIVITY;
create index SRC_LST_IDX on MON_DEF_LINK_SRC (SRC_LST_ID_);
alter table MON_DEF_LINK_SRC add constraint SRC_LST_FK foreign key (SRC_LST_ID_) references MON_DEF_ACTIVITY;
create index TRGT_LST_IDX on MON_DEF_LINK_TGT (TRGT_LST_ID_);
alter table MON_DEF_LINK_TGT add constraint TRGT_LST_FK foreign key (TRGT_LST_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_M_E_IDX on MON_DEF_MSG_EXCHG (SCOPE_ID_);
alter table MON_DEF_MSG_EXCHG add constraint SCOPE_DEF_M_E_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_ALARMS_IDX on MON_DEF_ON_ALRM (SCOPE_ID_);
create index PK_DF_ON_AL_IDX on MON_DEF_ON_ALRM (PK_DF_ON_AL_ID_);
alter table MON_DEF_ON_ALRM add constraint PK_DF_ON_AL_FK foreign key (PK_DF_ON_AL_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ON_ALRM add constraint FK9A9936D9735C61C7 foreign key (ON_ALRM_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ON_ALRM add constraint SCOPE_DEF_ALARMS_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_EVTS_IDX on MON_DEF_ON_EVT (SCOPE_ID_);
alter table MON_DEF_ON_EVT add constraint FK915FD83099EA93C4 foreign key (ON_EVT_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ON_EVT add constraint SCOPE_DEF_EVTS_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index PK_DF_ON_MSG_IDX on MON_DEF_ON_MSG (PK_DF_ON_MSG_ID_);
alter table MON_DEF_ON_MSG add constraint PK_DF_ON_MSG_FK foreign key (PK_DF_ON_MSG_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_ON_MSG add constraint FK915FF5CEA6853462 foreign key (ON_MSG_ACT_DEF_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_PL_IDX on MON_DEF_PART_LNK (SCOPE_ID_);
alter table MON_DEF_PART_LNK add constraint SCOPE_DEF_PL_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index PROCESS_STATE_IDX on MON_DEF_PROC_STATE (PROCESS_ID_);
alter table MON_DEF_PROC_STATE add constraint PROCESS_STATE_FK foreign key (PROCESS_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_RESOURCES add constraint FKCA16618F2951188 foreign key (PROCESS_ID_) references MON_DEF_ACTIVITY;
create index IVK_TO_PT_LST_IDX on MON_DEF_TO_PART (IVK_TO_PT_ID_);
create index RP_TO_PT_LST_IDX on MON_DEF_TO_PART (RP_TO_PT_ID_);
alter table MON_DEF_TO_PART add constraint RP_TO_PT_LST_FK foreign key (RP_TO_PT_ID_) references MON_DEF_ACTIVITY;
alter table MON_DEF_TO_PART add constraint IVK_TO_PT_LST_FK foreign key (IVK_TO_PT_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_VAR_IDX on MON_DEF_VAR (SCOPE_ID_);
alter table MON_DEF_VAR add constraint SCOPE_DEF_VAR_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index SCOPE_DEF_CS_IDX on MON_DEF_VAR_CS (SCOPE_ID_);
alter table MON_DEF_VAR_CS add constraint SCOPE_DEF_CS_FK foreign key (SCOPE_ID_) references MON_DEF_ACTIVITY;
create index CORR_ST_DEF_IDX on MON_DEF_VAR_CS_properties (CORR_ST_DEF_ID_);
alter table MON_DEF_VAR_CS_properties add constraint CORR_ST_DEF_FK foreign key (CORR_ST_DEF_ID_) references MON_DEF_VAR_CS;
create index ACT_INST_EXCEPTION_IDX on MON_RUNT_ACTIVITY (LAST_EXCEPTION_);
create index ACT_INST_PARENT_IDK on MON_RUNT_ACTIVITY (PARENT_ACT_INST_ID_);
create index SCOPE_INST_EVT_IDX on MON_RUNT_ACTIVITY (PARENT_SCOPE_ID_);
create index ACT_INST_CHILD_IDX on MON_RUNT_ACTIVITY (CHILD_ACT_INST_ID_);
create index ACT_PROC_INST_UUID_IDX on MON_RUNT_ACTIVITY (INST_UUID_);
create index ACT_INST_FH_IDX on MON_RUNT_ACTIVITY (FH_INST_);
create index ACT_INST_CH_IDX on MON_RUNT_ACTIVITY (CH_INST_);
create index ACT_INST_WAIT_IDX on MON_RUNT_ACTIVITY (CHILD_WAIT_ACT_);
create index ACT_INST_UUID_IDX on MON_RUNT_ACTIVITY (ACT_INST_UUID_);
create index ACT_INST_TH_IDX on MON_RUNT_ACTIVITY (TH_INST_);
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_PARENT_FK foreign key (PARENT_ACT_INST_ID_) references MON_RUNT_ACTIVITY;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_CH_FK foreign key (CH_INST_) references MON_RUNT_ACTIVITY;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_TH_FK foreign key (TH_INST_) references MON_RUNT_ACTIVITY;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_FH_FK foreign key (FH_INST_) references MON_RUNT_ACTIVITY;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_EXCEPTION_FK foreign key (LAST_EXCEPTION_) references MON_RUNT_BPEL_FAULT_;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_WAIT_FK foreign key (CHILD_WAIT_ACT_) references MON_RUNT_WAITING;
alter table MON_RUNT_ACTIVITY add constraint ACT_INST_CHILD_FK foreign key (CHILD_ACT_INST_ID_) references MON_RUNT_ACTIVITY;
alter table MON_RUNT_ACTIVITY add constraint SCOPE_INST_EVT_FK foreign key (PARENT_SCOPE_ID_) references MON_RUNT_ACTIVITY;
create index SCOPE_INST_CS_IDX on MON_RUNT_CS_INIT (SCOPE_ID_);
alter table MON_RUNT_CS_INIT add constraint SCOPE_INST_CS_FK foreign key (SCOPE_ID_) references MON_RUNT_ACTIVITY;
create index CS_INST_PROP_IDX on MON_RUNT_CS_PROP (CS_ID_);
alter table MON_RUNT_CS_PROP add constraint CS_INST_PROP_FK foreign key (CS_ID_) references MON_RUNT_CS_INIT;
create index PROCESS_INST_STATE_IDX on MON_RUNT_INST_STATE (PROCESS_INST_ID_);
alter table MON_RUNT_INST_STATE add constraint PROCESS_INST_STATE_FK foreign key (PROCESS_INST_ID_) references MON_RUNT_ACTIVITY;
create index SCOPE_INST_PLNK_IDX on MON_RUNT_PLNK_UPDATE (SCOPE_ID_);
alter table MON_RUNT_PLNK_UPDATE add constraint SCOPE_INST_PLNK_FK foreign key (SCOPE_ID_) references MON_RUNT_ACTIVITY;
create index IDX_REC_PROC_INST on MON_RUNT_RECORD (INST_UUID_);
create index IDX_REC_ACT_INST on MON_RUNT_RECORD (ACT_INST_UUID_);
create index IDX_REC_PROC_DEF on MON_RUNT_RECORD (PROCESS_UUID_);
create index SCOPE_INST_STATE_IDX on MON_RUNT_SCOPE_STATE (SCOPE_ID_);
alter table MON_RUNT_SCOPE_STATE add constraint SCOPE_INST_STATE_FK foreign key (SCOPE_ID_) references MON_RUNT_ACTIVITY;
create index FLOW_INST_TR_COND_IDX on MON_RUNT_TR_COND_UPD_ (FLOW_ID_);
alter table MON_RUNT_TR_COND_UPD_ add constraint FLOW_INST_TR_COND_FK foreign key (FLOW_ID_) references MON_RUNT_ACTIVITY;
create index SCOPE_INST_VAR_IDX on MON_RUNT_VAR_UPDATE (SCOPE_ID_);
alter table MON_RUNT_VAR_UPDATE add constraint SCOPE_INST_VAR_FK foreign key (SCOPE_ID_) references MON_RUNT_ACTIVITY;
create index PICK_WAIT_IDX on MON_RUNT_WAITING (PICK_ID_);
alter table MON_RUNT_WAITING add constraint PICK_WAIT_FK foreign key (PICK_ID_) references MON_RUNT_ACTIVITY;
create table BPEL_HISTORY_SEQS ( sequence_name varchar(255) not null ,  next_val int8, primary key ( sequence_name ) ) ;
