本文整理汇总了Java中org.activiti.engine.ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration方法的具体用法?Java ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration怎么用?Java ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.ProcessEngineConfiguration
的用法示例。
在下文中一共展示了ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialiseActivitiDBSchema
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
/**
* Initialises the Activiti DB schema, if not present it's created.
*
* @param connection Connection to use the initialise DB schema
*/
private void initialiseActivitiDBSchema(Connection connection)
{
// create instance of activiti engine to initialise schema
ProcessEngine engine = null;
ProcessEngineConfiguration engineConfig = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
try
{
// build the engine
engine = engineConfig.setDataSource(dataSource).
setDatabaseSchemaUpdate("none").
setProcessEngineName("activitiBootstrapEngine").
setHistory("full").
setJobExecutorActivate(false).
buildProcessEngine();
String schemaName = dbSchemaName != null ? dbSchemaName : databaseMetaDataHelper.getSchema(connection);
// create or upgrade the DB schema
engine.getManagementService().databaseSchemaUpgrade(connection, null, schemaName);
}
finally
{
if (engine != null)
{
// close the process engine
engine.close();
}
}
}
示例2: createTable
import org.activiti.engine.ProcessEngineConfiguration; //导入方法依赖的package包/类
@Test
public void createTable() {
ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
configuration.setJdbcDriver("com.mysql.jdbc.Driver");
configuration.setJdbcUrl("jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf-8");
configuration.setJdbcUsername("root");
configuration.setJdbcPassword("lizhiwei");
configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
ProcessEngine processEngine = configuration.buildProcessEngine();
logger.info("### ============= 创建Activiti流程引擎实例, {}", processEngine);
processEngine.close();
}