Create ProcessEngineConfiguration instance and oracle instance

Source: Internet
Author: User

Create ProcessEngineConfiguration instance and oracle instance

The ProcessEngineConfiguration object represents all the configurations of the activiti process engine. ProcessEngineConfiguration provides a static method for parsing the configuration file and returns the ProcessEngineConfiguration instance.

// Specify the configuration file to create the ProcessEngineConfiguration instance ProcessEngineConfiguration config = ProcessEngineConfiguration. createProcessEngineConfigurationFromResource ("my-activiti.xml"); // specify the ProcessEngineConfiguration config = ProcessEngineConfiguration of myconfig as the bean created in the configuration file. createProcessEngineConfigurationFromResource ("my-activiti.xml", "myconfig ");

3. Create a file based on the input stream of the configuration file

File file = new File ("resource/input-stream.xml"); // get the file input stream InputStream FS = new FileInputStream (File); // create ProcessEngineConfiguration config = ProcessEngineConfiguration Based on the configuration file stream. createProcessEngineConfigurationFromInputStream (FCM );

4. Do not create from the configuration file, create in code

StandaloneInMemProcessEngineConfiguration is a subclass of StandaloneProcessEngineConfiguration, which is specially specified by StandaloneInMemProcessEngineConfiguration.

DatabaseSchemaUpdate (create-drop) and JdbcUrl (jdbc: h2: mem: activiti ).

// ProcessEngineConfiguration config = ProcessEngineConfiguration. createStandaloneInMemProcessEngineConfiguration (); ProcessEngineConfiguration config = ProcessEngineConfiguration. createStandaloneProcessEngineConfiguration (); // The default value is false System. out. println (config. getDatabaseSchemaUpdate (); // The default value is jdbc: h2: tcp: // localhost/activiti System. out. println (config. getJdbcUrl (); // use custom config. setJdbcUrl ("jdbcUrl ");

StandaloneInMemProcessEngineConfiguration can be configured as the bean class, but note that the default attribute value is not required by the business.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.