当前位置: 首页>>代码示例>>Java>>正文


Java ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration方法代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:34,代码来源:SchemaBootstrap.java

示例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();
}
 
开发者ID:Lzw2016,项目名称:study,代码行数:14,代码来源:Test01.java


注:本文中的org.activiti.engine.ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。