下载activiti5.8 http://www.activiti.org
解压缩activi5.8
复制mysql驱动包到activiti-5.8\setup\files\dependencies\libs
从activiti-5.8\setup\build\复制activiti.cfg.xml文件到ide的默认包。
修改activiti.cfg.xml数据库配置地方如下:
<property name="databaseSchemaUpdate" value="true" />
<property name="jdbcUrl" value="jdbc:mysql://10.0.4.35/activiti" />
<property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
<property name="jdbcUsername" value="root" />
<property name="jdbcPassword" value="123456" />
<property name="jobExecutorActivate" value="true" />
<property name="dbCycleUsed" value="true" />
新建一Java Class
public class test {
public static void main(String[] args) {
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
}
}
日志信息显示:
run:
2012-2-25 8:47:10 org.activiti.engine.ProcessEngines initProcessEnginFromResource
信息: initializing process engine for resource file:/D:/Code/flow/build/web/WEB-INF/classes/activiti.cfg.xml
log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.XmlBeanDefinitionReader).
log4j:WARN Please initialize the log4j system properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2012-2-25 8:47:11 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
信息: performing create on engine with resource org/activiti/db/create/activiti.mysql.create.engine.sql
2012-2-25 8:47:14 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
信息: performing create on history with resource org/activiti/db/create/activiti.mysql.create.history.sql
2012-2-25 8:47:15 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
信息: performing create on identity with resource org/activiti/db/create/activiti.mysql.create.identity.sql
2012-2-25 8:47:16 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
信息: performing create on cycle with resource org/activiti/db/create/activiti.mysql.create.cycle.sql
2012-2-25 8:47:17 org.activiti.engine.impl.ProcessEngineImpl <init>
信息: ProcessEngine default created
2012-2-25 8:47:17 org.activiti.engine.ProcessEngines initProcessEnginFromResource
信息: initialised process engine default
2012-2-25 8:47:17 org.activiti.engine.impl.jobexecutor.JobAcquisitionThread run
信息: JobAcquisitionThread starting to acquire jobs
结束。