5.创建一个基于maven的flowable项目

 2017-07-31 06:01:44  跟我学flowable  roy
 (2646)  (0)

1.鼠标单击右键依次点击new-->maven project


2.选中跳过骨架


3.输入maven坐标


4.添加flowable的核心引擎坐标,数据库坐标,测试,日志坐标

这里使用的mysql数据库,当然也可以用其他数据库替代(h2,oracle)

在src/main/resources下创建一个log4j.properties 因为flowable的日志依赖log4j

log4j.rootLogger=DEBUG, CA

log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern= %d{hh:mm:ss,SSS} [%t] %-5p %c %x - %m%n
<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.caitaojun</groupId>
	<artifactId>holidayrequest</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<description>测试一个请假的流程</description>
	<dependencies>
		<dependency>
			<groupId>org.flowable</groupId>
			<artifactId>flowable-engine</artifactId>
			<version>5.23.0</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.38</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.24</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>            

5.选中项目鼠标点击右键更新maven项目

 


6.创建一个带有main入口方法的java类


7.创建一个ProccessEngine的对象,一般这流程引擎对象在应用(项目)中只实例化一次即可.这个对象是通过ProccessEngineConfiguration来配置构建的,一般这个配置对象来配置流程引擎的设置,比如数据库连接,通常这个一般是用xml来配置,当然也可以通过java代码硬编码的形式.

ProcessEngineConfiguration是一个抽象类,其实现类有StandaloneProcessEngineConfiguration,springprocessengineconfiguration

其中setDatabaseSchemaUpdate就和hibernate的表生成策略类似

package com.caitaojun;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration;

public class HolidayRequest {

	public static void main(String[] args) {
		ProcessEngineConfiguration cfg = new StandaloneProcessEngineConfiguration()
				.setJdbcUrl("jdbc:mysql:///flowable01?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8")
				.setJdbcUsername("root")
				.setJdbcPassword("123").setJdbcDriver("com.mysql.jdbc.Driver")
				.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
		ProcessEngine processEngine = cfg.buildProcessEngine();
	}

}

运行这个main方法,查看控制台输出,会向我们配置的数据库中创建25张表


控制台输出日志

06:34:12,334 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  - initializing datasource to db: jdbc:mysql:///flowable01?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8
06:34:12,369 [main] DEBUG org.apache.ibatis.logging.LogFactory  - Logging initialized using 'class org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl' adapter.
06:34:12,387 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - PooledDataSource forcefully closed/removed all connections.
06:34:12,900 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - Created connection 352261908.
06:34:12,900 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  - database product name: 'MySQL'
06:34:12,900 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  - using database type: mysql
06:34:12,901 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - Returned connection 352261908 to pool.
06:34:15,326 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor  - 

06:34:15,326 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor  - --- starting SchemaOperationsProcessEngineBuild --------------------------------------------------------
06:34:15,336 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction  - Opening JDBC Connection
06:34:15,336 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - Checked out connection 352261908 from pool.
06:34:15,336 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction  - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@14ff1714]
06:34:15,341 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - performing create on engine with resource org/activiti/db/create/activiti.mysql.create.engine.sql
06:34:15,342 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - Found MySQL: majorVersion=5 minorVersion=6
06:34:15,342 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_GE_PROPERTY ( 
NAME_ varchar(64), 
VALUE_ varchar(300), 
REV_ integer, 
primary key (NAME_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:15,949 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: insert into ACT_GE_PROPERTY 
values ('schema.version', '5.23.0.0', 1)
06:34:15,952 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: insert into ACT_GE_PROPERTY 
values ('schema.history', 'create(5.23.0.0)', 1)
06:34:15,954 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: insert into ACT_GE_PROPERTY 
values ('next.dbid', '1', 1)
06:34:15,956 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_GE_BYTEARRAY ( 
ID_ varchar(64), 
REV_ integer, 
NAME_ varchar(255), 
DEPLOYMENT_ID_ varchar(64), 
BYTES_ LONGBLOB, 
GENERATED_ TINYINT, 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:16,496 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RE_DEPLOYMENT ( 
ID_ varchar(64), 
NAME_ varchar(255), 
CATEGORY_ varchar(255), 
TENANT_ID_ varchar(255) default '', 
DEPLOY_TIME_ timestamp(3) NULL, 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:16,831 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RE_MODEL ( 
ID_ varchar(64) not null, 
REV_ integer, 
NAME_ varchar(255), 
KEY_ varchar(255), 
CATEGORY_ varchar(255), 
CREATE_TIME_ timestamp(3) null, 
LAST_UPDATE_TIME_ timestamp(3) null, 
VERSION_ integer, 
META_INFO_ varchar(4000), 
DEPLOYMENT_ID_ varchar(64), 
EDITOR_SOURCE_VALUE_ID_ varchar(64), 
EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64), 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:17,197 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_EXECUTION ( 
ID_ varchar(64), 
REV_ integer, 
PROC_INST_ID_ varchar(64), 
BUSINESS_KEY_ varchar(255), 
PARENT_ID_ varchar(64), 
PROC_DEF_ID_ varchar(64), 
SUPER_EXEC_ varchar(64), 
ACT_ID_ varchar(255), 
IS_ACTIVE_ TINYINT, 
IS_CONCURRENT_ TINYINT, 
IS_SCOPE_ TINYINT, 
IS_EVENT_SCOPE_ TINYINT, 
SUSPENSION_STATE_ integer, 
CACHED_ENT_STATE_ integer, 
TENANT_ID_ varchar(255) default '', 
NAME_ varchar(255), 
LOCK_TIME_ timestamp(3) NULL, 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:17,538 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_JOB ( 
ID_ varchar(64) NOT NULL, 
REV_ integer, 
TYPE_ varchar(255) NOT NULL, 
LOCK_EXP_TIME_ timestamp(3) NULL, 
LOCK_OWNER_ varchar(255), 
EXCLUSIVE_ boolean, 
EXECUTION_ID_ varchar(64), 
PROCESS_INSTANCE_ID_ varchar(64), 
PROC_DEF_ID_ varchar(64), 
RETRIES_ integer, 
EXCEPTION_STACK_ID_ varchar(64), 
EXCEPTION_MSG_ varchar(4000), 
DUEDATE_ timestamp(3) NULL, 
REPEAT_ varchar(255), 
HANDLER_TYPE_ varchar(255), 
HANDLER_CFG_ varchar(4000), 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:18,244 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RE_PROCDEF ( 
ID_ varchar(64) not null, 
REV_ integer, 
CATEGORY_ varchar(255), 
NAME_ varchar(255), 
KEY_ varchar(255) not null, 
VERSION_ integer not null, 
DEPLOYMENT_ID_ varchar(64), 
RESOURCE_NAME_ varchar(4000), 
DGRM_RESOURCE_NAME_ varchar(4000), 
DESCRIPTION_ varchar(4000), 
HAS_START_FORM_KEY_ TINYINT, 
HAS_GRAPHICAL_NOTATION_ TINYINT, 
SUSPENSION_STATE_ integer, 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:18,701 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_TASK ( 
ID_ varchar(64), 
REV_ integer, 
EXECUTION_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
PROC_DEF_ID_ varchar(64), 
NAME_ varchar(255), 
PARENT_TASK_ID_ varchar(64), 
DESCRIPTION_ varchar(4000), 
TASK_DEF_KEY_ varchar(255), 
OWNER_ varchar(255), 
ASSIGNEE_ varchar(255), 
DELEGATION_ varchar(64), 
PRIORITY_ integer, 
CREATE_TIME_ timestamp(3) NULL, 
DUE_DATE_ datetime(3), 
CATEGORY_ varchar(255), 
SUSPENSION_STATE_ integer, 
TENANT_ID_ varchar(255) default '', 
FORM_KEY_ varchar(255), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:19,208 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_IDENTITYLINK ( 
ID_ varchar(64), 
REV_ integer, 
GROUP_ID_ varchar(255), 
TYPE_ varchar(255), 
USER_ID_ varchar(255), 
TASK_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
PROC_DEF_ID_ varchar(64), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:19,699 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_VARIABLE ( 
ID_ varchar(64) not null, 
REV_ integer, 
TYPE_ varchar(255) not null, 
NAME_ varchar(255) not null, 
EXECUTION_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
TASK_ID_ varchar(64), 
BYTEARRAY_ID_ varchar(64), 
DOUBLE_ double, 
LONG_ bigint, 
TEXT_ varchar(4000), 
TEXT2_ varchar(4000), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:20,192 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_RU_EVENT_SUBSCR ( 
ID_ varchar(64) not null, 
REV_ integer, 
EVENT_TYPE_ varchar(255) not null, 
EVENT_NAME_ varchar(255), 
EXECUTION_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
ACTIVITY_ID_ varchar(64), 
CONFIGURATION_ varchar(255), 
CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3), 
PROC_DEF_ID_ varchar(64), 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:20,595 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_EVT_LOG ( 
LOG_NR_ bigint auto_increment, 
TYPE_ varchar(64), 
PROC_DEF_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
EXECUTION_ID_ varchar(64), 
TASK_ID_ varchar(64), 
TIME_STAMP_ timestamp(3) not null, 
USER_ID_ varchar(255), 
DATA_ LONGBLOB, 
LOCK_OWNER_ varchar(255), 
LOCK_TIME_ timestamp(3) null, 
IS_PROCESSED_ tinyint default 0, 
primary key (LOG_NR_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:20,920 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_PROCDEF_INFO ( 
ID_ varchar(64) not null, 
PROC_DEF_ID_ varchar(64) not null, 
REV_ integer, 
INFO_JSON_ID_ varchar(64), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:21,418 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_)
06:34:22,134 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_)
06:34:22,841 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_)
06:34:23,317 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_)
06:34:24,108 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_)
06:34:24,659 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_)
06:34:25,248 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_)
06:34:26,063 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_)
06:34:26,599 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_GE_BYTEARRAY 
add constraint ACT_FK_BYTEARR_DEPL 
foreign key (DEPLOYMENT_ID_) 
references ACT_RE_DEPLOYMENT (ID_)
06:34:27,897 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RE_PROCDEF 
add constraint ACT_UNIQ_PROCDEF 
unique (KEY_,VERSION_, TENANT_ID_)
06:34:28,347 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_EXECUTION 
add constraint ACT_FK_EXE_PROCINST 
foreign key (PROC_INST_ID_) 
references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade
06:34:29,443 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_EXECUTION 
add constraint ACT_FK_EXE_PARENT 
foreign key (PARENT_ID_) 
references ACT_RU_EXECUTION (ID_)
06:34:31,852 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_EXECUTION 
add constraint ACT_FK_EXE_SUPER 
foreign key (SUPER_EXEC_) 
references ACT_RU_EXECUTION (ID_)
06:34:33,468 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_EXECUTION 
add constraint ACT_FK_EXE_PROCDEF 
foreign key (PROC_DEF_ID_) 
references ACT_RE_PROCDEF (ID_)
06:34:35,678 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_IDENTITYLINK 
add constraint ACT_FK_TSKASS_TASK 
foreign key (TASK_ID_) 
references ACT_RU_TASK (ID_)
06:34:37,040 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_IDENTITYLINK 
add constraint ACT_FK_ATHRZ_PROCEDEF 
foreign key (PROC_DEF_ID_) 
references ACT_RE_PROCDEF(ID_)
06:34:38,485 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_IDENTITYLINK 
add constraint ACT_FK_IDL_PROCINST 
foreign key (PROC_INST_ID_) 
references ACT_RU_EXECUTION (ID_)
06:34:40,850 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_TASK 
add constraint ACT_FK_TASK_EXE 
foreign key (EXECUTION_ID_) 
references ACT_RU_EXECUTION (ID_)
06:34:42,140 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_TASK 
add constraint ACT_FK_TASK_PROCINST 
foreign key (PROC_INST_ID_) 
references ACT_RU_EXECUTION (ID_)
06:34:43,376 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_TASK 
add constraint ACT_FK_TASK_PROCDEF 
foreign key (PROC_DEF_ID_) 
references ACT_RE_PROCDEF (ID_)
06:34:44,980 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_VARIABLE 
add constraint ACT_FK_VAR_EXE 
foreign key (EXECUTION_ID_) 
references ACT_RU_EXECUTION (ID_)
06:34:46,160 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_VARIABLE 
add constraint ACT_FK_VAR_PROCINST 
foreign key (PROC_INST_ID_) 
references ACT_RU_EXECUTION(ID_)
06:34:47,524 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_VARIABLE 
add constraint ACT_FK_VAR_BYTEARRAY 
foreign key (BYTEARRAY_ID_) 
references ACT_GE_BYTEARRAY (ID_)
06:34:49,434 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_JOB 
add constraint ACT_FK_JOB_EXCEPTION 
foreign key (EXCEPTION_STACK_ID_) 
references ACT_GE_BYTEARRAY (ID_)
06:34:50,452 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RU_EVENT_SUBSCR 
add constraint ACT_FK_EVENT_EXEC 
foreign key (EXECUTION_ID_) 
references ACT_RU_EXECUTION(ID_)
06:34:51,652 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RE_MODEL 
add constraint ACT_FK_MODEL_SOURCE 
foreign key (EDITOR_SOURCE_VALUE_ID_) 
references ACT_GE_BYTEARRAY (ID_)
06:34:52,899 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RE_MODEL 
add constraint ACT_FK_MODEL_SOURCE_EXTRA 
foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_) 
references ACT_GE_BYTEARRAY (ID_)
06:34:54,227 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_RE_MODEL 
add constraint ACT_FK_MODEL_DEPLOYMENT 
foreign key (DEPLOYMENT_ID_) 
references ACT_RE_DEPLOYMENT (ID_)
06:34:55,760 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_PROCDEF_INFO 
add constraint ACT_FK_INFO_JSON_BA 
foreign key (INFO_JSON_ID_) 
references ACT_GE_BYTEARRAY (ID_)
06:34:56,928 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_PROCDEF_INFO 
add constraint ACT_FK_INFO_PROCDEF 
foreign key (PROC_DEF_ID_) 
references ACT_RE_PROCDEF (ID_)
06:34:58,192 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_PROCDEF_INFO 
add constraint ACT_UNIQ_INFO_PROCDEF 
unique (PROC_DEF_ID_)
06:34:58,891 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - activiti db schema create for component engine successful
06:34:58,894 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - performing create on history with resource org/activiti/db/create/activiti.mysql.create.history.sql
06:34:58,894 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - Found MySQL: majorVersion=5 minorVersion=6
06:34:58,895 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_PROCINST ( 
ID_ varchar(64) not null, 
PROC_INST_ID_ varchar(64) not null, 
BUSINESS_KEY_ varchar(255), 
PROC_DEF_ID_ varchar(64) not null, 
START_TIME_ datetime(3) not null, 
END_TIME_ datetime(3), 
DURATION_ bigint, 
START_USER_ID_ varchar(255), 
START_ACT_ID_ varchar(255), 
END_ACT_ID_ varchar(255), 
SUPER_PROCESS_INSTANCE_ID_ varchar(64), 
DELETE_REASON_ varchar(4000), 
TENANT_ID_ varchar(255) default '', 
NAME_ varchar(255), 
primary key (ID_), 
unique (PROC_INST_ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:59,469 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_ACTINST ( 
ID_ varchar(64) not null, 
PROC_DEF_ID_ varchar(64) not null, 
PROC_INST_ID_ varchar(64) not null, 
EXECUTION_ID_ varchar(64) not null, 
ACT_ID_ varchar(255) not null, 
TASK_ID_ varchar(64), 
CALL_PROC_INST_ID_ varchar(64), 
ACT_NAME_ varchar(255), 
ACT_TYPE_ varchar(255) not null, 
ASSIGNEE_ varchar(255), 
START_TIME_ datetime(3) not null, 
END_TIME_ datetime(3), 
DURATION_ bigint, 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:34:59,936 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_TASKINST ( 
ID_ varchar(64) not null, 
PROC_DEF_ID_ varchar(64), 
TASK_DEF_KEY_ varchar(255), 
PROC_INST_ID_ varchar(64), 
EXECUTION_ID_ varchar(64), 
NAME_ varchar(255), 
PARENT_TASK_ID_ varchar(64), 
DESCRIPTION_ varchar(4000), 
OWNER_ varchar(255), 
ASSIGNEE_ varchar(255), 
START_TIME_ datetime(3) not null, 
CLAIM_TIME_ datetime(3), 
END_TIME_ datetime(3), 
DURATION_ bigint, 
DELETE_REASON_ varchar(4000), 
PRIORITY_ integer, 
DUE_DATE_ datetime(3), 
FORM_KEY_ varchar(255), 
CATEGORY_ varchar(255), 
TENANT_ID_ varchar(255) default '', 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:00,318 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_VARINST ( 
ID_ varchar(64) not null, 
PROC_INST_ID_ varchar(64), 
EXECUTION_ID_ varchar(64), 
TASK_ID_ varchar(64), 
NAME_ varchar(255) not null, 
VAR_TYPE_ varchar(100), 
REV_ integer, 
BYTEARRAY_ID_ varchar(64), 
DOUBLE_ double, 
LONG_ bigint, 
TEXT_ varchar(4000), 
TEXT2_ varchar(4000), 
CREATE_TIME_ datetime(3), 
LAST_UPDATED_TIME_ datetime(3), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:00,674 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_DETAIL ( 
ID_ varchar(64) not null, 
TYPE_ varchar(255) not null, 
PROC_INST_ID_ varchar(64), 
EXECUTION_ID_ varchar(64), 
TASK_ID_ varchar(64), 
ACT_INST_ID_ varchar(64), 
NAME_ varchar(255) not null, 
VAR_TYPE_ varchar(255), 
REV_ integer, 
TIME_ datetime(3) not null, 
BYTEARRAY_ID_ varchar(64), 
DOUBLE_ double, 
LONG_ bigint, 
TEXT_ varchar(4000), 
TEXT2_ varchar(4000), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:01,141 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_COMMENT ( 
ID_ varchar(64) not null, 
TYPE_ varchar(255), 
TIME_ datetime(3) not null, 
USER_ID_ varchar(255), 
TASK_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
ACTION_ varchar(255), 
MESSAGE_ varchar(4000), 
FULL_MSG_ LONGBLOB, 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:01,507 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_ATTACHMENT ( 
ID_ varchar(64) not null, 
REV_ integer, 
USER_ID_ varchar(255), 
NAME_ varchar(255), 
DESCRIPTION_ varchar(4000), 
TYPE_ varchar(255), 
TASK_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
URL_ varchar(4000), 
CONTENT_ID_ varchar(64), 
TIME_ datetime(3), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:02,095 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_HI_IDENTITYLINK ( 
ID_ varchar(64), 
GROUP_ID_ varchar(255), 
TYPE_ varchar(255), 
USER_ID_ varchar(255), 
TASK_ID_ varchar(64), 
PROC_INST_ID_ varchar(64), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:02,515 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_)
06:35:03,037 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_)
06:35:03,818 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_)
06:35:04,276 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_)
06:35:04,837 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_)
06:35:05,238 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_)
06:35:05,864 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_)
06:35:06,582 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_)
06:35:07,897 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_)
06:35:09,037 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_)
06:35:09,522 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_)
06:35:10,283 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_)
06:35:11,383 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_)
06:35:13,050 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_)
06:35:14,376 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_)
06:35:14,800 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_)
06:35:15,363 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_)
06:35:16,224 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_)
06:35:16,874 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - activiti db schema create for component history successful
06:35:16,876 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - performing create on identity with resource org/activiti/db/create/activiti.mysql.create.identity.sql
06:35:16,876 [main] INFO  org.activiti.engine.impl.db.DbSqlSession  - Found MySQL: majorVersion=5 minorVersion=6
06:35:16,876 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_ID_GROUP ( 
ID_ varchar(64), 
REV_ integer, 
NAME_ varchar(255), 
TYPE_ varchar(255), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:17,217 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_ID_MEMBERSHIP ( 
USER_ID_ varchar(64), 
GROUP_ID_ varchar(64), 
primary key (USER_ID_, GROUP_ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:17,565 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_ID_USER ( 
ID_ varchar(64), 
REV_ integer, 
FIRST_ varchar(255), 
LAST_ varchar(255), 
EMAIL_ varchar(255), 
PWD_ varchar(255), 
PICTURE_ID_ varchar(64), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:17,964 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: create table ACT_ID_INFO ( 
ID_ varchar(64), 
REV_ integer, 
USER_ID_ varchar(64), 
TYPE_ varchar(64), 
KEY_ varchar(255), 
VALUE_ varchar(255), 
PASSWORD_ LONGBLOB, 
PARENT_ID_ varchar(255), 
primary key (ID_) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin
06:35:18,712 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_ID_MEMBERSHIP 
add constraint ACT_FK_MEMB_GROUP 
foreign key (GROUP_ID_) 
references ACT_ID_GROUP (ID_)
06:35:19,760 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - SQL: alter table ACT_ID_MEMBERSHIP 
add constraint ACT_FK_MEMB_USER 
foreign key (USER_ID_) 
references ACT_ID_USER (ID_)
06:35:20,707 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - activiti db schema create for component identity successful
06:35:20,708 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - flush summary: 0 insert, 0 update, 0 delete.
06:35:20,708 [main] DEBUG org.activiti.engine.impl.db.DbSqlSession  - now executing flush...
06:35:20,708 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext  - firing event committing...
06:35:20,710 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext  - committing the ibatis sql session...
06:35:20,710 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext  - firing event committed...
06:35:20,710 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction  - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@14ff1714]
06:35:20,711 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction  - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@14ff1714]
06:35:20,711 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource  - Returned connection 352261908 to pool.
06:35:20,711 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor  - --- SchemaOperationsProcessEngineBuild finished --------------------------------------------------------
06:35:20,712 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor  - 

06:35:20,712 [main] INFO  org.activiti.engine.impl.ProcessEngineImpl  - ProcessEngine default created


至此我们的项目搭建好了并创建了流程引擎,下一篇我们讲解如何使用flowable的流程设计器创建设计一个流程,并使用其提供的api来发布流程



打赏, 我要小额赞助,鼓励作者写出更好的文章
<< 上一篇:6.创建流程设计图并发布
>> 下一篇:4.flowable环境搭建

评论列表



您还没有登录,登录后才能发表评论,请【登录】