提交 b6dc50f3 编写于 作者: T tombaeyens

ACT-59 fixed table names and fixed table page in probe due to earlier query sorting updates

上级 2cb5768d
......@@ -24,6 +24,6 @@ insert into ACT_ID_MEMBERSHIP values ('gonzo', 'management');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'accountancy');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'sales');
update ACT_PROPERTY
update ACT_GE_PROPERTY
set VALUE_ = '10'
where NAME_ = 'next.dbid';
......@@ -29,21 +29,21 @@ public class ManagementServiceTest extends ProcessEngineTestCase {
public void testTableCount() {
Map<String, Long> tableCount = managementService.getTableCount();
assertEquals(new Long(2), tableCount.get("ACT_PROPERTY"));
assertEquals(new Long(0), tableCount.get("ACT_BYTEARRAY"));
assertEquals(new Long(0), tableCount.get("ACT_DEPLOYMENT"));
assertEquals(new Long(0), tableCount.get("ACT_EXECUTION"));
assertEquals(new Long(2), tableCount.get("ACT_GE_PROPERTY"));
assertEquals(new Long(0), tableCount.get("ACT_GE_BYTEARRAY"));
assertEquals(new Long(0), tableCount.get("ACT_RE_DEPLOYMENT"));
assertEquals(new Long(0), tableCount.get("ACT_RU_EXECUTION"));
assertEquals(new Long(0), tableCount.get("ACT_ID_GROUP"));
assertEquals(new Long(0), tableCount.get("ACT_ID_MEMBERSHIP"));
assertEquals(new Long(0), tableCount.get("ACT_ID_USER"));
assertEquals(new Long(0), tableCount.get("ACT_PROCESSDEFINITION"));
assertEquals(new Long(0), tableCount.get("ACT_TASK"));
assertEquals(new Long(0), tableCount.get("ACT_TASKINVOLVEMENT"));
assertEquals(new Long(0), tableCount.get("ACT_RE_PROC_DEF"));
assertEquals(new Long(0), tableCount.get("ACT_RU_TASK"));
assertEquals(new Long(0), tableCount.get("ACT_RU_TASKINVOLVEMENT"));
;
}
public void testGetTableMetaData() {
TableMetaData tableMetaData = managementService.getTableMetaData("ACT_TASK");
TableMetaData tableMetaData = managementService.getTableMetaData("ACT_RU_TASK");
assertEquals(tableMetaData.getColumnNames().size(), tableMetaData.getColumnTypes().size());
assertEquals(14, tableMetaData.getColumnNames().size());
......
......@@ -30,7 +30,7 @@ public class TablePageQueryTest extends ProcessEngineTestCase {
List<String> taskIds = generateDummyTasks(20);
TablePage tablePage = managementService.createTablePageQuery()
.tableName("ACT_TASK")
.tableName("ACT_RU_TASK")
.listPage(0, 5);
assertEquals(0, tablePage.getFirstResult());
......@@ -39,7 +39,7 @@ public class TablePageQueryTest extends ProcessEngineTestCase {
assertEquals(20, tablePage.getTotal());
tablePage = managementService.createTablePageQuery()
.tableName("ACT_TASK")
.tableName("ACT_RU_TASK")
.listPage(14, 10);
assertEquals(14, tablePage.getFirstResult());
......@@ -55,7 +55,7 @@ public class TablePageQueryTest extends ProcessEngineTestCase {
// With an ascending sort
TablePage tablePage = managementService.createTablePageQuery()
.tableName("ACT_TASK")
.tableName("ACT_RU_TASK")
.orderAsc("NAME_")
.listPage(1, 7);
String[] expectedTaskNames = new String[] {"B", "C", "D", "E", "F", "G", "H"};
......@@ -63,7 +63,7 @@ public class TablePageQueryTest extends ProcessEngineTestCase {
// With a descending sort
tablePage = managementService.createTablePageQuery()
.tableName("ACT_TASK")
.tableName("ACT_RU_TASK")
.orderDesc("NAME_")
.listPage(6, 8);
expectedTaskNames = new String[] {"I", "H", "G", "F", "E", "D", "C", "B"} ;
......
......@@ -30,7 +30,7 @@ public class TablePage {
/**
* The total number of rows in the table.
*/
protected long total = -1;;
protected long total = -1;
/**
* Identifies the index of the first result stored in this TablePage.
......@@ -40,7 +40,7 @@ public class TablePage {
protected long firstResult;
/**
* Indicates the key or column on which the signalData is sorted.
* Indicates the key or column on which the rows are sorted.
*/
protected String sort;
......
......@@ -28,8 +28,8 @@ import org.activiti.engine.impl.interceptor.CommandExecutor;
*/
public abstract class AbstractQuery<T> implements Command<Object>{
protected static final String SORTORDER_ASC = "asc";
protected static final String SORTORDER_DESC = "desc";
public static final String SORTORDER_ASC = "asc";
public static final String SORTORDER_DESC = "desc";
private static enum ResultType {
LIST, LIST_PAGE, SINGLE_RESULT, COUNT
......
......@@ -31,6 +31,8 @@ public class TablePageQueryImpl implements TablePageQuery, Command<TablePage> {
protected String orderBy;
protected int firstResult;
protected int maxResults;
protected String sortColumn;
protected String sortOrder;
public TablePageQueryImpl() {
}
......@@ -59,6 +61,8 @@ public class TablePageQueryImpl implements TablePageQuery, Command<TablePage> {
}
protected void addOrder(String column, String sortOrder) {
this.sortColumn = column;
this.sortOrder = sortOrder;
if (orderBy==null) {
orderBy = "";
} else {
......@@ -78,4 +82,16 @@ public class TablePageQueryImpl implements TablePageQuery, Command<TablePage> {
.getManagementSession()
.getTablePage(this, firstResult, maxResults);
}
public String getSortColumn() {
return sortColumn;
}
public String getSortOrder() {
return sortOrder;
}
}
......@@ -24,8 +24,10 @@ import java.util.logging.Logger;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.ActivitiOptimisticLockingException;
import org.activiti.engine.SortOrder;
import org.activiti.engine.TableMetaData;
import org.activiti.engine.TablePage;
import org.activiti.engine.impl.AbstractQuery;
import org.activiti.engine.impl.TablePageQueryImpl;
import org.activiti.engine.impl.cfg.ManagementSession;
import org.activiti.engine.impl.interceptor.CommandContext;
......@@ -42,20 +44,20 @@ public class DbManagementSession implements ManagementSession, Session {
private static Logger log = Logger.getLogger(DbManagementSession.class.getName());
protected static String[] tableNames = new String[]{
"ACT_PROPERTY",
"ACT_BYTEARRAY",
"ACT_DEPLOYMENT",
"ACT_EXECUTION",
"ACT_GE_PROPERTY",
"ACT_GE_BYTEARRAY",
"ACT_RE_DEPLOYMENT",
"ACT_RU_EXECUTION",
"ACT_ID_GROUP",
"ACT_ID_MEMBERSHIP",
"ACT_ID_USER",
"ACT_JOB",
"ACT_PROCESSDEFINITION",
"ACT_TASK",
"ACT_TASKINVOLVEMENT",
"ACT_VARIABLE",
"ACT_H_PROCINST",
"ACT_H_ACTINST"
"ACT_RU_JOB",
"ACT_RE_PROC_DEF",
"ACT_RU_TASK",
"ACT_RU_TASKINVOLVEMENT",
"ACT_RU_VARIABLE",
"ACT_HI_PROC_INST",
"ACT_HI_ACT_INST"
};
......@@ -97,6 +99,13 @@ public class DbManagementSession implements ManagementSession, Session {
tablePage.setTotal(getTableCount(tablePageQuery.getTableName()));
tablePage.setRows(tableData);
tablePage.setFirstResult(firstResult);
tablePage.setSort(tablePageQuery.getSortColumn());
String sortOrderString = tablePageQuery.getSortOrder();
if (AbstractQuery.SORTORDER_ASC.equals(sortOrderString)) {
tablePage.setOrder(SortOrder.ASC);
} else if (AbstractQuery.SORTORDER_DESC.equals(sortOrderString)) {
tablePage.setOrder(SortOrder.DESC);
}
return tablePage;
}
......
......@@ -57,7 +57,7 @@ public class ProcessEngineTestCase extends PvmTestCase {
private static Logger log = Logger.getLogger(ProcessEngineTestCase.class.getName());
private static final List<String> TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK = Arrays.asList(
"ACT_PROPERTY"
"ACT_GE_PROPERTY"
);
static final String DEFAULT_CONFIGURATION_RESOURCE = "activiti.properties";
......
create table ACT_PROPERTY (
create table ACT_GE_PROPERTY (
NAME_ varchar,
VALUE_ varchar,
REV_ integer,
primary key (NAME_)
);
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('schema.version', '5.0.beta1-SNAPSHOT', 1);
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
create table ACT_BYTEARRAY (
create table ACT_GE_BYTEARRAY (
ID_ varchar(255),
REV_ integer,
NAME_ varchar(255),
......@@ -20,14 +20,14 @@ create table ACT_BYTEARRAY (
primary key (ID_)
);
create table ACT_DEPLOYMENT (
create table ACT_RE_DEPLOYMENT (
ID_ varchar(255),
NAME_ varchar(255),
DEPLOY_TIME_ timestamp,
primary key (ID_)
);
create table ACT_EXECUTION (
create table ACT_RU_EXECUTION (
ID_ varchar(255),
REV_ integer,
PROC_INST_ID_ varchar(255),
......@@ -41,7 +41,7 @@ create table ACT_EXECUTION (
primary key (ID_)
);
create table ACT_JOB (
create table ACT_RU_JOB (
ID_ varchar(255) NOT NULL,
REV_ integer,
TYPE_ varchar(255) NOT NULL,
......@@ -83,7 +83,7 @@ create table ACT_ID_USER (
primary key (ID_)
);
create table ACT_PROCESSDEFINITION (
create table ACT_RE_PROC_DEF (
ID_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255),
......@@ -93,7 +93,7 @@ create table ACT_PROCESSDEFINITION (
primary key (ID_)
);
create table ACT_TASK (
create table ACT_RU_TASK (
ID_ varchar(255),
REV_ integer,
EXECUTION_ID_ varchar(255),
......@@ -111,7 +111,7 @@ create table ACT_TASK (
primary key (ID_)
);
create table ACT_TASKINVOLVEMENT (
create table ACT_RU_TASKINVOLVEMENT (
ID_ varchar(255),
REV_ integer,
GROUP_ID_ varchar(255),
......@@ -121,7 +121,7 @@ create table ACT_TASKINVOLVEMENT (
primary key (ID_)
);
create table ACT_VARIABLE (
create table ACT_RU_VARIABLE (
ID_ varchar not null,
REV_ integer,
TYPE_ varchar(255) not null,
......@@ -137,7 +137,7 @@ create table ACT_VARIABLE (
primary key (ID_)
);
create table ACT_H_PROCINST (
create table ACT_HI_PROC_INST (
ID_ varchar not null,
PROC_INST_ID_ varchar(255) not null,
PROC_DEF_ID_ varchar(255) not null,
......@@ -150,7 +150,7 @@ create table ACT_H_PROCINST (
unique (PROC_INST_ID_)
);
create table ACT_H_ACTINST (
create table ACT_HI_ACT_INST (
ID_ varchar not null,
ACT_ID_ varchar(255) not null,
ACT_NAME_ varchar(255),
......@@ -164,25 +164,25 @@ create table ACT_H_ACTINST (
unique (ACT_ID_, PROC_INST_ID_)
);
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
add constraint FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_)
references ACT_DEPLOYMENT;
references ACT_RE_DEPLOYMENT;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PARENT
foreign key (PARENT_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_SUPER
foreign key (SUPER_EXEC_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_ID_MEMBERSHIP
add constraint FK_MEMB_GROUP
......@@ -194,42 +194,42 @@ alter table ACT_ID_MEMBERSHIP
foreign key (USER_ID_)
references ACT_ID_USER;
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
add constraint FK_TSKASS_TASK
foreign key (TASK_ID_)
references ACT_TASK;
references ACT_RU_TASK;
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_EXEC
foreign key (EXECUTION_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_)
references ACT_PROCESSDEFINITION;
references ACT_RE_PROC_DEF;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_TASK
foreign key (TASK_ID_)
references ACT_TASK;
references ACT_RU_TASK;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_EXE
foreign key (EXECUTION_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION;
references ACT_RU_EXECUTION;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_)
references ACT_BYTEARRAY;
references ACT_GE_BYTEARRAY;
create table ACT_PROPERTY (
create table ACT_GE_PROPERTY (
NAME_ varchar(300),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
) TYPE=InnoDB;
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('schema.version', '5.0.beta1-SNAPSHOT', 1);
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
create table ACT_BYTEARRAY (
create table ACT_GE_BYTEARRAY (
ID_ varchar(255),
REV_ integer,
NAME_ varchar(255),
......@@ -20,14 +20,14 @@ create table ACT_BYTEARRAY (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_DEPLOYMENT (
create table ACT_RE_DEPLOYMENT (
ID_ varchar(255),
NAME_ varchar(255),
DEPLOY_TIME_ timestamp,
primary key (ID_)
) TYPE=InnoDB;
create table ACT_EXECUTION (
create table ACT_RU_EXECUTION (
ID_ varchar(255),
REV_ integer,
PROC_INST_ID_ varchar(255),
......@@ -41,7 +41,7 @@ create table ACT_EXECUTION (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_JOB (
create table ACT_RU_JOB (
ID_ varchar(255) NOT NULL,
REV_ integer,
TYPE_ varchar(255) NOT NULL,
......@@ -83,7 +83,7 @@ create table ACT_ID_USER (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_PROCESSDEFINITION (
create table ACT_RE_PROC_DEF (
ID_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255),
......@@ -93,7 +93,7 @@ create table ACT_PROCESSDEFINITION (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_TASK (
create table ACT_RU_TASK (
ID_ varchar(255),
REV_ integer,
EXECUTION_ID_ varchar(255),
......@@ -111,7 +111,7 @@ create table ACT_TASK (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_TASKINVOLVEMENT (
create table ACT_RU_TASKINVOLVEMENT (
ID_ varchar(255),
REV_ integer,
GROUP_ID_ varchar(255),
......@@ -121,7 +121,7 @@ create table ACT_TASKINVOLVEMENT (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_VARIABLE (
create table ACT_RU_VARIABLE (
ID_ varchar(300) not null,
REV_ integer,
TYPE_ varchar(255) not null,
......@@ -137,7 +137,7 @@ create table ACT_VARIABLE (
primary key (ID_)
) TYPE=InnoDB;
create table ACT_H_PROCINST (
create table ACT_HI_PROC_INST (
ID_ varchar(255) not null,
PROC_INST_ID_ varchar(255) not null,
PROC_DEF_ID_ varchar(255) not null,
......@@ -150,7 +150,7 @@ create table ACT_H_PROCINST (
unique (PROC_INST_ID_)
) TYPE=InnoDB;
create table ACT_H_ACTINST (
create table ACT_HI_ACT_INST (
ID_ varchar(255) not null,
ACT_ID_ varchar(255) not null,
ACT_NAME_ varchar(255),
......@@ -164,25 +164,25 @@ create table ACT_H_ACTINST (
unique (ACT_ID_, PROC_INST_ID_)
) TYPE=InnoDB;
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
add constraint FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_)
references ACT_DEPLOYMENT (ID_);
references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION (ID_) on delete cascade on update cascade;
references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PARENT
foreign key (PARENT_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_SUPER
foreign key (SUPER_EXEC_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_ID_MEMBERSHIP
add constraint FK_MEMB_GROUP
......@@ -194,42 +194,42 @@ alter table ACT_ID_MEMBERSHIP
foreign key (USER_ID_)
references ACT_ID_USER (ID_);
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
add constraint FK_TSKASS_TASK
foreign key (TASK_ID_)
references ACT_TASK (ID_);
references ACT_RU_TASK (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_EXEC
foreign key (EXECUTION_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_)
references ACT_PROCESSDEFINITION (ID_);
references ACT_RE_PROC_DEF (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_TASK
foreign key (TASK_ID_)
references ACT_TASK (ID_);
references ACT_RU_TASK (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_EXE
foreign key (EXECUTION_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION(ID_);
references ACT_RU_EXECUTION(ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_)
references ACT_BYTEARRAY (ID_);
\ No newline at end of file
references ACT_GE_BYTEARRAY (ID_);
\ No newline at end of file
create table ACT_PROPERTY (
create table ACT_GE_PROPERTY (
NAME_ varchar(300),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
);
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('schema.version', '5.0.beta1-SNAPSHOT', 1);
insert into ACT_PROPERTY
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
create table ACT_BYTEARRAY (
create table ACT_GE_BYTEARRAY (
ID_ varchar(255),
REV_ integer,
NAME_ varchar(255),
......@@ -20,14 +20,14 @@ create table ACT_BYTEARRAY (
primary key (ID_)
);
create table ACT_DEPLOYMENT (
create table ACT_RE_DEPLOYMENT (
ID_ varchar(255),
NAME_ varchar(255),
DEPLOY_TIME_ timestamp,
primary key (ID_)
);
create table ACT_EXECUTION (
create table ACT_RU_EXECUTION (
ID_ varchar(255),
REV_ integer,
PROC_INST_ID_ varchar(255),
......@@ -41,7 +41,7 @@ create table ACT_EXECUTION (
primary key (ID_)
);
create table ACT_JOB (
create table ACT_RU_JOB (
ID_ varchar(255) NOT NULL,
REV_ integer,
TYPE_ varchar(255) NOT NULL,
......@@ -83,7 +83,7 @@ create table ACT_ID_USER (
primary key (ID_)
);
create table ACT_PROCESSDEFINITION (
create table ACT_RE_PROC_DEF (
ID_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255),
......@@ -93,7 +93,7 @@ create table ACT_PROCESSDEFINITION (
primary key (ID_)
);
create table ACT_TASK (
create table ACT_RU_TASK (
ID_ varchar(255),
REV_ integer,
EXECUTION_ID_ varchar(255),
......@@ -111,7 +111,7 @@ create table ACT_TASK (
primary key (ID_)
);
create table ACT_TASKINVOLVEMENT (
create table ACT_RU_TASKINVOLVEMENT (
ID_ varchar(255),
REV_ integer,
GROUP_ID_ varchar(255),
......@@ -121,7 +121,7 @@ create table ACT_TASKINVOLVEMENT (
primary key (ID_)
);
create table ACT_VARIABLE (
create table ACT_RU_VARIABLE (
ID_ varchar(300) not null,
REV_ integer,
TYPE_ varchar(255) not null,
......@@ -137,7 +137,7 @@ create table ACT_VARIABLE (
primary key (ID_)
);
create table ACT_H_PROCINST (
create table ACT_HI_PROC_INST (
ID_ varchar(300) not null,
PROC_INST_ID_ varchar(255) not null,
PROC_DEF_ID_ varchar(255) not null,
......@@ -150,7 +150,7 @@ create table ACT_H_PROCINST (
unique (PROC_INST_ID_)
);
create table ACT_H_ACTINST (
create table ACT_HI_ACT_INST (
ID_ varchar(300) not null,
ACT_ID_ varchar(255) not null,
ACT_NAME_ varchar(255),
......@@ -164,25 +164,25 @@ create table ACT_H_ACTINST (
unique (ACT_ID_, PROC_INST_ID_)
);
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
add constraint FK_BYTEARR_DEPL
foreign key (DEPLOYMENT_ID_)
references ACT_DEPLOYMENT (ID_);
references ACT_RE_DEPLOYMENT (ID_);
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_PARENT
foreign key (PARENT_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
add constraint FK_EXE_SUPER
foreign key (SUPER_EXEC_)
references ACT_EXECUTION(ID_);
references ACT_RU_EXECUTION(ID_);
alter table ACT_ID_MEMBERSHIP
add constraint FK_MEMB_GROUP
......@@ -194,42 +194,42 @@ alter table ACT_ID_MEMBERSHIP
foreign key (USER_ID_)
references ACT_ID_USER (ID_);
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
add constraint FK_TSKASS_TASK
foreign key (TASK_ID_)
references ACT_TASK (ID_);
references ACT_RU_TASK (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_EXEC
foreign key (EXECUTION_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_TASK
alter table ACT_RU_TASK
add constraint FK_TASK_PROCDEF
foreign key (PROC_DEF_ID_)
references ACT_PROCESSDEFINITION (ID_);
references ACT_RE_PROC_DEF (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_TASK
foreign key (TASK_ID_)
references ACT_TASK (ID_);
references ACT_RU_TASK (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_EXE
foreign key (EXECUTION_ID_)
references ACT_EXECUTION (ID_);
references ACT_RU_EXECUTION (ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_PROCINST
foreign key (PROC_INST_ID_)
references ACT_EXECUTION(ID_);
references ACT_RU_EXECUTION(ID_);
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
add constraint FK_VAR_BYTEARRAY
foreign key (BYTEARRAY_ID_)
references ACT_BYTEARRAY (ID_);
\ No newline at end of file
references ACT_GE_BYTEARRAY (ID_);
\ No newline at end of file
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
drop constraint FK_BYTEARR_DEPL;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_PROCINST;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_PARENT;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_SUPER;
alter table ACT_ID_MEMBERSHIP
......@@ -16,41 +16,41 @@ alter table ACT_ID_MEMBERSHIP
alter table ACT_ID_MEMBERSHIP
drop constraint FK_MEMB_USER;
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
drop constraint FK_TSKASS_TASK;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_EXEC;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_PROCINST;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_PROCDEF;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_EXE;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_TASK;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_PROCINST;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_BYTEARRAY;
drop table ACT_PROPERTY if exists;
drop table ACT_BYTEARRAY if exists;
drop table ACT_DEPLOYMENT if exists;
drop table ACT_EXECUTION if exists;
drop table ACT_GE_PROPERTY if exists;
drop table ACT_GE_BYTEARRAY if exists;
drop table ACT_RE_DEPLOYMENT if exists;
drop table ACT_RU_EXECUTION if exists;
drop table ACT_ID_GROUP if exists;
drop table ACT_ID_MEMBERSHIP if exists;
drop table ACT_ID_USER if exists;
drop table ACT_JOB if exists;
drop table ACT_PROCESSDEFINITION if exists;
drop table ACT_TASK if exists;
drop table ACT_TASKINVOLVEMENT if exists;
drop table ACT_VARIABLE if exists;
drop table ACT_H_PROCINST if exists;
drop table ACT_H_ACTINST if exists;
drop table ACT_RU_JOB if exists;
drop table ACT_RE_PROC_DEF if exists;
drop table ACT_RU_TASK if exists;
drop table ACT_RU_TASKINVOLVEMENT if exists;
drop table ACT_RU_VARIABLE if exists;
drop table ACT_HI_PROC_INST if exists;
drop table ACT_HI_ACT_INST if exists;
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
drop FOREIGN KEY FK_BYTEARR_DEPL;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop FOREIGN KEY FK_EXE_PROCINST;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop FOREIGN KEY FK_EXE_PARENT;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop FOREIGN KEY FK_EXE_SUPER;
alter table ACT_ID_MEMBERSHIP
......@@ -16,41 +16,41 @@ alter table ACT_ID_MEMBERSHIP
alter table ACT_ID_MEMBERSHIP
drop FOREIGN KEY FK_MEMB_USER;
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
drop FOREIGN KEY FK_TSKASS_TASK;
alter table ACT_TASK
alter table ACT_RU_TASK
drop FOREIGN KEY FK_TASK_EXEC;
alter table ACT_TASK
alter table ACT_RU_TASK
drop FOREIGN KEY FK_TASK_PROCINST;
alter table ACT_TASK
alter table ACT_RU_TASK
drop FOREIGN KEY FK_TASK_PROCDEF;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop FOREIGN KEY FK_VAR_EXE;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop FOREIGN KEY FK_VAR_TASK;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop FOREIGN KEY FK_VAR_PROCINST;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop FOREIGN KEY FK_VAR_BYTEARRAY;
drop table if exists ACT_PROPERTY;
drop table if exists ACT_VARIABLE;
drop table if exists ACT_BYTEARRAY;
drop table if exists ACT_DEPLOYMENT;
drop table if exists ACT_TASKINVOLVEMENT;
drop table if exists ACT_TASK;
drop table if exists ACT_PROCESSDEFINITION;
drop table if exists ACT_EXECUTION;
drop table if exists ACT_GE_PROPERTY;
drop table if exists ACT_RU_VARIABLE;
drop table if exists ACT_GE_BYTEARRAY;
drop table if exists ACT_RE_DEPLOYMENT;
drop table if exists ACT_RU_TASKINVOLVEMENT;
drop table if exists ACT_RU_TASK;
drop table if exists ACT_RE_PROC_DEF;
drop table if exists ACT_RU_EXECUTION;
drop table if exists ACT_ID_MEMBERSHIP;
drop table if exists ACT_ID_GROUP;
drop table if exists ACT_ID_USER;
drop table if exists ACT_JOB;
drop table if exists ACT_H_PROCINST;
drop table if exists ACT_H_ACTINST;
\ No newline at end of file
drop table if exists ACT_RU_JOB;
drop table if exists ACT_HI_PROC_INST;
drop table if exists ACT_HI_ACT_INST;
\ No newline at end of file
alter table ACT_BYTEARRAY
alter table ACT_GE_BYTEARRAY
drop constraint FK_BYTEARR_DEPL;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_PROCINST;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_PARENT;
alter table ACT_EXECUTION
alter table ACT_RU_EXECUTION
drop constraint FK_EXE_SUPER;
alter table ACT_ID_MEMBERSHIP
......@@ -16,41 +16,41 @@ alter table ACT_ID_MEMBERSHIP
alter table ACT_ID_MEMBERSHIP
drop constraint FK_MEMB_USER;
alter table ACT_TASKINVOLVEMENT
alter table ACT_RU_TASKINVOLVEMENT
drop constraint FK_TSKASS_TASK;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_EXEC;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_PROCINST;
alter table ACT_TASK
alter table ACT_RU_TASK
drop constraint FK_TASK_PROCDEF;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_EXE;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_TASK;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_PROCINST;
alter table ACT_VARIABLE
alter table ACT_RU_VARIABLE
drop constraint FK_VAR_BYTEARRAY;
drop table ACT_PROPERTY;
drop table ACT_BYTEARRAY;
drop table ACT_DEPLOYMENT;
drop table ACT_EXECUTION;
drop table ACT_GE_PROPERTY;
drop table ACT_GE_BYTEARRAY;
drop table ACT_RE_DEPLOYMENT;
drop table ACT_RU_EXECUTION;
drop table ACT_ID_GROUP;
drop table ACT_ID_MEMBERSHIP;
drop table ACT_ID_USER;
drop table ACT_JOB;
drop table ACT_PROCESSDEFINITION;
drop table ACT_TASK;
drop table ACT_TASKINVOLVEMENT;
drop table ACT_VARIABLE;
drop table ACT_H_PROCINST;
drop table ACT_H_ACTINST;
\ No newline at end of file
drop table ACT_RU_JOB;
drop table ACT_RE_PROC_DEF;
drop table ACT_RU_TASK;
drop table ACT_RU_TASKINVOLVEMENT;
drop table ACT_RU_VARIABLE;
drop table ACT_HI_PROC_INST;
drop table ACT_HI_ACT_INST;
\ No newline at end of file
......@@ -13,15 +13,15 @@
</resultMap>
<select id="selectDbSchemaVersion" resultType="string">
select VALUE_ from ACT_PROPERTY where NAME_ = 'schema.version'
select VALUE_ from ACT_GE_PROPERTY where NAME_ = 'schema.version'
</select>
<select id="selectProperty" parameterType="string" resultMap="propertyResultMap">
select * from ACT_PROPERTY where NAME_ = #{name}
select * from ACT_GE_PROPERTY where NAME_ = #{name}
</select>
<update id="updateProperty" parameterType="org.activiti.engine.impl.repository.PropertyEntity">
update ACT_PROPERTY
update ACT_GE_PROPERTY
<set>
REV_ = #{newRevision, jdbcType=INTEGER},
VALUE_ = #{value, jdbcType=VARCHAR},
......
......@@ -21,7 +21,7 @@
<!-- HISTORIC PROCESS INSTANCE INSERT -->
<insert id="insertHistoricProcessInstance" parameterType="org.activiti.engine.impl.history.HistoricProcessInstanceEntity">
insert into ACT_H_PROCINST (
insert into ACT_HI_PROC_INST (
ID_,
PROC_INST_ID_,
PROC_DEF_ID_,
......@@ -43,7 +43,7 @@
<!-- HISTORIC PROCESS INSTANCE UPDATE -->
<update id="updateHistoricProcessInstance" parameterType="org.activiti.engine.impl.history.HistoricProcessInstanceEntity">
update ACT_H_PROCINST set
update ACT_HI_PROC_INST set
PROC_INST_ID_ = #{processInstanceId, jdbcType=VARCHAR},
PROC_DEF_ID_ = #{processDefinitionId, jdbcType=VARCHAR},
START_TIME_ = #{startTime, jdbcType=TIMESTAMP},
......@@ -56,7 +56,7 @@
<!-- HISTORIC PROCESS INSTANCE DELETE -->
<delete id="deleteHistoricProcessInstance">
delete from ACT_H_PROCINST where PROC_INST_ID_ = #{processInstanceId}
delete from ACT_HI_PROC_INST where PROC_INST_ID_ = #{processInstanceId}
</delete>
<!-- HISTORIC PROCESS INSTANCE RESULT MAP -->
......@@ -74,7 +74,7 @@
<!-- HISTORIC PROCESS INSTANCE SELECT -->
<select id="selectHistoricProcessInstance" resultMap="historicProcessInstanceResultMap">
select * from ACT_H_PROCINST where PROC_INST_ID_ = #{processInstanceId}
select * from ACT_HI_PROC_INST where PROC_INST_ID_ = #{processInstanceId}
</select>
<select id="selectHistoricProcessInstancesByQueryCriteria" parameterType="org.activiti.engine.impl.HistoricProcessInstanceQueryImpl" resultMap="historicProcessInstanceResultMap">
......@@ -91,7 +91,7 @@
</select>
<sql id="selectHistoricProcessInstancesByQueryCriteriaSql">
from ACT_H_PROCINST HPI
from ACT_HI_PROC_INST HPI
<where>
<if test="processDefinitionId != null">
HPI.PROC_DEF_ID_ = #{processDefinitionId}
......@@ -102,7 +102,7 @@
<!-- HISTORIC ACTIVITY INSTANCE INSERT -->
<insert id="insertHistoricActivityInstance" parameterType="org.activiti.engine.impl.history.HistoricActivityInstanceEntity">
insert into ACT_H_ACTINST (
insert into ACT_HI_ACT_INST (
ID_,
ACT_ID_,
ACT_NAME_,
......@@ -128,7 +128,7 @@
<!-- HISTORIC ACTIVITY INSTANCE UPDATE -->
<update id="updateHistoricActivityInstance" parameterType="org.activiti.engine.impl.history.HistoricActivityInstanceEntity">
update ACT_H_ACTINST set
update ACT_HI_ACT_INST set
ACT_ID_ = #{activityId, jdbcType=VARCHAR},
ACT_NAME_ = #{activityName, jdbcType=VARCHAR},
ACT_TYPE_ = #{activityType, jdbcType=VARCHAR},
......@@ -143,7 +143,7 @@
<!-- HISTORIC ACTIVITY INSTANCE DELETE -->
<delete id="deleteHistoricActivityInstance">
delete from ACT_H_ACTINST where ACT_ID_ = #{activityId} and PROC_INST_ID_ = #{processInstanceId}
delete from ACT_HI_ACT_INST where ACT_ID_ = #{activityId} and PROC_INST_ID_ = #{processInstanceId}
</delete>
<!-- HISTORIC ACTIVITY INSTANCE RESULT MAP -->
......@@ -163,7 +163,7 @@
<!-- HISTORIC ACTIVITY INSTANCE SELECT -->
<select id="selectHistoricActivityInstance" resultMap="historicActivityInstanceResultMap">
select * from ACT_H_ACTINST where ACT_ID_ = #{activityId} and PROC_INST_ID_ = #{processInstanceId}
select * from ACT_HI_ACT_INST where ACT_ID_ = #{activityId} and PROC_INST_ID_ = #{processInstanceId}
</select>
</mapper>
......@@ -7,7 +7,7 @@
<!-- JOB DELETE (FOR TIMER AND MESSAGE) -->
<delete id="deleteJob" parameterType="string">
delete from ACT_JOB where ID_ = #{id}
delete from ACT_RU_JOB where ID_ = #{id}
</delete>
<!-- JOB RESULTMAP (FOR TIMER AND MESSAGE) -->
......@@ -39,16 +39,16 @@
<!-- JOB SELECT (FOR TIMER AND MESSAGE) -->
<select id="selectJobs" resultMap="jobResultMap">
select * from ACT_JOB
select * from ACT_RU_JOB
</select>
<select id="selectJob" parameterType="string" resultMap="jobResultMap">
select * from ACT_JOB where ID_ = #{id}
select * from ACT_RU_JOB where ID_ = #{id}
</select>
<select id="selectNextJobsToExecute" parameterType="string" resultMap="jobResultMap">
select *
from ACT_JOB
from ACT_RU_JOB
where (RETRIES_ &gt; 0)
and (DUEDATE_ is null or DUEDATE_ &lt; #{now, jdbcType=TIMESTAMP})
and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ &lt; #{now, jdbcType=TIMESTAMP})
......@@ -57,7 +57,7 @@
<select id="selectLockedJobs" resultMap="jobResultMap">
select *
from ACT_JOB
from ACT_RU_JOB
where (RETRIES_ &gt; 0)
and (LOCK_OWNER_ is not null)
</select>
......@@ -74,7 +74,7 @@
</select>
<sql id="selectJobByQueryCriteriaSql">
from ACT_JOB
from ACT_RU_JOB
<where>
<if test="processInstanceId != null">
PROCESS_INSTANCE_ID_ = #{processInstanceId}
......@@ -95,7 +95,7 @@
<!-- SELECT DEPENDENT -->
<select id="selectNextJobsToExecute_mysql" parameterType="string" resultMap="jobResultMap">
select *
from ACT_JOB
from ACT_RU_JOB
where (RETRIES_ &gt; 0)
and (DUEDATE_ is null or DUEDATE_ &lt;= #{now, jdbcType=TIMESTAMP})
and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ &lt;= #{now, jdbcType=TIMESTAMP})
......@@ -106,7 +106,7 @@
<!-- TIMER INSERT -->
<insert id="insertTimer" parameterType="org.activiti.engine.impl.runtime.TimerEntity">
insert into ACT_JOB (
insert into ACT_RU_JOB (
ID_,
REV_,
TYPE_,
......@@ -141,7 +141,7 @@
<!-- TIMER UPDATE -->
<update id="updateTimer" parameterType="org.activiti.engine.impl.runtime.TimerEntity">
update ACT_JOB
update ACT_RU_JOB
<set>
REV_ = #{revisionNext, jdbcType=INTEGER},
LOCK_EXP_TIME_ = #{lockExpirationTime, jdbcType=TIMESTAMP},
......@@ -158,7 +158,7 @@
<select id="selectUnlockedTimersByDuedate" parameterType="date" resultMap="jobResultMap">
select *
from ACT_JOB
from ACT_RU_JOB
where (TYPE_ = 'timer')
and (DUEDATE_ is not null)
and (DUEDATE_ &lt; #{duedate, jdbcType=TIMESTAMP})
......@@ -169,7 +169,7 @@
<select id="selectTimersByExecutionId" parameterType="string" resultMap="jobResultMap">
select *
from ACT_JOB
from ACT_RU_JOB
where (RETRIES_ &gt; 0)
and (TYPE_ = 'timer')
and (EXECUTION_ID_ = #{executionId})
......@@ -179,7 +179,7 @@
<!-- MESSAGE INSERT -->
<insert id="insertMessage" parameterType="org.activiti.engine.impl.runtime.MessageEntity">
insert into ACT_JOB (
insert into ACT_RU_JOB (
ID_,
REV_,
TYPE_,
......@@ -210,7 +210,7 @@
<!-- MESSAGE UPDATE -->
<update id="updateMessage" parameterType="org.activiti.engine.impl.runtime.MessageEntity">
update ACT_JOB
update ACT_RU_JOB
<set>
REV_ = #{revisionNext, jdbcType=INTEGER},
LOCK_EXP_TIME_ = #{lockExpirationTime, jdbcType=TIMESTAMP},
......
......@@ -7,7 +7,7 @@
<!-- DEPLOYMENT INSERT -->
<insert id="insertDeployment" parameterType="org.activiti.engine.impl.repository.DeploymentEntity">
insert into ACT_DEPLOYMENT(ID_, NAME_, DEPLOY_TIME_)
insert into ACT_RE_DEPLOYMENT(ID_, NAME_, DEPLOY_TIME_)
values(#{id, jdbcType=VARCHAR}, #{name, jdbcType=VARCHAR}, #{deploymentTime, jdbcType=TIMESTAMP})
</insert>
......@@ -16,7 +16,7 @@
<!-- DEPLOYMENT DELETE -->
<delete id="deleteDeployment" parameterType="string">
delete from ACT_DEPLOYMENT where ID_ = #{id}
delete from ACT_RE_DEPLOYMENT where ID_ = #{id}
</delete>
<!-- DEPLOYMENT RESULTMAP -->
......@@ -30,27 +30,27 @@
<!-- DEPLOYMENT SELECT -->
<select id="selectDeployments" resultMap="deploymentResultMap">
select * from ACT_DEPLOYMENT D order by D.DEPLOY_TIME_ asc
select * from ACT_RE_DEPLOYMENT D order by D.DEPLOY_TIME_ asc
</select>
<select id="selectDeploymentsByName" parameterType="string" resultMap="deploymentResultMap">
select * from ACT_DEPLOYMENT D where NAME_=#{name} order by D.DEPLOY_TIME_ asc
select * from ACT_RE_DEPLOYMENT D where NAME_=#{name} order by D.DEPLOY_TIME_ asc
</select>
<select id="selectDeploymentById" parameterType="string" resultMap="deploymentResultMap">
select * from ACT_DEPLOYMENT where ID_ = #{id}
select * from ACT_RE_DEPLOYMENT where ID_ = #{id}
</select>
<select id="selectDeploymentByProcessDefinitionId" parameterType="string" resultMap="deploymentResultMap">
select * from ACT_DEPLOYMENT D
select * from ACT_RE_DEPLOYMENT D
where D.ID_ =
(select P.DEPLOYMENT_ID_ from ACT_PROCESSDEFINITION P where P.ID_ = #{processDefinitionId})
(select P.DEPLOYMENT_ID_ from ACT_RE_PROC_DEF P where P.ID_ = #{processDefinitionId})
</select>
<!-- RESOURCE INSERT -->
<insert id="insertResource" parameterType="org.activiti.engine.impl.repository.ResourceEntity">
insert into ACT_BYTEARRAY(ID_, NAME_, BYTES_, DEPLOYMENT_ID_)
insert into ACT_GE_BYTEARRAY(ID_, NAME_, BYTES_, DEPLOYMENT_ID_)
values (#{id, jdbcType=VARCHAR}, #{name, jdbcType=VARCHAR}, #{bytes, jdbcType=BLOB}, #{deploymentId, jdbcType=VARCHAR})
</insert>
......@@ -59,7 +59,7 @@
<!-- RESOURCE DELETE -->
<delete id="deleteResourcesByDeploymentId" parameterType="string">
delete from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{id}
delete from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{id}
</delete>
<!-- RESOURCE RESULTMAP -->
......@@ -73,24 +73,24 @@
<!-- RESOURCE SELECT -->
<select id="selectResourceNamesByDeploymentId" parameterType="string" resultType="string">
select NAME_ from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
select NAME_ from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
</select>
<select id="selectResourceByDeploymentIdAndResourceName" parameterType="map" resultMap="resourceResultMap">
select * from ACT_BYTEARRAY
select * from ACT_GE_BYTEARRAY
where DEPLOYMENT_ID_ = #{deploymentId}
AND NAME_ = #{resourceName}
</select>
<select id="selectResourcesByDeploymentId" parameterType="string" resultMap="resourceResultMap">
select * from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
select * from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
</select>
<!-- PROCESSDEFINITION INSERT -->
<insert id="insertProcessDefinition" parameterType="org.activiti.engine.impl.repository.ProcessDefinitionEntity">
insert into ACT_PROCESSDEFINITION(ID_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_)
insert into ACT_RE_PROC_DEF(ID_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_)
values (#{id, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{key, jdbcType=VARCHAR},
......@@ -104,7 +104,7 @@
<!-- PROCESSDEFINITION DELETE -->
<delete id="deleteProcessDefinitionsByDeploymentId" parameterType="string">
delete from ACT_PROCESSDEFINITION where DEPLOYMENT_ID_ = #{deploymenId}
delete from ACT_RE_PROC_DEF where DEPLOYMENT_ID_ = #{deploymenId}
</delete>
<!-- PROCESSDEFINITION RESULTMAP -->
......@@ -121,7 +121,7 @@
<!-- PROCESSDEFINITION SELECT -->
<select id="selectProcessDefinitionById" parameterType="string" resultMap="processDefinitionResultMap">
select * from ACT_PROCESSDEFINITION where ID_ = #{processDefinitionId}
select * from ACT_RE_PROC_DEF where ID_ = #{processDefinitionId}
</select>
<select id="selectProcessDefinitionsByQueryCriteria" parameterType="org.activiti.engine.impl.ProcessDefinitionQueryImpl" resultMap="processDefinitionResultMap">
......@@ -138,7 +138,7 @@
</select>
<sql id="selectProcessDefinitionsByQueryCriteriaSql">
from ACT_PROCESSDEFINITION PD
from ACT_RE_PROC_DEF PD
<where>
<if test="deploymentId != null">
PD.DEPLOYMENT_ID_ = #{deploymentId}
......@@ -147,30 +147,30 @@
</sql>
<select id="selectProcessDefinitions" resultMap="processDefinitionResultMap">
select * from ACT_PROCESSDEFINITION
select * from ACT_RE_PROC_DEF
order by KEY_ ASC, VERSION_ DESC
</select>
<select id="selectProcessDefinitionByDeployment" parameterType="string" resultMap="processDefinitionResultMap">
select * from ACT_PROCESSDEFINITION where DEPLOYMENT_ID_ = #{deploymentId}
select * from ACT_RE_PROC_DEF where DEPLOYMENT_ID_ = #{deploymentId}
</select>
<select id="selectProcessDefinitionByDeploymentAndKey" parameterType="map" resultMap="processDefinitionResultMap">
select *
from ACT_PROCESSDEFINITION
from ACT_RE_PROC_DEF
where DEPLOYMENT_ID_ = #{deploymentId}
and KEY_ = #{processDefinitionKey}
</select>
<select id="selectProcessDefinitionsByDeploymentId" parameterType="string" resultMap="processDefinitionResultMap">
select * from ACT_PROCESSDEFINITION where DEPLOYMENT_ID_ = #{deploymentId}
select * from ACT_RE_PROC_DEF where DEPLOYMENT_ID_ = #{deploymentId}
</select>
<select id="selectLatestProcessDefinitionByKey" parameterType="string" resultMap="processDefinitionResultMap">
select *
from ACT_PROCESSDEFINITION
from ACT_RE_PROC_DEF
where KEY_ = #{key} and
VERSION_ = (select max(VERSION_) from ACT_PROCESSDEFINITION where KEY_ = #{processDefinitionKey})
VERSION_ = (select max(VERSION_) from ACT_RE_PROC_DEF where KEY_ = #{processDefinitionKey})
</select>
<!-- mysql specific sql -->
......
......@@ -7,7 +7,7 @@
<!-- EXECUTION INSERT -->
<insert id="insertExecution" parameterType="org.activiti.engine.impl.runtime.ExecutionEntity">
insert into ACT_EXECUTION (ID_, REV_, PROC_INST_ID_, PROC_DEF_ID_, ACTIVITY_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_, PARENT_ID_, SUPER_EXEC_)
insert into ACT_RU_EXECUTION (ID_, REV_, PROC_INST_ID_, PROC_DEF_ID_, ACTIVITY_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_, PARENT_ID_, SUPER_EXEC_)
values (
#{id ,jdbcType=VARCHAR},
1,
......@@ -25,7 +25,7 @@
<!-- EXECUTION UPDATE -->
<update id="updateExecution" parameterType="org.activiti.engine.impl.runtime.ExecutionEntity">
update ACT_EXECUTION set
update ACT_RU_EXECUTION set
PROC_DEF_ID_ = #{processDefinitionId, jdbcType=VARCHAR},
ACTIVITY_ID_ = #{activityId, jdbcType=VARCHAR},
IS_ACTIVE_ = #{isActive, jdbcType=BOOLEAN},
......@@ -39,7 +39,7 @@
<!-- EXECUTION DELETE -->
<delete id="deleteExecution" parameterType="string">
delete from ACT_EXECUTION where ID_ = #{id}
delete from ACT_RU_EXECUTION where ID_ = #{id}
</delete>
<!-- EXECUTION RESULTMAP -->
......@@ -60,11 +60,11 @@
<!-- EXECUTION SELECT -->
<select id="selectExecutionById" parameterType="string" resultMap="executionResultMap">
select * from ACT_EXECUTION where ID_ = #{id}
select * from ACT_RU_EXECUTION where ID_ = #{id}
</select>
<select id="selectExecutionsByParentExecutionId" parameterType="string" resultMap="executionResultMap">
select * from ACT_EXECUTION
select * from ACT_RU_EXECUTION
where PARENT_ID_ = #{parentExecutionId}
</select>
......@@ -82,9 +82,9 @@
</select>
<sql id="selectExecutionsByQueryCriteriaSql">
from ACT_EXECUTION E
from ACT_RU_EXECUTION E
<if test="processDefinitionKey != null or processDefinitionId != null">
inner join ACT_PROCESSDEFINITION P on E.PROC_DEF_ID_ = P.ID_
inner join ACT_RE_PROC_DEF P on E.PROC_DEF_ID_ = P.ID_
</if>
<where>
<if test="onlyProcessInstances">
......@@ -107,7 +107,7 @@
<select id="selectSubProcessInstanceBySuperExecutionId" parameterType="string" resultMap="executionResultMap">
select *
from ACT_EXECUTION
from ACT_RU_EXECUTION
where SUPER_EXEC_ = #{superExecutionId}
</select>
......
......@@ -7,7 +7,7 @@
<!-- TASK INSERT -->
<insert id="insertTask" parameterType="org.activiti.engine.impl.task.TaskEntity">
insert into ACT_TASK (ID_, REV_, NAME_, DESCRIPTION_, FORM_, PRIORITY_, CREATE_TIME_, SKIPPABLE_,
insert into ACT_RU_TASK (ID_, REV_, NAME_, DESCRIPTION_, FORM_, PRIORITY_, CREATE_TIME_, SKIPPABLE_,
START_DEADLINE_, COMPLETION_DEADLINE_, ASSIGNEE_,
EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_)
values (#{id, jdbcType=VARCHAR},
......@@ -30,7 +30,7 @@
<!-- TASK UPDATE -->
<update id="updateTask" parameterType="org.activiti.engine.impl.task.TaskEntity">
update ACT_TASK
update ACT_RU_TASK
<set>
REV_ = #{revisionNext, jdbcType=INTEGER},
NAME_ = #{name, jdbcType=VARCHAR},
......@@ -48,7 +48,7 @@
<!-- TASK DELETE -->
<delete id="deleteTask" parameterType="string">
delete from ACT_TASK where ID_ = #{id}
delete from ACT_RU_TASK where ID_ = #{id}
</delete>
<!-- TASK RESULTMAP -->
......@@ -72,11 +72,11 @@
<!-- TASK SELECT -->
<select id="selectTask" parameterType="string" resultMap="taskResultMap">
select * from ACT_TASK where ID_ = #{id}
select * from ACT_RU_TASK where ID_ = #{id}
</select>
<select id="selectCandidateTasks" parameterType="map" resultMap="taskResultMap">
select T.* from ACT_TASK T inner join ACT_TASKINVOLVEMENT I ON T.ID_ = I.TASK_ID_
select T.* from ACT_RU_TASK T inner join ACT_RU_TASKINVOLVEMENT I ON T.ID_ = I.TASK_ID_
where T.ASSIGNEE_ IS NULL
AND I.TYPE_ = 'candidate'
<choose>
......@@ -96,7 +96,7 @@
</select>
<select id="selectTasksByAssignee" parameterType="string" resultMap="taskResultMap">
select * from ACT_TASK where ASSIGNEE_ = #{assignee}
select * from ACT_RU_TASK where ASSIGNEE_ = #{assignee}
</select>
<select id="selectTaskByQueryCriteria" parameterType="map" resultMap="taskResultMap">
......@@ -113,9 +113,9 @@
</select>
<sql id="selectTaskByQueryCriteriaSql">
from ACT_TASK T
from ACT_RU_TASK T
<if test="candidateUser != null || candidateGroups != null">
inner join ACT_TASKINVOLVEMENT I on I.TASK_ID_ = T.ID_
inner join ACT_RU_TASKINVOLVEMENT I on I.TASK_ID_ = T.ID_
</if>
<where>
<if test="name != null">
......@@ -164,7 +164,7 @@
<!-- INSERT TASK INVOLVEMENT -->
<insert id="insertTaskInvolvement" parameterType="org.activiti.engine.impl.task.TaskInvolvementEntity">
insert into ACT_TASKINVOLVEMENT (ID_, REV_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_)
insert into ACT_RU_TASKINVOLVEMENT (ID_, REV_, TYPE_, USER_ID_, GROUP_ID_, TASK_ID_)
values (#{id, jdbcType=VARCHAR},
1,
#{type, jdbcType=VARCHAR},
......@@ -178,7 +178,7 @@
<!-- TASK INVOLVEMENT DELETE -->
<delete id="deleteTaskInvolvement" parameterType="string">
delete from ACT_TASKINVOLVEMENT where ID_ = #{id}
delete from ACT_RU_TASKINVOLVEMENT where ID_ = #{id}
</delete>
<!-- TASK INVOLVEMENT RESULTMAP -->
......@@ -194,11 +194,11 @@
<!-- TASK INVOLVEMENT SELECT -->
<select id="selectTaskInvolvement" parameterType="string" resultMap="taskInvolvementResultMap">
select * from ACT_TASKINVOLVEMENT where ID_ = #{id}
select * from ACT_RU_TASKINVOLVEMENT where ID_ = #{id}
</select>
<select id="selectTaskInvolvementsByTask" parameterType="string" resultMap="taskInvolvementResultMap">
select * from ACT_TASKINVOLVEMENT where TASK_ID_ = #{taskId}
select * from ACT_RU_TASKINVOLVEMENT where TASK_ID_ = #{taskId}
</select>
</mapper>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<!-- VARIABLE INSTANCE INSERT -->
<insert id="insertVariableInstance" parameterType="org.activiti.engine.impl.runtime.VariableInstanceEntity">
insert into ACT_VARIABLE (ID_, REV_, TYPE_, NAME_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_)
insert into ACT_RU_VARIABLE (ID_, REV_, TYPE_, NAME_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_)
values (
#{id, jdbcType=VARCHAR},
1,
......@@ -25,7 +25,7 @@
<!-- VARIABLE INSTANCE UPDATE -->
<update id="updateVariableInstance" parameterType="org.activiti.engine.impl.runtime.VariableInstanceEntity">
update ACT_VARIABLE
update ACT_RU_VARIABLE
set
REV_ = #{revisionNext, jdbcType=INTEGER},
BYTEARRAY_ID_ = #{byteArrayValueId, jdbcType=VARCHAR},
......@@ -39,7 +39,7 @@
<!-- VARIABLE INSTANCE DELETE -->
<delete id="deleteVariableInstance" parameterType="string">
delete from ACT_VARIABLE where ID_ = #{id, jdbcType=VARCHAR}
delete from ACT_RU_VARIABLE where ID_ = #{id, jdbcType=VARCHAR}
</delete>
<!-- VARIABLE INSTANCE RESULTMAP -->
......@@ -62,18 +62,18 @@
<!-- VARIABLE INSTANCE SELECT -->
<select id="selectVariableInstance" parameterType="string" resultMap="variableInstanceResultMap">
select * from ACT_VARIABLE where ID_ =
select * from ACT_RU_VARIABLE where ID_ =
#{id, jdbcType=VARCHAR}
</select>
<select id="selectVariablesByExecutionId" parameterType="string" resultMap="variableInstanceResultMap">
select * from ACT_VARIABLE where
select * from ACT_RU_VARIABLE where
EXECUTION_ID_ = #{executionId,
jdbcType=VARCHAR}
</select>
<select id="selectVariablesByTaskId" parameterType="string" resultMap="variableInstanceResultMap">
select * from ACT_VARIABLE where TASK_ID_
select * from ACT_RU_VARIABLE where TASK_ID_
= #{executionId, jdbcType=VARCHAR}
</select>
......@@ -81,7 +81,7 @@
<!-- BYTE ARRAY INSERT -->
<insert id="insertByteArray" parameterType="org.activiti.engine.impl.runtime.ByteArrayEntity">
insert into ACT_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_)
insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_)
values (
#{id, jdbcType=VARCHAR},
1,
......@@ -94,7 +94,7 @@
<!-- BYTE ARRAY UPDATE -->
<update id="updateByteArray" parameterType="org.activiti.engine.impl.runtime.ByteArrayEntity">
update ACT_BYTEARRAY
update ACT_GE_BYTEARRAY
set
REV_ = #{revisionNext, jdbcType=INTEGER},
BYTES_ = #{bytes, jdbcType=BLOB}
......@@ -105,15 +105,15 @@
<!-- BYTE ARRAY DELETE -->
<select id="selectBytesOfByteArray" parameterType="string" resultType="hashmap">
select BYTES_ from ACT_BYTEARRAY where ID_ = #{id}
select BYTES_ from ACT_GE_BYTEARRAY where ID_ = #{id}
</select>
<delete id="deleteByteArraysForDeployment" parameterType="string">
delete from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{id}
delete from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{id}
</delete>
<delete id="deleteByteArray" parameterType="string">
delete from ACT_BYTEARRAY where ID_ = #{id}
delete from ACT_GE_BYTEARRAY where ID_ = #{id}
</delete>
<!-- BYTE ARRAY RESULTMAP -->
......@@ -128,19 +128,19 @@
<!-- BYTE ARRAY SELECT -->
<select id="selectByteArrayById" parameterType="string" resultMap="byteArrayResultMap">
select * from ACT_BYTEARRAY where ID_ = #{id}
select * from ACT_GE_BYTEARRAY where ID_ = #{id}
</select>
<select id="selectByteArraysForDeployment" parameterType="string" resultMap="byteArrayResultMap">
select * from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
select * from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
</select>
<select id="selectResourceNamesForDeployment" parameterType="string" resultType="string">
select NAME_ from ACT_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
select NAME_ from ACT_GE_BYTEARRAY where DEPLOYMENT_ID_ = #{deploymentId} order by NAME_ asc
</select>
<select id="selectDeploymentResource" parameterType="map" resultMap="byteArrayResultMap">
select * from ACT_BYTEARRAY
select * from ACT_GE_BYTEARRAY
where DEPLOYMENT_ID_ = #{deploymentId}
AND NAME_ = #{resourceName}
</select>
......
......@@ -9,8 +9,8 @@
</#list>
],
"total": ${tablePage.total?c},
"start": ${tablePage.start?c},
"start": ${tablePage.firstResult?c},
"size": ${size?c},
"sort": "${tablePage.sort}",
"sort": "${tablePage.sort!"ID_"}",
"order": "<#if tablePage.order == "DESCENDING">desc<#else>asc</#if>"
}
......@@ -650,7 +650,7 @@
{
"data": [
{
"tableName": "ACT_PROPERTY",
"tableName": "ACT_GE_PROPERTY",
"noOfResults": 2
}
]
......@@ -681,7 +681,7 @@
<para><emphasis role="bold">Response:</emphasis>
<programlisting>
{
"tableName": "ACT_PROPERTY",
"tableName": "ACT_GE_PROPERTY",
"columnNames": ["REV_","NAME_","VALUE_"],
"columnNames": ["class java.lang.Integer","class java.lang.String","class java.lang.String"]
}</programlisting>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册