activiti engine.schema.update DB_SCHEMA_UPDATE_FALSE
阿新 • • 發佈:2017-06-30
bcp oid uil config har curl ase 對象 數據庫配置
engine.properties
# engine properties
engine.schema.update=true
engine.activate.jobexecutor=false
engine.asyncexecutor.enabled=true
engine.asyncexecutor.activate=true
engine.history.level=full
ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration() .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE)
DB_SCHEMA_UPDATE_FALSE
http://www.cnblogs.com/mingforyou/p/5347789.html
package junit; import org.activiti.engine.ProcessEngine; import org.activiti.engine.ProcessEngineConfiguration; import org.junit.Test; public class TestActiviti { /** * 使用代碼創建工作流需要的23張表 */ @Testpublic void createTable(){ ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration(); //連接數據庫配置 processEngineConfiguration.setJdbcDriver("com.mysql.jdbc.Driver"); processEngineConfiguration.setJdbcUrl("jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf8"); processEngineConfiguration.setJdbcUsername("root"); processEngineConfiguration.setJdbcPassword("******"); /** public static final String DB_SCHEMA_UPDATE_FALSE = "false";//不能自動創建表,需要表存在 public static final String DB_SCHEMA_UPDATE_CREATE_DROP = "create-drop";//先刪除表再創建表 public static final String DB_SCHEMA_UPDATE_TRUE = "true";//如果表不存在,自動創建表 */ processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE); //工作流的核心對象,ProcessEngine對象 ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine(); System.out.println("processEngine:"+ processEngine); } }
activiti engine.schema.update DB_SCHEMA_UPDATE_FALSE