一、新建一个maven工程
生成空模板pom文件
添加如下依赖
<properties> <slf4j.version>1.6.6</slf4j.version> <log4j.version>1.2.12</log4j.version> <activiti.version>7.0.0.Beta1</activiti.version> </properties> <dependencies> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-engine</artifactId> <version>${activiti.version}</version> </dependency> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 模型处理 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-model</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 转换 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-converter</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn json数据转换 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-json-converter</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 布局 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-layout</artifactId> <version>${activiti.version}</version> <exclusions> <exclusion> <groupId>com.github.jgraph</groupId> <artifactId>jgraphx</artifactId> </exclusion> </exclusions> </dependency> <!-- activiti 云支持 --> <dependency> <groupId>org.activiti.cloud</groupId> <artifactId>activiti-cloud-services-api</artifactId> <version>${activiti.version}</version> </dependency> <!-- mysql驱动 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> <!-- mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.5</version> </dependency> <!-- 链接池 --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <!-- log start --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.12</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build>
完整pom
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.minos</groupId> <artifactId>activiti</artifactId> <version>1.0-SNAPSHOT</version> <properties> <slf4j.version>1.6.6</slf4j.version> <log4j.version>1.2.12</log4j.version> <activiti.version>7.0.0.Beta1</activiti.version> </properties> <dependencies> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-engine</artifactId> <version>${activiti.version}</version> </dependency> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 模型处理 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-model</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 转换 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-converter</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn json数据转换 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-json-converter</artifactId> <version>${activiti.version}</version> </dependency> <!-- bpmn 布局 --> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-bpmn-layout</artifactId> <version>${activiti.version}</version> <exclusions> <exclusion> <groupId>com.github.jgraph</groupId> <artifactId>jgraphx</artifactId> </exclusion> </exclusions> </dependency> <!-- activiti 云支持 --> <dependency> <groupId>org.activiti.cloud</groupId> <artifactId>activiti-cloud-services-api</artifactId> <version>${activiti.version}</version> </dependency> <!-- mysql驱动 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> <!-- mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.5</version> </dependency> <!-- 链接池 --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <!-- log start --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.12</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build> </project>
二、配置日志
resources文件夹下新建log4j.properties配置文件
# Set root category priority to INFO and its only appender to CONSOLE. #log4j.rootCategory=INFO, CONSOLE debug info warn error fatal log4j.rootCategory=debug, CONSOLE, LOGFILE # Set the enterprise logger category to FATAL and its only appender to CONSOLE. log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r[%15.15t] %-5p %30.30c %x - %m\n # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=d:\log\act\activiti.log log4j.appender.LOGFILE.Append=true log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r[%15.15t] %-5p %30.30c %x - %m\n
三、配置数据源
resources文件夹下新建lactiviti.cfg.xml配置文件,配置自己的数据库;
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration" id="processEngineConfiguration"> <property name="jdbcDriver" value="com.mysql.cj.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql:///activiti4?characterEncoding=utf-8&nullCatalogMeansCurrent=true&serverTimezone=UTC" /> <property name="jdbcUsername" value="root" /> <property name="jdbcPassword" value="12345678" /> <property name="databaseSchemaUpdate" value="true" /> </bean> </beans>
四、启动默认引擎
二选一
@Test public void test01(){ //默认获取resourcdes下的activi ti.cfg.xml配置文件 ProcessEngine defaultProcessEngine = ProcessEngines.getDefaultProcessEngine(); System.out.println(defaultProcessEngine); }
/*自定义配置文件启动工作流引擎*/ @Test public void test02(){ // 首先创建ProcessEngineConfiguration对象 ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml"); // 通过ProcessEngineConfiguration对象来创建 ProcessEngine对象 ProcessEngine processEngine = configuration.buildProcessEngine(); }
日志如下:
1./* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50736 Source Host : localhost:3306 Source Schema : activiti4 Target Server Type : MySQL Target Server Version : 50736 File Encoding : 65001 Date: 02/04/2022 14:19:59 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for act_evt_log -- ---------------------------- DROP TABLE IF EXISTS `act_evt_log`; CREATE TABLE `act_evt_log` ( `LOG_NR_` bigint(20) NOT NULL AUTO_INCREMENT, `TYPE_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DATA_` longblob NULL, `LOCK_OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL, `IS_PROCESSED_` tinyint(4) NULL DEFAULT 0, PRIMARY KEY (`LOG_NR_`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_evt_log -- ---------------------------- -- ---------------------------- -- Table structure for act_ge_bytearray -- ---------------------------- DROP TABLE IF EXISTS `act_ge_bytearray`; CREATE TABLE `act_ge_bytearray` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `BYTES_` longblob NULL, `GENERATED_` tinyint(4) NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_BYTEARR_DEPL`(`DEPLOYMENT_ID_`) USING BTREE, CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ge_bytearray -- ---------------------------- -- ---------------------------- -- Table structure for act_ge_property -- ---------------------------- DROP TABLE IF EXISTS `act_ge_property`; CREATE TABLE `act_ge_property` ( `NAME_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `VALUE_` varchar(300) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `REV_` int(11) NULL DEFAULT NULL, PRIMARY KEY (`NAME_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ge_property -- ---------------------------- INSERT INTO `act_ge_property` VALUES ('cfg.execution-related-entities-count', 'false', 1); INSERT INTO `act_ge_property` VALUES ('next.dbid', '1', 1); INSERT INTO `act_ge_property` VALUES ('schema.history', 'create(7.0.0.0)', 1); INSERT INTO `act_ge_property` VALUES ('schema.version', '7.0.0.0', 1); -- ---------------------------- -- Table structure for act_hi_actinst -- ---------------------------- DROP TABLE IF EXISTS `act_hi_actinst`; CREATE TABLE `act_hi_actinst` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CALL_PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACT_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACT_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `START_TIME_` datetime(3) NOT NULL, `END_TIME_` datetime(3) NULL DEFAULT NULL, `DURATION_` bigint(20) NULL DEFAULT NULL, `DELETE_REASON_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_HI_ACT_INST_START`(`START_TIME_`) USING BTREE, INDEX `ACT_IDX_HI_ACT_INST_END`(`END_TIME_`) USING BTREE, INDEX `ACT_IDX_HI_ACT_INST_PROCINST`(`PROC_INST_ID_`, `ACT_ID_`) USING BTREE, INDEX `ACT_IDX_HI_ACT_INST_EXEC`(`EXECUTION_ID_`, `ACT_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_actinst -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_attachment -- ---------------------------- DROP TABLE IF EXISTS `act_hi_attachment`; CREATE TABLE `act_hi_attachment` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `URL_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CONTENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TIME_` datetime(3) NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_attachment -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_comment -- ---------------------------- DROP TABLE IF EXISTS `act_hi_comment`; CREATE TABLE `act_hi_comment` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TIME_` datetime(3) NOT NULL, `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACTION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `MESSAGE_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `FULL_MSG_` longblob NULL, PRIMARY KEY (`ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_comment -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_detail -- ---------------------------- DROP TABLE IF EXISTS `act_hi_detail`; CREATE TABLE `act_hi_detail` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACT_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `VAR_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `REV_` int(11) NULL DEFAULT NULL, `TIME_` datetime(3) NOT NULL, `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DOUBLE_` double NULL DEFAULT NULL, `LONG_` bigint(20) NULL DEFAULT NULL, `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_HI_DETAIL_PROC_INST`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_IDX_HI_DETAIL_ACT_INST`(`ACT_INST_ID_`) USING BTREE, INDEX `ACT_IDX_HI_DETAIL_TIME`(`TIME_`) USING BTREE, INDEX `ACT_IDX_HI_DETAIL_NAME`(`NAME_`) USING BTREE, INDEX `ACT_IDX_HI_DETAIL_TASK_ID`(`TASK_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_detail -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_identitylink -- ---------------------------- DROP TABLE IF EXISTS `act_hi_identitylink`; CREATE TABLE `act_hi_identitylink` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `GROUP_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_HI_IDENT_LNK_USER`(`USER_ID_`) USING BTREE, INDEX `ACT_IDX_HI_IDENT_LNK_TASK`(`TASK_ID_`) USING BTREE, INDEX `ACT_IDX_HI_IDENT_LNK_PROCINST`(`PROC_INST_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_identitylink -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_procinst -- ---------------------------- DROP TABLE IF EXISTS `act_hi_procinst`; CREATE TABLE `act_hi_procinst` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `START_TIME_` datetime(3) NOT NULL, `END_TIME_` datetime(3) NULL DEFAULT NULL, `DURATION_` bigint(20) NULL DEFAULT NULL, `START_USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `START_ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `END_ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `SUPER_PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DELETE_REASON_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, UNIQUE INDEX `PROC_INST_ID_`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_IDX_HI_PRO_INST_END`(`END_TIME_`) USING BTREE, INDEX `ACT_IDX_HI_PRO_I_BUSKEY`(`BUSINESS_KEY_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_procinst -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_taskinst -- ---------------------------- DROP TABLE IF EXISTS `act_hi_taskinst`; CREATE TABLE `act_hi_taskinst` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `START_TIME_` datetime(3) NOT NULL, `CLAIM_TIME_` datetime(3) NULL DEFAULT NULL, `END_TIME_` datetime(3) NULL DEFAULT NULL, `DURATION_` bigint(20) NULL DEFAULT NULL, `DELETE_REASON_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PRIORITY_` int(11) NULL DEFAULT NULL, `DUE_DATE_` datetime(3) NULL DEFAULT NULL, `FORM_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_HI_TASK_INST_PROCINST`(`PROC_INST_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_taskinst -- ---------------------------- -- ---------------------------- -- Table structure for act_hi_varinst -- ---------------------------- DROP TABLE IF EXISTS `act_hi_varinst`; CREATE TABLE `act_hi_varinst` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `VAR_TYPE_` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `REV_` int(11) NULL DEFAULT NULL, `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DOUBLE_` double NULL DEFAULT NULL, `LONG_` bigint(20) NULL DEFAULT NULL, `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CREATE_TIME_` datetime(3) NULL DEFAULT NULL, `LAST_UPDATED_TIME_` datetime(3) NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_HI_PROCVAR_PROC_INST`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_IDX_HI_PROCVAR_NAME_TYPE`(`NAME_`, `VAR_TYPE_`) USING BTREE, INDEX `ACT_IDX_HI_PROCVAR_TASK_ID`(`TASK_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_hi_varinst -- ---------------------------- -- ---------------------------- -- Table structure for act_procdef_info -- ---------------------------- DROP TABLE IF EXISTS `act_procdef_info`; CREATE TABLE `act_procdef_info` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `INFO_JSON_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, UNIQUE INDEX `ACT_UNIQ_INFO_PROCDEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_IDX_INFO_PROCDEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_INFO_JSON_BA`(`INFO_JSON_ID_`) USING BTREE, CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_procdef_info -- ---------------------------- -- ---------------------------- -- Table structure for act_re_deployment -- ---------------------------- DROP TABLE IF EXISTS `act_re_deployment`; CREATE TABLE `act_re_deployment` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL, `ENGINE_VERSION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_re_deployment -- ---------------------------- -- ---------------------------- -- Table structure for act_re_model -- ---------------------------- DROP TABLE IF EXISTS `act_re_model`; CREATE TABLE `act_re_model` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL, `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL, `VERSION_` int(11) NULL DEFAULT NULL, `META_INFO_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EDITOR_SOURCE_VALUE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_MODEL_SOURCE`(`EDITOR_SOURCE_VALUE_ID_`) USING BTREE, INDEX `ACT_FK_MODEL_SOURCE_EXTRA`(`EDITOR_SOURCE_EXTRA_VALUE_ID_`) USING BTREE, INDEX `ACT_FK_MODEL_DEPLOYMENT`(`DEPLOYMENT_ID_`) USING BTREE, CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_re_model -- ---------------------------- -- ---------------------------- -- Table structure for act_re_procdef -- ---------------------------- DROP TABLE IF EXISTS `act_re_procdef`; CREATE TABLE `act_re_procdef` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `VERSION_` int(11) NOT NULL, `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DGRM_RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HAS_START_FORM_KEY_` tinyint(4) NULL DEFAULT NULL, `HAS_GRAPHICAL_NOTATION_` tinyint(4) NULL DEFAULT NULL, `SUSPENSION_STATE_` int(11) NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', `ENGINE_VERSION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, UNIQUE INDEX `ACT_UNIQ_PROCDEF`(`KEY_`, `VERSION_`, `TENANT_ID_`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_re_procdef -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_deadletter_job -- ---------------------------- DROP TABLE IF EXISTS `act_ru_deadletter_job`; CREATE TABLE `act_ru_deadletter_job` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EXCLUSIVE_` tinyint(1) NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DUEDATE_` timestamp(3) NULL DEFAULT NULL, `REPEAT_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_DEADLETTER_JOB_EXECUTION`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE`(`PROCESS_INSTANCE_ID_`) USING BTREE, INDEX `ACT_FK_DEADLETTER_JOB_PROC_DEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_DEADLETTER_JOB_EXCEPTION`(`EXCEPTION_STACK_ID_`) USING BTREE, CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_deadletter_job -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_event_subscr -- ---------------------------- DROP TABLE IF EXISTS `act_ru_event_subscr`; CREATE TABLE `act_ru_event_subscr` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `EVENT_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EVENT_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACTIVITY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CONFIGURATION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_EVENT_SUBSCR_CONFIG_`(`CONFIGURATION_`) USING BTREE, INDEX `ACT_FK_EVENT_EXEC`(`EXECUTION_ID_`) USING BTREE, CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_event_subscr -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_execution -- ---------------------------- DROP TABLE IF EXISTS `act_ru_execution`; CREATE TABLE `act_ru_execution` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PARENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `SUPER_EXEC_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ROOT_PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `IS_ACTIVE_` tinyint(4) NULL DEFAULT NULL, `IS_CONCURRENT_` tinyint(4) NULL DEFAULT NULL, `IS_SCOPE_` tinyint(4) NULL DEFAULT NULL, `IS_EVENT_SCOPE_` tinyint(4) NULL DEFAULT NULL, `IS_MI_ROOT_` tinyint(4) NULL DEFAULT NULL, `SUSPENSION_STATE_` int(11) NULL DEFAULT NULL, `CACHED_ENT_STATE_` int(11) NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `START_TIME_` datetime(3) NULL DEFAULT NULL, `START_USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL, `IS_COUNT_ENABLED_` tinyint(4) NULL DEFAULT NULL, `EVT_SUBSCR_COUNT_` int(11) NULL DEFAULT NULL, `TASK_COUNT_` int(11) NULL DEFAULT NULL, `JOB_COUNT_` int(11) NULL DEFAULT NULL, `TIMER_JOB_COUNT_` int(11) NULL DEFAULT NULL, `SUSP_JOB_COUNT_` int(11) NULL DEFAULT NULL, `DEADLETTER_JOB_COUNT_` int(11) NULL DEFAULT NULL, `VAR_COUNT_` int(11) NULL DEFAULT NULL, `ID_LINK_COUNT_` int(11) NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_EXEC_BUSKEY`(`BUSINESS_KEY_`) USING BTREE, INDEX `ACT_IDC_EXEC_ROOT`(`ROOT_PROC_INST_ID_`) USING BTREE, INDEX `ACT_FK_EXE_PROCINST`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_FK_EXE_PARENT`(`PARENT_ID_`) USING BTREE, INDEX `ACT_FK_EXE_SUPER`(`SUPER_EXEC_`) USING BTREE, INDEX `ACT_FK_EXE_PROCDEF`(`PROC_DEF_ID_`) USING BTREE, CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_execution -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_identitylink -- ---------------------------- DROP TABLE IF EXISTS `act_ru_identitylink`; CREATE TABLE `act_ru_identitylink` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `GROUP_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_IDENT_LNK_USER`(`USER_ID_`) USING BTREE, INDEX `ACT_IDX_IDENT_LNK_GROUP`(`GROUP_ID_`) USING BTREE, INDEX `ACT_IDX_ATHRZ_PROCEDEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_TSKASS_TASK`(`TASK_ID_`) USING BTREE, INDEX `ACT_FK_IDL_PROCINST`(`PROC_INST_ID_`) USING BTREE, CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `act_ru_task` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_identitylink -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_integration -- ---------------------------- DROP TABLE IF EXISTS `act_ru_integration`; CREATE TABLE `act_ru_integration` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `FLOW_NODE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CREATED_DATE_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_INT_EXECUTION`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_INT_PROC_INST`(`PROCESS_INSTANCE_ID_`) USING BTREE, INDEX `ACT_FK_INT_PROC_DEF`(`PROC_DEF_ID_`) USING BTREE, CONSTRAINT `ACT_FK_INT_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_INT_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_INT_PROC_INST` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_integration -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_job -- ---------------------------- DROP TABLE IF EXISTS `act_ru_job`; CREATE TABLE `act_ru_job` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL, `LOCK_OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCLUSIVE_` tinyint(1) NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `RETRIES_` int(11) NULL DEFAULT NULL, `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DUEDATE_` timestamp(3) NULL DEFAULT NULL, `REPEAT_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_JOB_EXECUTION`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_JOB_PROCESS_INSTANCE`(`PROCESS_INSTANCE_ID_`) USING BTREE, INDEX `ACT_FK_JOB_PROC_DEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_JOB_EXCEPTION`(`EXCEPTION_STACK_ID_`) USING BTREE, CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_job -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_suspended_job -- ---------------------------- DROP TABLE IF EXISTS `act_ru_suspended_job`; CREATE TABLE `act_ru_suspended_job` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EXCLUSIVE_` tinyint(1) NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `RETRIES_` int(11) NULL DEFAULT NULL, `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DUEDATE_` timestamp(3) NULL DEFAULT NULL, `REPEAT_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_SUSPENDED_JOB_EXECUTION`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE`(`PROCESS_INSTANCE_ID_`) USING BTREE, INDEX `ACT_FK_SUSPENDED_JOB_PROC_DEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_SUSPENDED_JOB_EXCEPTION`(`EXCEPTION_STACK_ID_`) USING BTREE, CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_suspended_job -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_task -- ---------------------------- DROP TABLE IF EXISTS `act_ru_task`; CREATE TABLE `act_ru_task` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DELEGATION_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PRIORITY_` int(11) NULL DEFAULT NULL, `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL, `DUE_DATE_` datetime(3) NULL DEFAULT NULL, `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `SUSPENSION_STATE_` int(11) NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', `FORM_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `CLAIM_TIME_` datetime(3) NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_TASK_CREATE`(`CREATE_TIME_`) USING BTREE, INDEX `ACT_FK_TASK_EXE`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_TASK_PROCINST`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_FK_TASK_PROCDEF`(`PROC_DEF_ID_`) USING BTREE, CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_task -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_timer_job -- ---------------------------- DROP TABLE IF EXISTS `act_ru_timer_job`; CREATE TABLE `act_ru_timer_job` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL, `LOCK_OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCLUSIVE_` tinyint(1) NULL DEFAULT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `RETRIES_` int(11) NULL DEFAULT NULL, `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DUEDATE_` timestamp(3) NULL DEFAULT NULL, `REPEAT_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '', PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_FK_TIMER_JOB_EXECUTION`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_TIMER_JOB_PROCESS_INSTANCE`(`PROCESS_INSTANCE_ID_`) USING BTREE, INDEX `ACT_FK_TIMER_JOB_PROC_DEF`(`PROC_DEF_ID_`) USING BTREE, INDEX `ACT_FK_TIMER_JOB_EXCEPTION`(`EXCEPTION_STACK_ID_`) USING BTREE, CONSTRAINT `ACT_FK_TIMER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TIMER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_TIMER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_timer_job -- ---------------------------- -- ---------------------------- -- Table structure for act_ru_variable -- ---------------------------- DROP TABLE IF EXISTS `act_ru_variable`; CREATE TABLE `act_ru_variable` ( `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `REV_` int(11) NULL DEFAULT NULL, `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `DOUBLE_` double NULL DEFAULT NULL, `LONG_` bigint(20) NULL DEFAULT NULL, `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL, PRIMARY KEY (`ID_`) USING BTREE, INDEX `ACT_IDX_VARIABLE_TASK_ID`(`TASK_ID_`) USING BTREE, INDEX `ACT_FK_VAR_EXE`(`EXECUTION_ID_`) USING BTREE, INDEX `ACT_FK_VAR_PROCINST`(`PROC_INST_ID_`) USING BTREE, INDEX `ACT_FK_VAR_BYTEARRAY`(`BYTEARRAY_ID_`) USING BTREE, CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of act_ru_variable -- ---------------------------- SET FOREIGN_KEY_CHECKS = 1;
检查数据,生成数据表如下
五、生成数据表简单说明
数据表名linux下为大写,windows下为小写
ACT_RE :'RE'表示 repository。 这个前缀的表包含了流程定义和流程静态资源 。
ACT_RU:'RU'表示 runtime。 这些运行时的表,包含流程实例,任务,变量,异步任务,等运行中的数据。 Activiti 只在流程实例执行过程中保存这些数据, 在流程结束时就会删除这些记录。 这样运行时表可以一直很小速度很快。
ACT_HI:'HI'表示 history。 这些表包含历史数据,比如历史流程实例, 变量,任务等等。
ACT_GE : GE 表示 general。 通用数据, 用于不同场景下
代码地址
https://git.code.tencent.com/mins-java/ActivitiWorkspace/spirng.git